1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/sql/sql_insert.cc
Oleksandr Byelkin 99ce6f6977 MDEV-23864 BULK insert wrong values when command contain inner select
Optimized array binding INSERT/REPLACE executes the statement once,
so subqueries are executed with the first set of parameters only.

Execute INSERT/REPLACE, where a subquery result depends on parameters,
for every set of parameters (as not optimized array binding commands
are executed), keeping the first generated id as the result of the
whole operation.
Per-row execution also needs warnings counted once, RETURNING metadata
sent once (also after reprepare), and an error allowed after
successful rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:48:04 +02:00

186 KiB