summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-08-24 20:45:06 -0600
committerunknown <sasha@mysql.sashanet.com>2001-08-24 20:45:06 -0600
commitcbc16b796be9cd8eedb96b2c398da2e76b9b9f1b (patch)
treedf9afc16887c65de5a191729e79dc89c74593310 /mysql-test
parentf3e1928c11c17d7cc74fcb958d51e8ee2f1dda56 (diff)
downloadmariadb-git-cbc16b796be9cd8eedb96b2c398da2e76b9b9f1b.tar.gz
test case for InnoDB replace/auto_increment bug when insert_id is
forced by the user mysql-test/r/innodb.result: updated result mysql-test/t/innodb.test: added test case for bug in Innodb reported by Slashdot
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/innodb.result4
-rw-r--r--mysql-test/t/innodb.test22
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index fd7900af13b..913f4226f1c 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -475,3 +475,7 @@ a
1
2
4
+id name value uid
+1 one one value 101
+3 three three value 103
+6 two other value 102
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 97908aeaa57..5530e2b1f54 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -490,3 +490,25 @@ delete from t1 where a=3;
insert into t1 values (NULL);
select * from t1;
drop table t1;
+
+#Slashdot bug
+create table t1
+ (
+ id int auto_increment primary key,
+ name varchar(32) not null,
+ value text not null,
+ uid int not null,
+ unique key(name,uid)
+ ) type=innodb;
+insert into t1 values (1,'one','one value',101),
+ (2,'two','two value',102),(3,'three','three value',103);
+set insert_id=5;
+replace into t1 (value,name,uid) values ('other value','two',102);
+delete from t1 where uid=102;
+set insert_id=5;
+replace into t1 (value,name,uid) values ('other value','two',102);
+set insert_id=6;
+replace into t1 (value,name,uid) values ('other value','two',102);
+select * from t1;
+drop table t1;
+