MDEV-5867 ALTER TABLE t1 ENGINE=InnoDB keeps bad options when t1 ENGINE is CONNECT

Comment out unknown options in SHOW CREATE TABLE unless IGNORE_BAD_TABLE_OPTIONS is used
This commit is contained in:
Sergei Golubchik 2014-07-08 19:39:27 +02:00
commit 086a81986b
9 changed files with 142 additions and 7 deletions

View file

@ -775,3 +775,20 @@ engine_option_value *merge_engine_table_options(engine_option_value *first,
&first, &end);
DBUG_RETURN(first);
}
bool is_engine_option_known(engine_option_value *opt,
ha_create_table_option *rules)
{
if (!rules)
return false;
for (; rules->name; rules++)
{
if (!my_strnncoll(system_charset_info,
(uchar*)rules->name, rules->name_length,
(uchar*)opt->name.str, opt->name.length))
return true;
}
return false;
}