Files
oceanbase/tools/deploy/mysql_test/t/truncate_table.test
2023-11-20 08:32:44 +00:00

27 lines
686 B
Plaintext

--disable_query_log
set @@session.explicit_defaults_for_timestamp=off;
--enable_query_log
# owner : dachuan.sdc
# owner group: SQL2
# description:
#
use test;
--disable_warnings
drop table if exists tc1;
--enable_warnings
create table tc1(c1 int not null primary key, c2 varchar(11));
insert into tc1 values (1, 'aaa');
insert into tc1 values (2, 'bbbb');
insert into tc1 values (3, 'ccccc');
create index idxc2 on tc1(c2);
alter table tc1 add index idxc3(c1,c2);
select * from tc1;
--source mysql_test/include/check_all_idx_ok.inc
show index from tc1;
truncate table tc1;
let $is_truncate_table = 1;
let $is_truncate_table = 0;
select * from tc1;
show index from tc1;
drop table tc1;