maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #03013
Rev 2785: create table options bug: in http://bazaar.launchpad.net/~maria-captains/maria/5.2/
At http://bazaar.launchpad.net/~maria-captains/maria/5.2/
------------------------------------------------------------
revno: 2785
revision-id: sergii@xxxxxxxxx-20100430200435-1wr1ghgs9ahga0wg
parent: sergii@xxxxxxxxx-20100430101225-dhby6azvhpef1vme
committer: Sergei Golubchik <sergii@xxxxxxxxx>
branch nick: 5.2
timestamp: Fri 2010-04-30 22:04:35 +0200
message:
create table options bug:
alter table does not reset HA_OPTION_TEXT_CREATE_OPTIONS when the last option value is removed
=== modified file 'mysql-test/r/plugin.result'
--- a/mysql-test/r/plugin.result 2010-04-30 10:12:25 +0000
+++ b/mysql-test/r/plugin.result 2010-04-30 20:04:35 +0000
@@ -111,6 +111,12 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660
+ALTER TABLE t1 ULL=DEFAULT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1
DROP TABLE t1;
SET @@SQL_MODE=@OLD_SQL_MODE;
select 1;
=== modified file 'mysql-test/t/plugin.test'
--- a/mysql-test/t/plugin.test 2010-04-30 10:12:25 +0000
+++ b/mysql-test/t/plugin.test 2010-04-30 20:04:35 +0000
@@ -119,6 +119,10 @@ CREATE TABLE t1 (a int) ENGINE=example U
CREATE TABLE t1 (a int) ENGINE=example ULL=0x1234;
SHOW CREATE TABLE t1;
+
+ALTER TABLE t1 ULL=DEFAULT;
+SHOW CREATE TABLE t1;
+
DROP TABLE t1;
SET @@SQL_MODE=@OLD_SQL_MODE;
=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc 2010-04-08 12:10:05 +0000
+++ b/sql/unireg.cc 2010-04-30 20:04:35 +0000
@@ -197,6 +197,8 @@ bool mysql_create_frm(THD *thd, const ch
create_info->table_options|= HA_OPTION_TEXT_CREATE_OPTIONS;
create_info->extra_size+= (options_len + 4);
}
+ else
+ create_info->table_options&= ~HA_OPTION_TEXT_CREATE_OPTIONS;
if ((file=create_frm(thd, file_name, db, table, reclength, fileinfo,
create_info, keys)) < 0)