Below is the list of changes that have just been committed into a local
6.0 repository of . When 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, 2008-01-21 21:27:23+01:00, vvaintroub@vaio. +4 -0
Bug#33662 - Autoincrement value is not shown in "show create table"
Fixed by implementing update_create_info() and returning autoincrement
value in the corresponding field in HA_CREATE_INFO structure.
The implementation here is identical to that of other engines
(innodb, myisam, heap)
mysql-test/suite/falcon/r/falcon_bug_33662.result@stripped, 2008-01-21 21:27:17+01:00,
vvaintroub@vaio. +19 -0
test case for bug 33662
mysql-test/suite/falcon/r/falcon_bug_33662.result@stripped, 2008-01-21 21:27:17+01:00,
vvaintroub@vaio. +0 -0
mysql-test/suite/falcon/t/falcon_bug_33662.test@stripped, 2008-01-21 21:27:18+01:00,
vvaintroub@vaio. +32 -0
test case for bug 33662
mysql-test/suite/falcon/t/falcon_bug_33662.test@stripped, 2008-01-21 21:27:18+01:00,
vvaintroub@vaio. +0 -0
storage/falcon/ha_falcon.cpp@stripped, 2008-01-21 21:27:14+01:00, vvaintroub@vaio. +10 -0
Implement update_create_info() and return autoincrement value in it.
storage/falcon/ha_falcon.h@stripped, 2008-01-21 21:27:15+01:00, vvaintroub@vaio. +1 -0
Implement update_create_info() and return autoincrement value in it.
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_33662.result
b/mysql-test/suite/falcon/r/falcon_bug_33662.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_33662.result 2008-01-21 21:27:17 +01:00
@@ -0,0 +1,19 @@
+*** Bug #33662 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (i int NOT NULL AUTO_INCREMENT, PRIMARY KEY (i)) AUTO_INCREMENT=2
+DEFAULT CHARSET=latin1;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`i`)
+) ENGINE=Falcon AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES();
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`i`)
+) ENGINE=Falcon AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_33662.test
b/mysql-test/suite/falcon/t/falcon_bug_33662.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_33662.test 2008-01-21 21:27:18 +01:00
@@ -0,0 +1,32 @@
+#
+# Bug #33662: autoincrement value not show in "show create table"
+#
+--echo *** Bug #33662 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+CREATE TABLE t1 (i int NOT NULL AUTO_INCREMENT, PRIMARY KEY (i)) AUTO_INCREMENT=2
+DEFAULT CHARSET=latin1;
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+SHOW CREATE TABLE t1;
+
+INSERT INTO t1 VALUES();
+#--check auto_increment is 3 after insert
+SHOW CREATE TABLE t1;
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;
diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp 2008-01-09 20:24:21 +01:00
+++ b/storage/falcon/ha_falcon.cpp 2008-01-21 21:27:14 +01:00
@@ -644,6 +644,16 @@ const char **StorageInterface::bas_ext(v
DBUG_RETURN(falcon_extensions);
}
+void StorageInterface::update_create_info(HA_CREATE_INFO* create_info)
+{
+ DBUG_ENTER("StorageInterface::update_create_info");
+ if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
+ {
+ StorageInterface::info(HA_STATUS_AUTO);
+ create_info->auto_increment_value = stats.auto_increment_value;
+ }
+ DBUG_VOID_RETURN;
+}
ulonglong StorageInterface::table_flags(void) const
{
diff -Nrup a/storage/falcon/ha_falcon.h b/storage/falcon/ha_falcon.h
--- a/storage/falcon/ha_falcon.h 2007-12-03 05:35:54 +01:00
+++ b/storage/falcon/ha_falcon.h 2008-01-21 21:27:15 +01:00
@@ -92,6 +92,7 @@ public:
virtual int add_index(TABLE* table_arg, KEY* key_info, uint num_of_keys);
virtual bool check_if_incompatible_data(HA_CREATE_INFO* create_info, uint
table_changes);
virtual int reset_auto_increment(ulonglong value);
+ virtual void update_create_info(HA_CREATE_INFO* create_info);
virtual const COND* cond_push(const COND* cond);
virtual int optimize(THD* thd, HA_CHECK_OPT* check_opt);
#ifdef TRUNCATE_ENABLED
| Thread |
|---|
| • bk commit into 6.0 tree (vvaintroub:1.2776) BUG#33662 | Vladislav Vaintroub | 21 Jan |