From cef2b34f25b45198868be0c06e00a74a1c1ad062 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 3 Dec 2019 15:28:41 +0300 Subject: MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED Wrong assertion condition. SYSTEM_TIME_ALL indicates that vers_setup_conds() is done. In case FOR SYSTEM_TIME ALL is specified in command the assertion passes but not checks anything. --- sql/sql_update.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index d3b771acdad..10b62af3d6f 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1266,7 +1266,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list, DBUG_ASSERT(table_list->table); // conds could be cached from previous SP call - DBUG_ASSERT(!table_list->vers_conditions.is_set() || + DBUG_ASSERT(!table_list->vers_conditions.need_setup() || !*conds || thd->stmt_arena->is_stmt_execute()); if (select_lex->vers_setup_conds(thd, table_list)) DBUG_RETURN(TRUE); -- cgit v1.2.1