diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-07-08 19:39:27 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-07-08 19:39:27 +0200 |
commit | 086a81986bfa5b1a6c3d0594a1e4017e45d51e42 (patch) | |
tree | 9aa85b4a9ebfae62f92f7efda981cd755f40d457 /sql/create_options.cc | |
parent | 5045615cd945b137c1f6b7c5e4c1bb960eb3b287 (diff) | |
download | mariadb-git-086a81986bfa5b1a6c3d0594a1e4017e45d51e42.tar.gz |
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
Diffstat (limited to 'sql/create_options.cc')
-rw-r--r-- | sql/create_options.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/create_options.cc b/sql/create_options.cc index d60639a4f4a..09153f7e35c 100644 --- a/sql/create_options.cc +++ b/sql/create_options.cc @@ -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; +} + |