mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-30003 Assertion failure upon 2nd execution of SP trying to set collation on non-existing database
The DBUG_ASSER in HA_CREATE_INFO::resolve_to_charset_collation_context() didn't take into account that the second execution is possible not only during a prepared EXECUTE, but also during a CALL.
This commit is contained in:
@ -12533,7 +12533,9 @@ bool HA_CREATE_INFO::
|
||||
else
|
||||
{
|
||||
// Make sure we don't do double resolution in direct SQL execution
|
||||
DBUG_ASSERT(!default_table_charset || thd->stmt_arena->is_stmt_execute());
|
||||
DBUG_ASSERT(!default_table_charset ||
|
||||
thd->stmt_arena->is_stmt_execute() ||
|
||||
thd->stmt_arena->state == Query_arena::STMT_INITIALIZED_FOR_SP);
|
||||
if (!(default_table_charset=
|
||||
default_cscl.resolved_to_context(ctx)))
|
||||
return true;
|
||||
@ -12545,7 +12547,8 @@ bool HA_CREATE_INFO::
|
||||
{
|
||||
// Make sure we don't do double resolution in direct SQL execution
|
||||
DBUG_ASSERT(!alter_table_convert_to_charset ||
|
||||
thd->stmt_arena->is_stmt_execute());
|
||||
thd->stmt_arena->is_stmt_execute() ||
|
||||
thd->stmt_arena->state == Query_arena::STMT_INITIALIZED_FOR_SP);
|
||||
if (!(alter_table_convert_to_charset=
|
||||
convert_cscl.resolved_to_context(ctx)))
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user