Commit 8c54182e authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-7926 Server crashes in get_geometry_column_record on concurrent SELECT...

MDEV-7926 Server crashes in get_geometry_column_record on concurrent SELECT FROM I_S.GEOMETRY_COLUMNS with join and DDL.
         The bug was that open_tables() returned error in case of
        thd->killed() without properly calling thd->send_kill_message()
        to set the correct error. This was fixed already in get_schema_column_record,
        so the code was just copied to get_geometry_column_record.
parent 58e8db2e
......@@ -373,6 +373,23 @@ static int get_geometry_column_record(THD *thd, TABLE_LIST *tables,
Field **ptr, *field;
DBUG_ENTER("get_geometry_column_record");
if (res)
{
if (thd->lex->sql_command != SQLCOM_SHOW_FIELDS)
{
/*
I.e. we are in SELECT FROM INFORMATION_SCHEMA.COLUMS
rather than in SHOW COLUMNS
*/
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
thd->get_stmt_da()->sql_errno(),
thd->get_stmt_da()->message());
thd->clear_error();
res= 0;
}
DBUG_RETURN(res);
}
if (tables->schema_table)
goto exit;
show_table= tables->table;
......
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