diff options
author | Igor Babaev <igor@askmonty.org> | 2013-01-21 21:29:19 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-01-21 21:29:19 -0800 |
commit | 746152959a8787f3c7cf6b1c710fc1ee6c54419f (patch) | |
tree | fc887933e9d5aaf6d9c83d3e36bba237862c6e65 /sql/table.cc | |
parent | 2255132f200940186c6e9dfcedae6edb85e7cee7 (diff) | |
parent | 8127e631de90dddc25b3cdffe59e147333eb6c74 (diff) | |
download | mariadb-git-746152959a8787f3c7cf6b1c710fc1ee6c54419f.tar.gz |
Merge 5.2->5.3
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/table.cc b/sql/table.cc index abdd0b0f9e6..32549568086 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1916,9 +1916,11 @@ end: @brief Unpack the definition of a virtual column from its linear representation - @parm + @param thd The thread object @param + mem_root The mem_root object where to allocated memory + @param table The table containing the virtual column @param field The field for the virtual @@ -1947,6 +1949,7 @@ end: TRUE Otherwise */ bool unpack_vcol_info_from_frm(THD *thd, + MEM_ROOT *mem_root, TABLE *table, Field *field, LEX_STRING *vcol_expr, @@ -1972,7 +1975,7 @@ bool unpack_vcol_info_from_frm(THD *thd, "PARSE_VCOL_EXPR (<expr_string_from_frm>)". */ - if (!(vcol_expr_str= (char*) alloc_root(&table->mem_root, + if (!(vcol_expr_str= (char*) alloc_root(mem_root, vcol_expr->length + parse_vcol_keyword.length + 3))) { @@ -2006,10 +2009,10 @@ bool unpack_vcol_info_from_frm(THD *thd, We need to use CONVENTIONAL_EXECUTION here to ensure that any new items created by fix_fields() are not reverted. */ - Query_arena expr_arena(&table->mem_root, + Query_arena expr_arena(mem_root, Query_arena::CONVENTIONAL_EXECUTION); - if (!(vcol_arena= (Query_arena *) alloc_root(&table->mem_root, - sizeof(Query_arena)))) + if (!(vcol_arena= (Query_arena *) alloc_root(mem_root, + sizeof(Query_arena)))) goto err; *vcol_arena= expr_arena; table->expr_arena= vcol_arena; @@ -2265,6 +2268,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, if ((*field_ptr)->vcol_info) { if (unpack_vcol_info_from_frm(thd, + &outparam->mem_root, outparam, *field_ptr, &(*field_ptr)->vcol_info->expr_str, |