Browse Source
MDEV-6603 SBR failure upon executing a prepared statement with input placeholder under anonymous block
MDEV-6603 SBR failure upon executing a prepared statement with input placeholder under anonymous block
Normally, Prepared_statement object rewrites the query on execution to replace ?-placeholders with values. The rewritten query may be written to logs (including binlog) or stored in the query cache. But for compound statements, the whole block is prepared and executed, while contained statements are logged individually. So it doesn't make sense to rewrite the original statement block. Instead, we need to rewrite every contained statement. SP is already doing it to replace SP variables with values. Let it rewrite PS parameters too in the same loop.pull/69/head
5 changed files with 97 additions and 14 deletions
-
44mysql-test/r/compound.result
-
35mysql-test/t/compound.test
-
26sql/sp_head.cc
-
2sql/sql_prepare.cc
-
4sql/sql_yacc.yy
Write
Preview
Loading…
Cancel
Save
Reference in new issue