Commit 74f5aa16 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-19237 - Fix assertion in should_send_column_info

COM_STMT_BULK_EXECUTE, just like COM_STMT_EXECUTE can also skip result set
metadata, if bulk is used with statement that returns result set, i.e
INSERT/DELETE RETURNING.
parent e7f4daf8
......@@ -1136,7 +1136,8 @@ static bool should_send_column_info(THD* thd, List<Item>* list, uint flags)
auto cmd= thd->get_command();
#endif
DBUG_ASSERT(cmd == COM_STMT_EXECUTE || cmd == COM_STMT_PREPARE);
DBUG_ASSERT(cmd == COM_STMT_EXECUTE || cmd == COM_STMT_PREPARE
|| cmd == COM_STMT_BULK_EXECUTE);
DBUG_ASSERT(cmd != COM_STMT_PREPARE || !column_info_state.initialized);
bool ret= metadata_columns_changed(column_info_state, thd, *list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment