[YSQL] Effects of TRUNCATE persists even after ROLLBACK #15900
Labels
area/ysql
Yugabyte SQL (YSQL)
duplicate
kind/bug
This issue is a bug
priority/high
High Priority
QA
QA filed bugs
Jira Link: DB-5304
Description
Steps to reproduce:
create database test;
\c test
create table tb_test(k int);
insert into tb_test values (1), (2), (3);
select * from tb_test;
begin transaction;
truncate tb_test;
select * from tb_test;
rollback;
select * from tb_test;
The result will still return empty table even though the TRUNCATE statement has been rolledback. Postgres treats TRUNCATE as DML and thus I was able to rollback TRUNCATE command.
Even if we don't allow rollback of TRUNCATE, we should specify that as a warning here.
The text was updated successfully, but these errors were encountered: