diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-15 23:53:41 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-15 23:53:41 +0200 |
commit | a2d795c18598db8fc1db58f96597568ae9ecdcaa (patch) | |
tree | bcfa00698d5aa2a8edb15a0c9e547fccbb97679b /sql/handler.cc | |
parent | 0973b7a8d20751b56c8ca3f861ea2fbf060e5ab3 (diff) | |
download | mariadb-git-a2d795c18598db8fc1db58f96597568ae9ecdcaa.tar.gz |
MDEV-4450 misleading error messages from init_from_sql_statement_string()
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 069e1369df3..f59fdddd54a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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 |