mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Binding DEFAULT to a LIMIT ? placeholder via EXECUTE ... USING is never rejected at bind time. unit->set_limit() later evaluates it and sets ER_INVALID_DEFAULT_PARAM in the Diagnostics_area, but SQLCOM_UPDATE (and SQLCOM_UPDATE_MULTI, SQLCOM_INSERT_SELECT/REPLACE_SELECT) proceeded into open_tables() regardless. A concurrent metadata change (e.g. ALTER TABLE FORCE) then triggers Reprepare_observer::report_error(), which tries to set ER_NEED_REPREPARE on an already-set DA and hits the assert. Add the same thd->is_error() check after unit->set_limit() (as in SQLCOM_DELETE), aborting before open_tables() is reached.
336 KiB
336 KiB