summaryrefslogtreecommitdiff
path: root/mysql-test/r/delayed.result
diff options
context:
space:
mode:
authorgkodinov@mysql.com <>2006-06-13 18:18:32 +0300
committergkodinov@mysql.com <>2006-06-13 18:18:32 +0300
commit8d94b8cacf10eb89f407ff4c2311794431ad39d5 (patch)
tree28c57dae5731b5f0ca9e5d47a0d941264f195dd0 /mysql-test/r/delayed.result
parentc9bb9413abd01fc28a96a0d5e1636d2beb517556 (diff)
downloadmariadb-git-8d94b8cacf10eb89f407ff4c2311794431ad39d5.tar.gz
Bug #20195: INSERT DELAYED with auto_increment is assigned wrong values
The INSERT DELAYED should not maintain its own private auto-increment counter, because this is assuming that other threads cannot insert into the table while the INSERT DELAYED thread is inserting, which is a wrong assumption. So the start of processing of a batch of INSERT rows in the INSERT DELAYED thread must be treated as a start of a new statement and cached next_insert_id must be cleared.
Diffstat (limited to 'mysql-test/r/delayed.result')
-rw-r--r--mysql-test/r/delayed.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result
index f8ae61b03fb..a336f3b4108 100644
--- a/mysql-test/r/delayed.result
+++ b/mysql-test/r/delayed.result
@@ -39,3 +39,33 @@ select * from t1;
a
1
drop table t1;
+CREATE TABLE t1 ( a int(10) NOT NULL auto_increment, PRIMARY KEY (a));
+insert delayed into t1 values(null);
+insert into t1 values(null);
+insert into t1 values(null);
+insert delayed into t1 values(null);
+insert delayed into t1 values(null);
+insert delayed into t1 values(null);
+insert into t1 values(null);
+insert into t1 values(null);
+insert into t1 values(null);
+delete from t1 where a=6;
+insert delayed into t1 values(null);
+insert delayed into t1 values(null);
+insert delayed into t1 values(null);
+insert delayed into t1 values(null);
+select * from t1 order by a;
+a
+1
+2
+3
+4
+5
+7
+8
+9
+10
+11
+12
+13
+DROP TABLE t1;