-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-6543 Crash if enable 'federatedx' when 'federated' plugin alread…
…y enabled, and vice-versa INSTALL SONAME ignores attempts to load the same plugin twice, it's not an error (because one can load one plugin by name and then install soname for the rest). But Federated and FederatedX are different plugins, despite having the same name. Now plugin_add() only considers two plugins identical if their names are the same string (compared as pointers). Otherwise it reports an error.,
- Loading branch information
Sergei Golubchik
committed
Aug 6, 2014
1 parent
071a14c
commit 75f0f17
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
install soname 'ha_federated'; | ||
install soname 'ha_federated'; | ||
install soname 'ha_federatedx'; | ||
ERROR HY000: Function 'FEDERATED' already exists | ||
uninstall soname 'ha_federated'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# MDEV-6543 Crash if enable 'federatedx' when 'federated' plugin already enabled, and vice-versa | ||
# | ||
if(!$HA_FEDERATED_SO) { | ||
skip Needs ha_federated.so; | ||
} | ||
if(!$HA_FEDERATEDX_SO) { | ||
skip Needs ha_federatedx.so; | ||
} | ||
|
||
install soname 'ha_federated'; | ||
# note: no error below! install soname ignores already loaded plugins | ||
install soname 'ha_federated'; | ||
# note: an error here, even though plugin name is the same! | ||
--error ER_UDF_EXISTS | ||
install soname 'ha_federatedx'; | ||
uninstall soname 'ha_federated'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters