1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-4786 - merge 10.0-monty - 10.0

Fixed connect.grant failure.

sql/create_options.cc:
  Keep "first" list intact, allocate new list for merge result.
  
  Normally "first" is options list on TABLE_SHARE. ALTER TABLE may fail
  after the merge and leave share with corrupt list in the table definition
  cache.
sql/create_options.h:
  Construct engine_option_value from another engine_option_value.
This commit is contained in:
Sergey Vojtovich
2013-07-26 23:02:48 +04:00
parent 62feb0c5ae
commit b3a1f42043
2 changed files with 10 additions and 3 deletions

View File

@ -743,9 +743,9 @@ engine_option_value *merge_engine_table_options(engine_option_value *first,
DBUG_ENTER("merge_engine_table_options");
LINT_INIT(end);
/* find last element */
if (first && second)
for (end= first; end->next; end= end->next) /* no-op */;
/* Create copy of first list */
for (opt= first, first= 0; opt; opt= opt->next)
new (root) engine_option_value(opt, &first, &end);
for (opt= second; opt; opt= opt->next)
new (root) engine_option_value(opt->name, opt->value, opt->quoted_value,