List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:October 3 2008 12:35pm
Subject:bzr commit into mysql-6.0 branch (mattias.jonsson:2841) Bug#38804
View as plain text  
#At file:///Users/mattiasj/clones/bzrroot/topush-60-5129rc/

 2841 Mattias Jonsson	2008-10-03 [merge]
      merge and update of post push fix for bug#38804
      There had also been a small miss in the previous
      merge between the 5.1.29-rc and -bugteam trees
modified:
  mysql-test/suite/parts/inc/partition_auto_increment.inc
  mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
  mysql-test/suite/parts/r/partition_auto_increment_falcon.result
  mysql-test/suite/parts/r/partition_auto_increment_innodb.result
  mysql-test/suite/parts/r/partition_auto_increment_myisam.result
  mysql-test/suite/parts/t/disabled.def
  sql/ha_partition.cc

per-file messages:
  mysql-test/suite/parts/inc/partition_auto_increment.inc
    A previous merge removed this change
  mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
    A previous merge removed this change
  mysql-test/suite/parts/r/partition_auto_increment_falcon.result
    A previous merge removed this change
  mysql-test/suite/parts/r/partition_auto_increment_innodb.result
    A previous merge removed this change
  mysql-test/suite/parts/r/partition_auto_increment_myisam.result
    A previous merge removed this change
  mysql-test/suite/parts/t/disabled.def
    enabling the test for archive, but still leaving the lc0 test
    disabled, due to not correct handling of names that only
    differs in case.
=== modified file 'mysql-test/suite/parts/inc/partition_auto_increment.inc'
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc	2008-10-01 14:47:29 +0000
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc	2008-10-03 12:35:01 +0000
@@ -24,14 +24,38 @@ AND TABLE_NAME='t1';
 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
 AND TABLE_NAME='t1';
 INSERT INTO t1 VALUES (0);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_KEY, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (5), (16);
+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 (17);
 INSERT INTO t1 VALUES (19), (NULL);
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 INSERT INTO t1 VALUES (NULL);
 SET INSERT_ID = 30;
 INSERT INTO t1 VALUES (NULL);
