Bug #30164: Using client side macro inside server side comments generates broken queries
Problem: In cases when a client-side macro appears inside a server-side comment, the add_line() function in mysql.cc discarded all characters until the next delimiter to remove macro arguments from the query string. This resulted in broken queries being sent to the server when the next delimiter character appeared past the comment's boundaries, because the comment closing sequence ('*/') was discarded. Fix: If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro (that is, until the end of the comment rather than the next delimiter). This is a minimal fix to allow only simple cases used by the mysqlbinlog utility. Limitations that are worth documenting: - Nested server-side and/or client-side comments are not supported by mysql.cc - Using client-side macros in multi-line server-side comments is not supported - All characters after a client-side macro in a server-side comment will be omitted from the query string (and thus, will not be sent to server).
Showing
Please register or sign in to comment