1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-4450 misleading error messages from init_from_sql_statement_string()

This commit is contained in:
Sergei Golubchik
2013-06-15 23:53:41 +02:00
parent 0973b7a8d2
commit a2d795c185
4 changed files with 58 additions and 65 deletions

View File

@ -4336,8 +4336,13 @@ static my_bool discover_handlerton(THD *thd, plugin_ref plugin,
{
if (error)
{
DBUG_ASSERT(share->error); // MUST be always set for get_cached_table_share to work
my_error(ER_GET_ERRNO, MYF(0), error, plugin_name(plugin)->str);
DBUG_ASSERT(share->error); // get_cached_table_share needs that
/*
report an error, unless it is "generic" and a more
specific one was already reported
*/
if (error != HA_ERR_GENERIC || !thd->is_error())
my_error(ER_GET_ERRNO, MYF(0), error, plugin_name(plugin)->str);
share->db_plugin= 0;
}
else