Commit 2b8de050 authored by Sergei Golubchik's avatar Sergei Golubchik

create table options bug:

alter table does not reset HA_OPTION_TEXT_CREATE_OPTIONS when the last option value is removed
parent b58cb7c4
...@@ -111,6 +111,12 @@ Table Create Table ...@@ -111,6 +111,12 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660 ) 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; DROP TABLE t1;
SET @@SQL_MODE=@OLD_SQL_MODE; SET @@SQL_MODE=@OLD_SQL_MODE;
select 1; select 1;
......
...@@ -119,6 +119,10 @@ CREATE TABLE t1 (a int) ENGINE=example ULL=1e2; ...@@ -119,6 +119,10 @@ CREATE TABLE t1 (a int) ENGINE=example ULL=1e2;
CREATE TABLE t1 (a int) ENGINE=example ULL=0x1234; CREATE TABLE t1 (a int) ENGINE=example ULL=0x1234;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
ALTER TABLE t1 ULL=DEFAULT;
SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
SET @@SQL_MODE=@OLD_SQL_MODE; SET @@SQL_MODE=@OLD_SQL_MODE;
......
...@@ -197,6 +197,8 @@ bool mysql_create_frm(THD *thd, const char *file_name, ...@@ -197,6 +197,8 @@ bool mysql_create_frm(THD *thd, const char *file_name,
create_info->table_options|= HA_OPTION_TEXT_CREATE_OPTIONS; create_info->table_options|= HA_OPTION_TEXT_CREATE_OPTIONS;
create_info->extra_size+= (options_len + 4); 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, if ((file=create_frm(thd, file_name, db, table, reclength, fileinfo,
create_info, keys)) < 0) create_info, keys)) < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment