Commit 6b0f4c24 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: unpack_vcol_info_from_frm

* do setup/cleanup for charset and arena only once per table
  not for every vcol
* don't copy every vcol expression into table's memroot for parsing,
  do it in a temporary String buffer that is freed at the end
* add asserts
parent a72f1deb
......@@ -6221,7 +6221,7 @@ vcol_attribute:
;
parse_vcol_expr:
PARSE_VCOL_EXPR_SYM virtual_column_func
PARSE_VCOL_EXPR_SYM
{
/*
"PARSE_VCOL_EXPR" can only be used by the SQL server
......@@ -6229,7 +6229,13 @@ parse_vcol_expr:
Prevent the end user from invoking this command.
*/
MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
Lex->last_field->vcol_info= $2;
}
expr
{
Virtual_column_info *v= add_virtual_expression(thd, $3);
if (!v)
MYSQL_YYABORT;
Lex->last_field->vcol_info= v;
}
;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment