diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-01-10 21:51:36 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-01-12 10:25:04 +0100 |
commit | 3ffd5f28f04a34aadabb1966b861e6bc89f7fc73 (patch) | |
tree | 01a15495cd5f93f539f7c7319d52e16d9a5dbe21 /sql/table.cc | |
parent | 0ee086838d4b4497599d4e0822343269b682f913 (diff) | |
download | mariadb-git-3ffd5f28f04a34aadabb1966b861e6bc89f7fc73.tar.gz |
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
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc index 22cf3357ac7..254e2265633 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -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 */ |