diff options
author | Igor Babaev <igor@askmonty.org> | 2013-01-23 15:18:05 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-01-23 15:18:05 -0800 |
commit | 32151409c13ddc09ebda7cd02fdfe40db290503e (patch) | |
tree | 86997a41bbc6c4379209af0cccdb4ae612c8d4f4 /sql/table.cc | |
parent | f1e758dc6f4183a8e3856d21c95f7e4973c585c1 (diff) | |
parent | 746152959a8787f3c7cf6b1c710fc1ee6c54419f (diff) | |
download | mariadb-git-32151409c13ddc09ebda7cd02fdfe40db290503e.tar.gz |
Merge 5.3->5.5
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 a36a6d19484..fba45f421ed 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2138,9 +2138,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 @@ -2169,6 +2171,7 @@ end: TRUE Otherwise */ bool unpack_vcol_info_from_frm(THD *thd, + MEM_ROOT *mem_root, TABLE *table, Field *field, LEX_STRING *vcol_expr, @@ -2196,7 +2199,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))) { @@ -2230,10 +2233,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::STMT_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; @@ -2491,6 +2494,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, |