diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2010-03-16 15:09:58 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2010-03-16 15:09:58 +0100 |
commit | 7297ec560ee8ab09c796de81b482f73b8f83eb4a (patch) | |
tree | bea49d000a90d6a992f3eeeb85870de305266761 /mysql-test/suite | |
parent | cc223d38831e90d37d0f1f7ebe97cf7c71af4774 (diff) | |
parent | e62c30b5f8cc6b2c63dc8d956056af347cc590fe (diff) | |
download | mariadb-git-7297ec560ee8ab09c796de81b482f73b8f83eb4a.tar.gz |
merge
Diffstat (limited to 'mysql-test/suite')
7 files changed, 74 insertions, 1 deletions
diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc index 2c615e58ef9..102e57d3d04 100644 --- a/mysql-test/suite/parts/inc/partition_auto_increment.inc +++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc @@ -42,6 +42,15 @@ if ($mysql_errno) INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +-- error 0, ER_DUP_ENTRY, ER_DUP_KEY +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +if (!$mysql_errno) +{ + echo # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY; + echo # mysql_errno: $mysql_errno; +} +INSERT INTO t1 VALUES (NULL); if (!$skip_update) { # InnoDB Does not handle this correctly, see bug#14793, bug#21641 @@ -601,6 +610,15 @@ SET INSERT_ID = 23; SHOW CREATE TABLE t1; INSERT INTO t1 (c1) VALUES (NULL); SHOW CREATE TABLE t1; +SET INSERT_ID = 22; +-- error 0, ER_DUP_ENTRY, ER_DUP_KEY +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +if (!$mysql_errno) +{ + echo # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY; + echo # mysql_errno: $mysql_errno; +} +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; DROP TABLE t1; diff --git a/mysql-test/suite/parts/r/partition_auto_increment_archive.result b/mysql-test/suite/parts/r/partition_auto_increment_archive.result index beda861425c..f62e4aa005a 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_archive.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_archive.result @@ -34,6 +34,9 @@ INSERT INTO t1 VALUES (NULL), (10), (NULL); INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 2 @@ -46,6 +49,7 @@ c1 21 22 30 +31 DROP TABLE t1; CREATE TABLE t1 ( c1 INT NOT NULL AUTO_INCREMENT, @@ -751,10 +755,15 @@ t1 CREATE TABLE `t1` ( ) ENGINE=ARCHIVE AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ +SET INSERT_ID = 22; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 1 +22 23 +24 DROP TABLE t1; # Testing with FLUSH TABLE CREATE TABLE t1 ( diff --git a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result index 7ef5ff88499..d6ea8ba0fe4 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result @@ -35,6 +35,11 @@ INSERT INTO t1 VALUES (NULL), (10), (NULL); INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +# ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY +# mysql_errno: 0 +INSERT INTO t1 VALUES (NULL); UPDATE t1 SET c1 = 50 WHERE c1 = 17; UPDATE t1 SET c1 = 51 WHERE c1 = 19; FLUSH TABLES; @@ -597,6 +602,11 @@ t1 CREATE TABLE `t1` ( ) ENGINE=BLACKHOLE AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ +SET INSERT_ID = 22; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +# ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY +# mysql_errno: 0 +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 DROP TABLE t1; diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result index 6295d14d98f..4cd7aa57417 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result @@ -33,6 +33,9 @@ INSERT INTO t1 VALUES (NULL), (10), (NULL); INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); UPDATE t1 SET c1 = 50 WHERE c1 = 17; UPDATE t1 SET c1 = 51 WHERE c1 = 19; FLUSH TABLES; @@ -40,7 +43,7 @@ UPDATE t1 SET c1 = 40 WHERE c1 = 50; SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; AUTO_INCREMENT -31 +32 UPDATE t1 SET c1 = NULL WHERE c1 = 4; Warnings: Warning 1048 Column 'c1' cannot be null @@ -60,6 +63,7 @@ c1 30 31 32 +33 40 51 DROP TABLE t1; @@ -771,10 +775,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ +SET INSERT_ID = 22; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 1 23 +24 DROP TABLE t1; # Testing with FLUSH TABLE CREATE TABLE t1 ( diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result index 6e3b990dc0f..1a27d1c2e52 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result @@ -33,6 +33,9 @@ INSERT INTO t1 VALUES (NULL), (10), (NULL); INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); UPDATE t1 SET c1 = 50 WHERE c1 = 17; UPDATE t1 SET c1 = 51 WHERE c1 = 19; FLUSH TABLES; @@ -57,7 +60,9 @@ c1 21 22 23 +29 30 +31 40 51 52 @@ -797,10 +802,15 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MEMORY AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ +SET INSERT_ID = 22; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 1 +22 23 +24 DROP TABLE t1; # Testing with FLUSH TABLE CREATE TABLE t1 ( diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result index 047b974f0a3..9885c78a921 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result @@ -33,6 +33,9 @@ INSERT INTO t1 VALUES (NULL), (10), (NULL); INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); UPDATE t1 SET c1 = 50 WHERE c1 = 17; UPDATE t1 SET c1 = 51 WHERE c1 = 19; FLUSH TABLES; @@ -57,7 +60,9 @@ c1 21 22 23 +29 30 +31 40 51 52 @@ -816,10 +821,15 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ +SET INSERT_ID = 22; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 1 +22 23 +24 DROP TABLE t1; # Testing with FLUSH TABLE CREATE TABLE t1 ( diff --git a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result index 317669be7ad..40387b9777a 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result @@ -34,6 +34,9 @@ INSERT INTO t1 VALUES (NULL), (10), (NULL); INSERT INTO t1 VALUES (NULL); SET INSERT_ID = 30; INSERT INTO t1 VALUES (NULL); +SET INSERT_ID = 29; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); UPDATE t1 SET c1 = 50 WHERE c1 = 17; UPDATE t1 SET c1 = 51 WHERE c1 = 19; FLUSH TABLES; @@ -58,6 +61,7 @@ c1 21 22 23 +24 30 40 51 @@ -792,9 +796,13 @@ t1 CREATE TABLE `t1` ( ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ +SET INSERT_ID = 22; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 ORDER BY c1; c1 1 +2 23 DROP TABLE t1; # Testing with FLUSH TABLE |