diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-17 14:08:33 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-17 17:32:14 +0200 |
commit | de2186dd2f5937a56d799f55c33078a7ad8ebddc (patch) | |
tree | 7b44a00f8fb8dcbea6145a0ae2fecf0cc764ac72 /sql/sql_yacc.yy | |
parent | 6cdde9ebbf59254a81f04961818577ffd203f9d6 (diff) | |
download | mariadb-git-de2186dd2f5937a56d799f55c33078a7ad8ebddc.tar.gz |
MDEV-20074: Lost connection on update trigger
Instead of checking lex->sql_command which does not corect in case of triggers
mark tables for insert.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 00ab03cba26..235be9b0f89 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7888,6 +7888,7 @@ alter: MYSQL_YYABORT; Lex->select_lex.db= (Lex->select_lex.table_list.first)->db; Lex->create_last_non_select_table= Lex->last_table(); + Lex->mark_first_table_as_inserting(); } alter_commands { @@ -13459,7 +13460,9 @@ insert: Lex->current_select= &Lex->select_lex; } insert_field_spec opt_insert_update - {} + { + Lex->mark_first_table_as_inserting(); + } ; replace: @@ -13476,7 +13479,9 @@ replace: Lex->current_select= &Lex->select_lex; } insert_field_spec - {} + { + Lex->mark_first_table_as_inserting(); + } ; insert_lock_option: @@ -14859,7 +14864,9 @@ load: opt_xml_rows_identified_by opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec opt_load_data_set_spec - {} + { + Lex->mark_first_table_as_inserting(); + } ; data_or_xml: |