Skip to content

bug: transient table no work as expected inside explicit transaction #18159

@dantengsky

Description

@dantengsky

Search before asking

  • I had searched in the issues and found no similar issues.

Version

v1.2.753-nightly

What's Wrong?

mysql> create or replace transient table c( c int);
Query OK, 0 rows affected (0.11 sec)

mysql> insert into c values(1);
+-------------------------+
| number of rows inserted |
+-------------------------+
|                       1 |
+-------------------------+
1 row in set (0.10 sec)
Read 1 rows, 5.00 B in 0.072 sec., 13.97 rows/sec., 69.87 B/sec.

mysql> begin;
Query OK, 0 rows affected (0.01 sec)

mysql> delete from c where c = 1;
+------------------------+
| number of rows deleted |
+------------------------+
|                      1 |
+------------------------+
1 row in set (0.15 sec)
Read 0 rows, 0.00 B in 0.066 sec., 0 rows/sec., 0.00 B/sec.

mysql> insert into c values(2);
ERROR 1105 (HY000): TransactionTimeout. Code: 4003, Text = Snapshot is generated too late, segment_block_timestamp: 2025-06-13T13:48:46.321Z, snapshot_timestamp: 2025-06-13T13:48:46.322Z.
mysql> insert into c values(3);
ERROR 1105 (HY000): CurrentTransactionIsAborted. Code: 4002, Text = [INTERPRETER] Current transaction is aborted, commands ignored until end of transaction block.
mysql> commit;
Query OK, 0 rows affected (0.01 sec)

mysql> select * from c;
+------+
| c    |
+------+
|    1 |
+------+
1 row in set (0.07 sec)
Read 1 rows, 5.00 B in 0.037 sec., 26.77 rows/sec., 133.84 B/sec.

mysql> select version();
+----------------------------------------------------------------------------------------+
| version()                                                                              |
+----------------------------------------------------------------------------------------+
| 8.0.90-v1.2.753-nightly-13e962668e(rust-1.88.0-nightly-2025-06-09T13:47:03.090839893Z) |
+----------------------------------------------------------------------------------------+
1 row in set (0.02 sec)
Read 1 rows, 1.00 B in 0.007 sec., 151.17 rows/sec., 151.17 B/sec.


How to Reproduce?

create or replace transient table c( c int);
insert into c values(1);
begin;
delete from c where c = 1;
insert into c values(2);
insert into c values(3);
commit;
select * from c;

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions