Commit 65180225 authored by Daniel Black's avatar Daniel Black Committed by Sergei Golubchik

MDEV-16294: remove INSTALL SONAME IF EXISTS option

As it isn't used. This leaves a less clustered syntax
for a INSTALL IF EXISTS SONAME option which could be added later.
This option could be checking the existance of the soname rather than the
installed plugin name which the rest of the INSTALL IF NOT EXISTS
is focused around.`
parent 6513b838
...@@ -361,12 +361,11 @@ Level Code Message ...@@ -361,12 +361,11 @@ Level Code Message
Note 1305 PLUGIN example does not exist Note 1305 PLUGIN example does not exist
UNINSTALL PLUGIN example; UNINSTALL PLUGIN example;
ERROR 42000: PLUGIN example does not exist ERROR 42000: PLUGIN example does not exist
INSTALL SONAME IF NOT EXISTS 'ha_example'; INSTALL SONAME 'ha_example';
select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
EXAMPLE ACTIVE STORAGE ENGINE EXAMPLE ACTIVE STORAGE ENGINE
UNUSABLE ACTIVE DAEMON UNUSABLE ACTIVE DAEMON
INSTALL SONAME IF NOT EXISTS 'ha_example';
UNINSTALL SONAME IF EXISTS 'ha_example'; UNINSTALL SONAME IF EXISTS 'ha_example';
UNINSTALL SONAME IF EXISTS 'ha_example'; UNINSTALL SONAME IF EXISTS 'ha_example';
Warnings: Warnings:
......
...@@ -292,13 +292,9 @@ SHOW WARNINGS; ...@@ -292,13 +292,9 @@ SHOW WARNINGS;
--error 1305 --error 1305
UNINSTALL PLUGIN example; UNINSTALL PLUGIN example;
INSTALL SONAME IF NOT EXISTS 'ha_example'; INSTALL SONAME 'ha_example';
select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
# note: installing soname multiple times doesn't cause errors or warnings
INSTALL SONAME IF NOT EXISTS 'ha_example';
UNINSTALL SONAME IF EXISTS 'ha_example'; UNINSTALL SONAME IF EXISTS 'ha_example';
UNINSTALL SONAME IF EXISTS 'ha_example'; UNINSTALL SONAME IF EXISTS 'ha_example';
......
...@@ -17500,15 +17500,12 @@ install: ...@@ -17500,15 +17500,12 @@ install:
lex->comment= $4; lex->comment= $4;
lex->ident= $6; lex->ident= $6;
} }
| INSTALL_SYM SONAME_SYM opt_if_not_exists TEXT_STRING_sys | INSTALL_SYM SONAME_SYM TEXT_STRING_sys
{ {
LEX *lex= Lex; LEX *lex= Lex;
lex->create_info.init();
if (lex->add_create_options_with_check($3))
MYSQL_YYABORT;
lex->sql_command= SQLCOM_INSTALL_PLUGIN; lex->sql_command= SQLCOM_INSTALL_PLUGIN;
lex->comment= null_clex_str; lex->comment= null_clex_str;
lex->ident= $4; lex->ident= $3;
} }
; ;
......
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