Below is the list of changes that have just been committed into a local
6.0 repository of cpowers. When cpowers does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-01 15:43:39-05:00, chris@stripped +4 -0
Bug#22564, "auto_increment column gets automatically incremented"
Removed HA_AUTO_PART_KEY from StorageInterface::table_flags().
This will allow autoincrement columns to be defined in multipart
indexes, but only as the first column of the index.
mysql-test/suite/falcon/r/falcon_bug_22564.result@stripped, 2007-11-01 15:43:37-05:00, chris@stripped +26 -8
Added passing and failing tests
mysql-test/suite/falcon/t/disabled.def@stripped, 2007-11-01 15:43:37-05:00, chris@stripped +1 -2
Enabled 22564
mysql-test/suite/falcon/t/falcon_bug_22564.test@stripped, 2007-11-01 15:43:37-05:00, chris@stripped +25 -3
Added passing and failing tests
storage/falcon/ha_falcon.cpp@stripped, 2007-11-01 15:43:37-05:00, chris@stripped +1 -1
Removed HA_AUTO_PART_KEY from StorageInterface::table_flags().
Autoincrement columns are still allowed in multipart indexes,
but only as the first column of the index.
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22564.result b/mysql-test/suite/falcon/r/falcon_bug_22564.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22564.result 2007-09-20 10:43:04 -05:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_22564.result 2007-11-01 15:43:37 -05:00
@@ -1,13 +1,31 @@
SET storage_engine = Falcon;
*** Bug #22564 ***
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a int, b int auto_increment, key (a, b));
-INSERT INTO t1 VALUES (1, null);
-INSERT INTO t1 (a) VALUES (1), (2), (3);
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+CREATE TABLE t1 (a int auto_increment, b int, c int, key (a, b, c));
+INSERT INTO t1 VALUES (null, 1, 1);
+INSERT INTO t1 (b, c) VALUES (2,2), (3,3), (4,4);
SELECT * FROM t1 ORDER BY a;
-a b
-1 1
-1 2
-2 1
-3 1
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+CREATE TABLE t2 (a int, b int auto_increment, c int, key (b, a, c));
+INSERT INTO t2 VALUES (1, null, 1);
+INSERT INTO t2 (a, c) VALUES (2,2), (3,3), (4,4);
+SELECT * FROM t2 ORDER BY b;
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+CREATE TABLE t3 (a int, b int auto_increment, c int, key (a, b, c));
+ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
+SHOW TABLES;
+Tables_in_test
+t1
+t2
DROP TABLE t1;
+DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon/t/disabled.def b/mysql-test/suite/falcon/t/disabled.def
--- a/mysql-test/suite/falcon/t/disabled.def 2007-10-26 00:15:00 -05:00
+++ b/mysql-test/suite/falcon/t/disabled.def 2007-11-01 15:43:37 -05:00
@@ -23,7 +23,6 @@ falcon_bug_22173 : Bug#22173 2006-08-
falcon_bug_22182 : Disabled until runtime team provides RENAME DATABASE replacement. See WL#4030
falcon_bug_22187 : Bug#22187 2006-08-24 hakank (Get pushbuild green)
falcon_bug_22189 : Bug#22189 2006-08-24 hakank (Get pushbuild green)
-falcon_bug_22564 : Bug#22564 2006-10-07 hakank (Get pushbuild green)
falcon_bug_22845 : Bug#22845 2006-10-07 hakank Currently hangs
falcon_bug_23692 : Bug#23692 2006-10-27 hakank Currently failing
falcon_bug_24024 : Bug#24024 2006-12-05 ML (Get pushbuild green)
@@ -31,7 +30,7 @@ falcon_bug_26058 : Bug#26058 2007-05-
falcon_bug_27997 : Bug#27997 2007-04-21 hakank Currently failing
falcon_bug_28006 : Bug#28006 2007-08-22 hakank Won't fix, see also Bug#15491
falcon_bug_28076 : Bug#28076 2007-04-25 klewis Currently failing
-falcon_bug_29151 : Bug#29151 2007-08-01 hakank Currently failing
+falcon_bug_29151_A : Bug#29151 Test A is failing, not catching the expected error
falcon_bug_29246 : Bug#29246 2007-06-21 hakank Currently failing
falcon_bug_30282 : Bug#30282 2007-08-21 hakank Currently failing
falcon_bug_30878 : Bug#30878 2007-09-06 cpowers Currently failing (server bug)
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22564.test b/mysql-test/suite/falcon/t/falcon_bug_22564.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22564.test 2007-09-28 23:30:36 -05:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_22564.test 2007-11-01 15:43:37 -05:00
@@ -3,16 +3,38 @@ SET storage_engine = Falcon;
#
# Bug #22564: auto_increment column gets automatically incremented
#
+# Multi-part key can only have autoincrement in first column
+#
+# Acceptable: key (a, b, c) a = autoincrement
+# Acceptable: key (b, a, c) b = autoincrement
+# Not acceptable: key (a, b, c) b = autoincrement
+#
+
--echo *** Bug #22564 ***
--disable_warnings
DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
--enable_warnings
-CREATE TABLE t1 (a int, b int auto_increment, key (a, b));
+CREATE TABLE t1 (a int auto_increment, b int, c int, key (a, b, c));
-INSERT INTO t1 VALUES (1, null);
-INSERT INTO t1 (a) VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (null, 1, 1);
+INSERT INTO t1 (b, c) VALUES (2,2), (3,3), (4,4);
SELECT * FROM t1 ORDER BY a;
+CREATE TABLE t2 (a int, b int auto_increment, c int, key (b, a, c));
+
+INSERT INTO t2 VALUES (1, null, 1);
+INSERT INTO t2 (a, c) VALUES (2,2), (3,3), (4,4);
+SELECT * FROM t2 ORDER BY b;
+
+--error ER_WRONG_AUTO_KEY
+CREATE TABLE t3 (a int, b int auto_increment, c int, key (a, b, c));
+
+SHOW TABLES;
+
# Final cleanup.
DROP TABLE t1;
+DROP TABLE t2;
+
diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp 2007-10-31 02:06:51 -05:00
+++ b/storage/falcon/ha_falcon.cpp 2007-11-01 15:43:37 -05:00
@@ -614,7 +614,7 @@ const char **StorageInterface::bas_ext(v
ulonglong StorageInterface::table_flags(void) const
{
DBUG_ENTER("StorageInterface::table_flags");
- DBUG_RETURN(HA_REC_NOT_IN_SEQ | HA_NULL_IN_KEY | HA_AUTO_PART_KEY |
+ DBUG_RETURN(HA_REC_NOT_IN_SEQ | HA_NULL_IN_KEY | // HA_AUTO_PART_KEY |
HA_PARTIAL_COLUMN_READ | HA_CAN_GEOMETRY | HA_BINLOG_ROW_CAPABLE);
}
| Thread |
|---|
| • bk commit into 6.0 tree (chris:1.2657) BUG#22564 | cpowers | 1 Nov |