summaryrefslogtreecommitdiff
path: root/sql/create_options.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2013-07-26 23:02:48 +0400
committerSergey Vojtovich <svoj@mariadb.org>2013-07-26 23:02:48 +0400
commitb3a1f420439a1b7b8a151ca04d5c5e136c589006 (patch)
tree34a937f50ed6a0e380de767723dd8270ee178c12 /sql/create_options.cc
parent62feb0c5aea9deed8da70774e0674fb459a84e34 (diff)
downloadmariadb-git-b3a1f420439a1b7b8a151ca04d5c5e136c589006.tar.gz
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.
Diffstat (limited to 'sql/create_options.cc')
-rw-r--r--sql/create_options.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/create_options.cc b/sql/create_options.cc
index d956d01aa66..774d739f153 100644
--- a/sql/create_options.cc
+++ b/sql/create_options.cc
@@ -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,