diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-03-29 03:32:30 +0100 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-03-29 03:32:30 +0100 |
commit | 28e95ba535e175dc696fe7a739736ae9bf2a2b36 (patch) | |
tree | 6d2d62ce4463efb41a7a237232d44360c9cce500 /sql/sp_head.cc | |
parent | 454c003a5c5a31a8d59ba4ab54d3b3a90a609752 (diff) | |
download | mariadb-git-28e95ba535e175dc696fe7a739736ae9bf2a2b36.tar.gz |
Bug#48525: trigger changes "Column 'id' cannot be null" behaviour
CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL;
UPDATE...SET...NULL on NOT NULL fields behaved differently after
a trigger.
Now distinguishes between IGNORE and ERROR_FOR_NULL and save/restores
check-field options.
mysql-test/r/trigger.result:
Show that UPDATE...SET...NULL on NOT NULL columns doesn't behave differently
when run after a trigger.
mysql-test/t/trigger.test:
Show that UPDATE...SET...NULL on NOT NULL columns doesn't behave differently
when run after a trigger.
sql/field_conv.cc:
CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL.
Distinguish between the two.
sql/sp_head.cc:
Raise error as needed.
sql/sql_class.cc:
Save and restore check-fields options.
sql/sql_class.h:
Make room so we can save check-fields options.
sql/sql_insert.cc:
Raise error as needed.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 8a626cabd90..11d5e5f830b 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -3009,6 +3009,7 @@ int sp_instr_set_trigger_field::execute(THD *thd, uint *nextp) { DBUG_ENTER("sp_instr_set_trigger_field::execute"); + thd->count_cuted_fields= CHECK_FIELD_ERROR_FOR_NULL; DBUG_RETURN(m_lex_keeper.reset_lex_and_exec_core(thd, nextp, TRUE, this)); } |