Commit cd66c5c
Ajo Robert
Bug#37337527 >= 8.0.27 Error 1048 when updating row with empty_sql mode
An UPDATE following an INSERT on tables with before insert trigger
can sometime fail with null value error if the INSERT had added a null
value to non-null column. This happens when null values are inserted
into non-null fields under allowed sql_mode.
The before insert trigger sets tmp_null flag for the non-null field
indicating the temporary null status as part of the insert. This flag
is not reset at the end of trigger processing and used during the
subsequent UPDATE command. This unexpected null flag is causing
the update to fail with null-value error even though the update is
not handling any null.
Fix: Reset the tmp_null flag at the end of insert trigger flow processing.
Change-Id: If9524a7aee17130ee53becbe47229f50bdbc49d21 parent a7ea07e commit cd66c5c
File tree
5 files changed
+42
-1
lines changed- mysql-test
- r
- t
- sql
5 files changed
+42
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3417 | 3417 | | |
3418 | 3418 | | |
3419 | 3419 | | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4109 | 4109 | | |
4110 | 4110 | | |
4111 | 4111 | | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9880 | 9880 | | |
9881 | 9881 | | |
9882 | 9882 | | |
| 9883 | + | |
| 9884 | + | |
9883 | 9885 | | |
9884 | | - | |
| 9886 | + | |
9885 | 9887 | | |
9886 | 9888 | | |
9887 | 9889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
642 | 652 | | |
643 | 653 | | |
644 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
0 commit comments