Commit 9cb0bb1d authored by Sergei Golubchik's avatar Sergei Golubchik

restore the error message that was changed by mistake

add a test case
parent 443aa52c
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
ERROR 42000: Unknown storage engine 'EXAMPLE'
INSTALL PLUGIN non_exist SONAME 'ha_example';
ERROR HY000: Can't find symbol 'non_exist' in library 'ha_example.so'
INSTALL PLUGIN example SONAME 'ha_example';
INSTALL PLUGIN EXAMPLE SONAME 'ha_example';
ERROR HY000: Plugin 'EXAMPLE' already installed
......
......@@ -4,6 +4,10 @@
--error ER_UNKNOWN_STORAGE_ENGINE
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
--replace_regex /\.dll/.so/
--error ER_CANT_FIND_DL_ENTRY
INSTALL PLUGIN non_exist SONAME 'ha_example';
INSTALL PLUGIN example SONAME 'ha_example';
--replace_regex /\.dll/.so/
--error ER_PLUGIN_INSTALLED
......
......@@ -1222,7 +1222,8 @@ static enum install_status plugin_add(MEM_ROOT *tmp_root, bool if_not_exists,
DBUG_ASSERT(!name->str || !dupes); // dupes is ONLY for name->str == 0
if (errs == 0 && oks == 0 && !dupes) // no plugin was found
my_error(ER_PLUGIN_IS_NOT_LOADED, MyFlags, name->str);
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, name->str, tmp.plugin_dl->dl.str);
plugin_dl_del(tmp.plugin_dl);
if (errs > 0 || oks + dupes == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment