summaryrefslogtreecommitdiff
path: root/sql/sql_yacc_ora.yy
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-10-17 14:08:33 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-10-17 17:32:14 +0200
commitde2186dd2f5937a56d799f55c33078a7ad8ebddc (patch)
tree7b44a00f8fb8dcbea6145a0ae2fecf0cc764ac72 /sql/sql_yacc_ora.yy
parent6cdde9ebbf59254a81f04961818577ffd203f9d6 (diff)
downloadmariadb-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_ora.yy')
-rw-r--r--sql/sql_yacc_ora.yy13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy
index f33ef8cfc68..12ac95dedee 100644
--- a/sql/sql_yacc_ora.yy
+++ b/sql/sql_yacc_ora.yy
@@ -7825,6 +7825,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
{
@@ -13420,7 +13421,9 @@ insert:
Lex->current_select= &Lex->select_lex;
}
insert_field_spec opt_insert_update
- {}
+ {
+ Lex->mark_first_table_as_inserting();
+ }
;
replace:
@@ -13437,7 +13440,9 @@ replace:
Lex->current_select= &Lex->select_lex;
}
insert_field_spec
- {}
+ {
+ Lex->mark_first_table_as_inserting();
+ }
;
insert_lock_option:
@@ -14826,7 +14831,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: