1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database

* failed init_from_binary_frm_image can clear share->db_plugin,
  don't use it on the error path
* cleanup the test a bit
This commit is contained in:
Sergei Golubchik
2021-01-10 21:51:36 +01:00
parent 0ee086838d
commit 3ffd5f28f0
3 changed files with 25 additions and 16 deletions

View File

@@ -2869,9 +2869,8 @@ ret:
if (unlikely(thd->is_error() || error))
{
thd->clear_error();
my_error(ER_SQL_DISCOVER_ERROR, MYF(0),
plugin_name(db_plugin)->str, db.str, table_name.str,
sql_copy);
my_error(ER_SQL_DISCOVER_ERROR, MYF(0), hton_name(hton)->str,
db.str, table_name.str, sql_copy);
DBUG_RETURN(HA_ERR_GENERIC);
}
/* Treat the table as normal table from binary logging point of view */