1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #18864 TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table

This commit is contained in:
mskold@mysql.com
2006-06-02 07:26:45 +02:00
parent 48a568cef6
commit 39b50ce0d2
4 changed files with 37 additions and 18 deletions

View File

@@ -1,14 +1,23 @@
DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (
a bigint unsigned NOT NULL PRIMARY KEY,
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
b int unsigned not null,
c int unsigned
) engine=ndbcluster;
select count(*) from t2;
select count(*) from t1;
count(*)
5000
truncate table t2;
select count(*) from t2;
select * from t1 order by a limit 2;
a b c
1 509 2500
2 510 7
truncate table t1;
select count(*) from t1;
count(*)
0
drop table t2;
insert into t1 values(NULL,1,1),(NULL,2,2);
select * from t1 order by a;
a b c
1 1 1
2 2 2
drop table t1;