mirror of
https://github.com/MariaDB/server.git
synced 2025-12-28 00:01:00 +00:00
Executing an INSERT statement in PS mode having positional parameter bound with an array could result in incorrect number of inserted rows in case there is a BEFORE INSERT trigger that executes yet another INSERT statement to put a copy of row being inserted into some table. The reason for incorrect number of inserted rows is that a data structure used for binding positional argument with its actual values is stored in THD (this is thd->bulk_param) and reused on processing every INSERT statement. It leads to consuming actual values bound with top-level INSERT statement by other INSERT statements used by triggers' body. To fix the issue, reset the thd->bulk_param temporary to the value nullptr before invoking triggers and restore its value on finishing its execution. |
||
|---|---|---|
| .. | ||
| code_quality | ||
| async_queries.c | ||
| auto_increment.res | ||
| auto_increment.tst | ||
| big_record.pl | ||
| bug25714.c | ||
| check_async_queries.pl | ||
| CMakeLists.txt | ||
| connect_test.c | ||
| consistent_snapshot.pl | ||
| deadlock_test.c | ||
| drop_test.pl | ||
| export.pl | ||
| fork2_test.pl | ||
| fork_big2.pl | ||
| fork_big.pl | ||
| function.res | ||
| function.tst | ||
| grant.res | ||
| index_corrupt.pl | ||
| insert_and_repair.pl | ||
| insert_test.c | ||
| list_test.c | ||
| lock_test.pl | ||
| lock_test.res | ||
| mail_to_db.pl | ||
| myisam-big-rows.tst | ||
| mysql_client_fw.c | ||
| mysql_client_test.c | ||
| nonblock-wrappers.h | ||
| pmail.pl | ||
| rename_test.pl | ||
| restore-lock.smack | ||
| select_test.c | ||
| showdb_test.c | ||
| ssl_test.c | ||
| table_types.pl | ||
| test_delayed_insert.pl | ||
| thread_test.c | ||
| truncate.pl | ||