# Tests creating temp tables in an explicit transaction and whilst retrying the
# transactions.
# This tests the stack behavior with SET LOCAL and must be done on a
# new connection as this will populate the temp_table structure for the
# first time.

statement ok
SET experimental_enable_temp_tables=true

statement ok
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TEMP TABLE tbl (a int primary key);
INSERT INTO tbl VALUES (1);
SELECT crdb_internal.force_retry('1s');
COMMIT

query I
SELECT * FROM tbl
----
1
