Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4
-
None
-
None
Description
Found by code review, not reproduced (no Galera setup).
In Prepared_statement::execute_bulk_loop() the reprepare is in the else branch of the WSREP check:
#ifdef WITH_WSREP
|
if (!bulk_optimized && WSREP(thd)) // !CF_PS_ARRAY_BINDING_OPTIMIZED before MDEV-23864 |
{
|
if (wsrep_after_statement(thd)) |
{ ... }
|
}
|
else |
#endif /* WITH_WSREP */
|
if (unlikely(error) && |
(sql_command_flags[lex->sql_command] & CF_REEXECUTION_FRAGILE) &&
|
... reprepare_observer.is_invalidated() ...)
|
{
|
thd->clear_error();
|
error= reprepare();
|
...
|
So on a Galera node a bulk UPDATE/DELETE (and, after MDEV-23864, INSERT/REPLACE with a subquery depending on a parameter) whose tables changed after PREPARE should return ER_NEED_REPREPARE to the client instead of being reprepared. Prepared_statement::execute_loop() reprepares in this case.
Attachments
Issue Links
- relates to
-
MDEV-23864 BULK insert wrong values when command contain inner select
-
- Closed
-