summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-03-15 20:06:37 +0400
committerunknown <ramil@mysql.com>2005-03-15 20:06:37 +0400
commit268a3ecc8b6282ddbd082f7f133c7273b087576b (patch)
treefcf700cc1db4634ff7d63d8960fc954e141e7c3c /mysql-test
parentef2ca9781cbcc6376480751d8d7a657237789218 (diff)
parent7e7437216b20e0f9c272e7b3386b4060977ecc8a (diff)
downloadmariadb-git-268a3ecc8b6282ddbd082f7f133c7273b087576b.tar.gz
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/heap.result42
-rw-r--r--mysql-test/t/heap.test29
2 files changed, 71 insertions, 0 deletions
diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result
index f79bcf3f1dd..db20b242962 100644
--- a/mysql-test/r/heap.result
+++ b/mysql-test/r/heap.result
@@ -665,3 +665,45 @@ length(v)
65530
drop table t1;
set storage_engine=MyISAM;
+create table t1 (a bigint unsigned auto_increment primary key, b int,
+key (b, a)) engine=heap;
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+select * from t1;
+a b
+1 1
+2 1
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+drop table t1;
+create table t1 (a int not null, b int not null auto_increment,
+primary key(a, b), key(b)) engine=heap;
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+select * from t1;
+a b
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+1 8
+drop table t1;
diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test
index 6353cd78d6a..b69649585ff 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/t/heap.test
@@ -406,3 +406,32 @@ drop table t1;
# Reset varchar test
#
eval set storage_engine=$default;
+
+#
+# Bug #8489: Strange auto_increment behaviour
+#
+
+create table t1 (a bigint unsigned auto_increment primary key, b int,
+ key (b, a)) engine=heap;
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+insert t1 (b) values (1);
+select * from t1;
+drop table t1;
+create table t1 (a int not null, b int not null auto_increment,
+ primary key(a, b), key(b)) engine=heap;
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+insert t1 (a) values (1);
+select * from t1;
+drop table t1;