summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy13
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 6b9676c8124..8181521969a 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -7569,6 +7569,7 @@ sys_option_value:
{
/* We are in trigger and assigning value to field of new row */
Item *it;
+ Item_trigger_field *trg_fld;
sp_instr_set_trigger_field *i;
if ($1)
{
@@ -7589,17 +7590,19 @@ sys_option_value:
it= new Item_null();
}
- if (!(i= new sp_instr_set_trigger_field(
- lex->sphead->instructions(), lex->spcont,
- $2.base_name, it)))
+ if (!(trg_fld= new Item_trigger_field(Item_trigger_field::NEW_ROW,
+ $2.base_name.str)) ||
+ !(i= new sp_instr_set_trigger_field(
+ lex->sphead->instructions(), lex->spcont,
+ trg_fld, it)))
YYABORT;
/*
Let us add this item to list of all Item_trigger_field
objects in trigger.
*/
- lex->trg_table_fields.link_in_list((byte *)&i->trigger_field,
- (byte **)&i->trigger_field.next_trg_field);
+ lex->trg_table_fields.link_in_list((byte *)trg_fld,
+ (byte **)&trg_fld->next_trg_field);
lex->sphead->add_instr(i);
}