mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-34958: after Trigger doesn't work correctly with bulk insert
This bug has the same nature as the issues MDEV-34718: Trigger doesn't work correctly with bulk update MDEV-24411: Trigger doesn't work correctly with bulk insert To fix the issue covering all use cases, resetting the thd->bulk_param temporary to the value nullptr before invoking triggers and restoring its original value on finishing execution of a trigger is moved to the method Table_triggers_list::process_triggers that be invoked ultimately for any kind of triggers.
This commit is contained in:
@ -1161,19 +1161,14 @@ error:
|
||||
rows_inserted++;
|
||||
}
|
||||
|
||||
void *save_bulk_param= thd->bulk_param;
|
||||
thd->bulk_param= nullptr;
|
||||
|
||||
if (table->triggers &&
|
||||
unlikely(table->triggers->process_triggers(thd, TRG_EVENT_UPDATE,
|
||||
TRG_ACTION_AFTER, TRUE)))
|
||||
{
|
||||
error= 1;
|
||||
thd->bulk_param= save_bulk_param;
|
||||
|
||||
break;
|
||||
}
|
||||
thd->bulk_param= save_bulk_param;
|
||||
|
||||
if (!--limit && using_limit)
|
||||
{
|
||||
|
Reference in New Issue
Block a user