1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19653 Add class Sql_cmd_create_table

This commit is contained in:
Alexander Barkov
2019-05-31 15:24:40 +04:00
parent dd939d6f7e
commit 5a19908b95
8 changed files with 425 additions and 304 deletions

View File

@ -211,6 +211,40 @@ redo:
}
bool
Storage_engine_name::resolve_storage_engine_with_error(THD *thd,
handlerton **ha,
bool tmp_table)
{
#if MYSQL_VERSION_ID < 100300
/*
Please remove tmp_name when merging to 10.3 and pass m_storage_engine_name
directly to ha_resolve_by_name().
*/
LEX_STRING tmp_name;
tmp_name.str= const_cast<char*>(m_storage_engine_name.str);
tmp_name.length= m_storage_engine_name.length;
#endif
if (plugin_ref plugin= ha_resolve_by_name(thd, &tmp_name, tmp_table))
{
*ha= plugin_hton(plugin);
return false;
}
*ha= NULL;
if (thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION)
{
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), m_storage_engine_name.str);
return true;
}
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_UNKNOWN_STORAGE_ENGINE,
ER_THD(thd, ER_UNKNOWN_STORAGE_ENGINE),
m_storage_engine_name.str);
return false;
}
plugin_ref ha_lock_engine(THD *thd, const handlerton *hton)
{
if (hton)