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_delete.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_delete.cc') diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 78bccd7a506..929455977e6 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -919,7 +919,7 @@ int mysql_prepare_delete(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