Skip to content

Commit 74f5aa1

Browse files
committed
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.
1 parent e7f4daf commit 74f5aa1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/protocol.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,8 @@ static bool should_send_column_info(THD* thd, List<Item>* list, uint flags)
11361136
auto cmd= thd->get_command();
11371137
#endif
11381138

1139-
DBUG_ASSERT(cmd == COM_STMT_EXECUTE || cmd == COM_STMT_PREPARE);
1139+
DBUG_ASSERT(cmd == COM_STMT_EXECUTE || cmd == COM_STMT_PREPARE
1140+
|| cmd == COM_STMT_BULK_EXECUTE);
11401141
DBUG_ASSERT(cmd != COM_STMT_PREPARE || !column_info_state.initialized);
11411142

11421143
bool ret= metadata_columns_changed(column_info_state, thd, *list);

0 commit comments

Comments
 (0)