+if (!$skip_update)
+{
+  UPDATE t1 SET c1 = 50 WHERE c1 = 17;
+  UPDATE t1 SET c1 = 51 WHERE c1 = 19;
+  -- error 0, ER_BAD_NULL_ERROR
+  UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+if (!$mysql_errno)
+{
+  echo # ERROR (only OK if Blackhole) should give ER_BAD_NULL_ERROR;
+  echo # mysql_errno: $mysql_errno;
+}
+  INSERT INTO t1 VALUES (NULL);
+  INSERT INTO t1 VALUES (NULL);
+}
 SELECT * FROM t1 ORDER BY c1;
 DROP TABLE t1;
 eval CREATE TABLE t1 (
@@ -47,11 +71,17 @@ SHOW CREATE TABLE t1;
 INSERT INTO t1 VALUES (NULL);
 FLUSH TABLE;
 SHOW CREATE TABLE t1;
+if (!$skip_delete)
+{
 DELETE FROM t1;
+}
 INSERT INTO t1 VALUES (NULL);
 SHOW CREATE TABLE t1;
 SELECT * FROM t1 ORDER BY c1;
+if (!$skip_truncate)
+{
 TRUNCATE TABLE t1;
+}
 INSERT INTO t1 VALUES (NULL);
 SHOW CREATE TABLE t1;
 SELECT * FROM t1 ORDER BY c1;
@@ -78,12 +108,22 @@ ENGINE=$engine
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, NULL);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_KEY, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (1, 1), (99, 99);
+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 (1, NULL);
 let $old_sql_mode = `select @@session.sql_mode`;
 SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (1, 0);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 SELECT * FROM t1 ORDER BY c1, c2;
 DROP TABLE t1;
 eval CREATE TABLE t1 (
@@ -93,7 +133,12 @@ eval CREATE TABLE t1 (
 ENGINE=$engine
 PARTITION BY HASH(c2)
 PARTITIONS 2;
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (1, 0);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 INSERT INTO t1 VALUES (1, 1), (1, NULL);
 INSERT INTO t1 VALUES (2, NULL), (4, 7);
 INSERT INTO t1 VALUES (1, NULL);
@@ -111,14 +156,48 @@ PARTITION BY HASH(c1)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (2), (4), (NULL);
 INSERT INTO t1 VALUES (0);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_KEY, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (5), (16);
+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 (17), (19), (NULL);
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (NULL), (9);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (59), (55);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 INSERT INTO t1 VALUES (NULL), (90);
 INSERT INTO t1 VALUES (NULL);
+if (!$skip_update)
+{
+  UPDATE t1 SET c1 = 150 WHERE c1 = 17;
+  UPDATE t1 SET c1 = 151 WHERE c1 = 19;
+  -- error 0, ER_BAD_NULL_ERROR
+  UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+if (!$mysql_errno)
+{
+  echo # ERROR (only OK if Blackhole) should give ER_BAD_NULL_ERROR;
+  echo # mysql_errno: $mysql_errno;
+}
+  INSERT INTO t1 VALUES (NULL);
+  INSERT INTO t1 VALUES (NULL);
+}
 SELECT * FROM t1 ORDER BY c1;
 DROP TABLE t1;
 
@@ -187,28 +266,43 @@ SELECT AUTO_INCREMENT FROM INFORMATION_S
 AND TABLE_NAME='t1';
 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
 AND TABLE_NAME='t1';
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (10);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 SELECT * FROM t1 ORDER BY c1;
 INSERT INTO t1 VALUES (NULL);
 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
 AND TABLE_NAME='t1';
 INSERT INTO t1 VALUES (NULL);
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 VALUES (15);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
 INSERT INTO t1 VALUES (NULL);
+if (!$skip_delete)
+{
 DELETE FROM t1;
+}
 INSERT INTO t1 VALUES (NULL);
 SHOW CREATE TABLE t1;
 SELECT * FROM t1 ORDER BY c1;
+if (!$skip_truncate)
+{
 TRUNCATE TABLE t1;
+}
 INSERT INTO t1 VALUES (NULL);
 SHOW CREATE TABLE t1;
 SELECT * FROM t1 ORDER BY c1;
 DROP TABLE t1;
 
 -- echo # Test with two threads
-connect(con1, localhost, root,,);
 connection default;
 -- echo # con default
 eval CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1))
@@ -217,6 +311,7 @@ eval CREATE TABLE t1 (c1 INT NOT NULL AU
   PARTITIONS 2;
 INSERT INTO t1 (c1) VALUES (2);
 INSERT INTO t1 (c1) VALUES (4);
+connect(con1, localhost, root,,);
 connection con1;
 -- echo # con1
 INSERT INTO t1 (c1) VALUES (NULL);
@@ -232,7 +327,12 @@ connection con1;
 INSERT INTO t1 (c1) VALUES (NULL);
 connection default;
 -- echo # con default
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 (c1) VALUES (16);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 -- echo # con1
 connection con1;
 INSERT INTO t1 (c1) VALUES (NULL);
@@ -268,7 +368,12 @@ connection con1;
 INSERT INTO t1 (c1) VALUES (NULL);
 connection default;
 -- echo # con default
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 (c1) VALUES (16);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 -- echo # con1
 connection con1;
 INSERT INTO t1 (c1) VALUES (NULL);
@@ -308,7 +413,12 @@ connection con1;
 INSERT INTO t1 (c1) VALUES (NULL);
 connection default;
 -- echo # con default
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 (c1) VALUES (16);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 -- echo # con1
 connection con1;
 INSERT INTO t1 (c1) VALUES (NULL);
@@ -324,6 +434,8 @@ COMMIT;
 SELECT * FROM t1 ORDER BY c1;
 DROP TABLE t1;
 
+if (!$only_ai_pk)
+{
 -- echo # Test with another column after
 eval CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -342,6 +454,7 @@ INSERT INTO t1 VALUES (2, 22);
 INSERT INTO t1 VALUES (NULL, 2);
 SELECT * FROM t1 ORDER BY c1,c2;
 DROP TABLE t1;
+}
 
 -- echo # Test with another column before
 eval CREATE TABLE t1 (
@@ -352,13 +465,23 @@ ENGINE = $engine
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_KEY, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (1, 1);
+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 (1, NULL);
 INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0);
 INSERT INTO t1 VALUES (2, NULL);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_KEY, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (2, 2);
+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 (2, 22);
 INSERT INTO t1 VALUES (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;
@@ -388,14 +511,24 @@ if (`SELECT @my_errno NOT IN (0,$ER_WRON
 if ($run)
 {
 INSERT INTO t1 VALUES (1, 0);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_KEY, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (1, 1);
+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 (1, NULL);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (3, NULL);
 INSERT INTO t1 VALUES (3, NULL), (2, 0), (2, NULL);
--- error ER_DUP_ENTRY
+-- error 0, ER_DUP_ENTRY
 INSERT INTO t1 VALUES (2, 2);
+if (!$mysql_errno)
+{
+  echo # ERROR (only OK if Blackhole/NDB) should give ER_DUP_ENTRY;
+  echo # mysql_errno: $mysql_errno;
+}
 INSERT INTO t1 VALUES (2, 22), (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;
 DROP TABLE t1;
@@ -408,7 +541,12 @@ eval CREATE TABLE t1 (c1 INT NOT NULL AU
   PARTITION BY HASH(c1)
   PARTITIONS 2;
 SHOW CREATE TABLE t1;
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 (c1) VALUES (4);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 SHOW CREATE TABLE t1;
 INSERT INTO t1 (c1) VALUES (0);
 SHOW CREATE TABLE t1;
@@ -421,7 +559,12 @@ let $old_sql_mode = `select @@session.sq
 SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 INSERT INTO t1 (c1) VALUES (300);
 SHOW CREATE TABLE t1;
+-- error 0, ER_DUP_KEY
 INSERT INTO t1 (c1) VALUES (0);
+if ($mysql_errno)
+{
+  echo # ERROR (only OK if Archive) mysql_errno: $mysql_errno;
+}
 SHOW CREATE TABLE t1;
 INSERT INTO t1 (c1) VALUES (NULL);
 SHOW CREATE TABLE t1;

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_blackhole.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result	2008-09-08 13:30:01 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result	2008-10-03 12:35:01 +0000
@@ -28,6 +28,7 @@ AUTO_INCREMENT
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
 # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (17);
 INSERT INTO t1 VALUES (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
@@ -37,7 +38,8 @@ INSERT INTO t1 VALUES (NULL);
 UPDATE t1 SET c1 = 50 WHERE c1 = 17;
 UPDATE t1 SET c1 = 51 WHERE c1 = 19;
 UPDATE t1 SET c1 = NULL WHERE c1 = 4;
-# ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# ERROR (only OK if Blackhole) should give ER_BAD_NULL_ERROR
+# mysql_errno: 0
 INSERT INTO t1 VALUES (NULL);
 INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
@@ -125,6 +127,7 @@ PARTITIONS 2;
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (1, 1), (99, 99);
 # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (1, NULL);
 SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 INSERT INTO t1 VALUES (1, 0);
@@ -157,6 +160,7 @@ INSERT INTO t1 VALUES (2), (4), (NULL);
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
 # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (17), (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
 INSERT INTO t1 VALUES (NULL), (9);
@@ -166,7 +170,8 @@ INSERT INTO t1 VALUES (NULL);
 UPDATE t1 SET c1 = 150 WHERE c1 = 17;
 UPDATE t1 SET c1 = 151 WHERE c1 = 19;
 UPDATE t1 SET c1 = NULL WHERE c1 = 4;
-# ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# ERROR (only OK if Blackhole) should give ER_BAD_NULL_ERROR
+# mysql_errno: 0
 INSERT INTO t1 VALUES (NULL);
 INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
@@ -399,11 +404,13 @@ PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
 INSERT INTO t1 VALUES (1, 1);
 # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (2, 2);
 # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (2, 22);
 INSERT INTO t1 VALUES (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;
@@ -420,12 +427,14 @@ PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
 INSERT INTO t1 VALUES (1, 1);
 # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (3, NULL);
 INSERT INTO t1 VALUES (3, NULL), (2, 0), (2, NULL);
 INSERT INTO t1 VALUES (2, 2);
-# ERROR (only OK if Blackhole/NDB) should give ER_DUP_KEY or ER_DUP_ENTRY
+# ERROR (only OK if Blackhole/NDB) should give ER_DUP_ENTRY
+# mysql_errno: 0
 INSERT INTO t1 VALUES (2, 22), (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;
 c1	c2

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_falcon.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_falcon.result	2008-10-01 14:47:29 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_falcon.result	2008-10-03 12:35:01 +0000
@@ -139,7 +139,6 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (1, 1), (99, 99);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 INSERT INTO t1 VALUES (1, 0);
@@ -180,7 +179,6 @@ PARTITIONS 2;
 INSERT INTO t1 VALUES (2), (4), (NULL);
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
-ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
 INSERT INTO t1 VALUES (17), (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
 INSERT INTO t1 VALUES (NULL), (9);
@@ -560,12 +558,10 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
 INSERT INTO t1 VALUES (1, 1);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (2, 2);
-ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
 INSERT INTO t1 VALUES (2, 22);
 INSERT INTO t1 VALUES (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_innodb.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result	2008-10-01 14:47:29 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result	2008-10-03 12:35:01 +0000
@@ -27,13 +27,17 @@ AUTO_INCREMENT
 6
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
-ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
 INSERT INTO t1 VALUES (17);
 INSERT INTO t1 VALUES (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
 INSERT INTO t1 VALUES (NULL);
 SET INSERT_ID = 30;
 INSERT INTO t1 VALUES (NULL);
+UPDATE t1 SET c1 = 50 WHERE c1 = 17;
+UPDATE t1 SET c1 = 51 WHERE c1 = 19;
+UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
 c1
 2
@@ -41,13 +45,15 @@ c1
 5
 6
 10
-17
-19
 20
 22
 23
 25
 30
+31
+32
+50
+51
 DROP TABLE t1;
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -133,7 +139,6 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (1, 1), (99, 99);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 INSERT INTO t1 VALUES (1, 0);
@@ -174,13 +179,17 @@ PARTITIONS 2;
 INSERT INTO t1 VALUES (2), (4), (NULL);
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
-ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
 INSERT INTO t1 VALUES (17), (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
 INSERT INTO t1 VALUES (NULL), (9);
 INSERT INTO t1 VALUES (59), (55);
 INSERT INTO t1 VALUES (NULL), (90);
 INSERT INTO t1 VALUES (NULL);
+UPDATE t1 SET c1 = 150 WHERE c1 = 17;
+UPDATE t1 SET c1 = 151 WHERE c1 = 19;
+UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
 c1
 2
@@ -189,8 +198,6 @@ c1
 6
 9
 10
-17
-19
 20
 21
 22
@@ -200,6 +207,10 @@ c1
 60
 90
 91
+150
+151
+152
+153
 DROP TABLE t1;
 # Test with auto_increment_increment and auto_increment_offset.
 CREATE TABLE t1 (
@@ -555,12 +566,10 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
 INSERT INTO t1 VALUES (1, 1);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (2, 2);
-ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
 INSERT INTO t1 VALUES (2, 22);
 INSERT INTO t1 VALUES (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_myisam.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result	2008-10-01 14:47:29 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result	2008-10-03 12:35:01 +0000
@@ -27,13 +27,17 @@ AUTO_INCREMENT
 6
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
-ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
 INSERT INTO t1 VALUES (17);
 INSERT INTO t1 VALUES (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
 INSERT INTO t1 VALUES (NULL);
 SET INSERT_ID = 30;
 INSERT INTO t1 VALUES (NULL);
+UPDATE t1 SET c1 = 50 WHERE c1 = 17;
+UPDATE t1 SET c1 = 51 WHERE c1 = 19;
+UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
 c1
 2
@@ -41,13 +45,15 @@ c1
 5
 6
 10
-17
-19
 20
 21
 22
 23
 30
+50
+51
+52
+53
 DROP TABLE t1;
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -133,7 +139,6 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (1, 1), (99, 99);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 INSERT INTO t1 VALUES (1, 0);
@@ -174,13 +179,17 @@ PARTITIONS 2;
 INSERT INTO t1 VALUES (2), (4), (NULL);
 INSERT INTO t1 VALUES (0);
 INSERT INTO t1 VALUES (5), (16);
-ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
 INSERT INTO t1 VALUES (17), (19), (NULL);
 INSERT INTO t1 VALUES (NULL), (10), (NULL);
 INSERT INTO t1 VALUES (NULL), (9);
 INSERT INTO t1 VALUES (59), (55);
 INSERT INTO t1 VALUES (NULL), (90);
 INSERT INTO t1 VALUES (NULL);
+UPDATE t1 SET c1 = 150 WHERE c1 = 17;
+UPDATE t1 SET c1 = 151 WHERE c1 = 19;
+UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (NULL);
 SELECT * FROM t1 ORDER BY c1;
 c1
 2
@@ -189,8 +198,6 @@ c1
 6
 9
 10
-17
-19
 20
 21
 22
@@ -200,6 +207,10 @@ c1
 60
 90
 91
+150
+151
+152
+153
 DROP TABLE t1;
 # Test with auto_increment_increment and auto_increment_offset.
 CREATE TABLE t1 (
@@ -583,12 +594,10 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
 INSERT INTO t1 VALUES (1, 1);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (2, 2);
-ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
 INSERT INTO t1 VALUES (2, 22);
 INSERT INTO t1 VALUES (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;
@@ -613,13 +622,11 @@ PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
 INSERT INTO t1 VALUES (1, 1);
-ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
 INSERT INTO t1 VALUES (1, NULL);
 INSERT INTO t1 VALUES (2, NULL);
 INSERT INTO t1 VALUES (3, NULL);
 INSERT INTO t1 VALUES (3, NULL), (2, 0), (2, NULL);
 INSERT INTO t1 VALUES (2, 2);
-ERROR 23000: Duplicate entry '2-2' for key 'PRIMARY'
 INSERT INTO t1 VALUES (2, 22), (2, NULL);
 SELECT * FROM t1 ORDER BY c1,c2;
 c1	c2

=== modified file 'mysql-test/suite/parts/t/disabled.def'
--- a/mysql-test/suite/parts/t/disabled.def	2008-10-01 14:47:29 +0000
+++ b/mysql-test/suite/parts/t/disabled.def	2008-10-03 12:35:01 +0000
@@ -7,9 +7,7 @@ partition_value_innodb         : Bug#305
 partition_value_myisam         : Bug#30581 partition_value tests use disallowed CAST() function
 partition_value_ndb            : Bug#30581 partition_value tests use disallowed CAST() function
 ndb_dd_backuprestore           : Bug#32659 2008-07-14 alik  Disabled to make 6.0 greaner (the test fails too often)
-partition_mgm_lc0_archive      : Bug#38751 - add partition deletes all rows
-partition_mgm_lc1_archive      : Bug#38751 - add partition deletes all rows
-partition_mgm_lc2_archive      : Bug#38751 - add partition deletes all rows
+partition_mgm_lc0_archive      : Bug#37719 - Problems with same name and different case
 partition_mgm_lc0_ndb          : Bug#38778 - master1 crashes
 partition_mgm_lc1_ndb          : Bug#38778 - master1 crashes
 partition_mgm_lc2_ndb          : Bug#38778 - master1 crashes

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2008-10-01 13:02:36 +0000
+++ b/sql/ha_partition.cc	2008-10-03 12:35:01 +0000
@@ -1730,6 +1730,14 @@ error:
 
 void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
 {
+  /*
+    Fix for bug#38751, some engines needs info-calls in ALTER.
+    Archive need this since it flushes in ::info.
+    HA_STATUS_AUTO is optimized so it will not always be forwarded
+    to all partitions, but HA_STATUS_VARIABLE will.
+  */
+  info(HA_STATUS_VARIABLE);
+
   info(HA_STATUS_AUTO);
 
   if (!(create_info->used_fields & HA_CREATE_USED_AUTO))

Thread
bzr commit into mysql-6.0 branch (mattias.jonsson:2841) Bug#38804Mattias Jonsson3 Oct