-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #26173244: THE UDF INSTALL SERVICE CAN'T BE USED AT
PLUGIN INSTALLS Split the UDF initialization/deinitialization into two: 1. Initialization/deinitialization of the global structures 2. Loading of the UDF definitions from the table and removing them from the global Then kept the #2 at the place of the current initialization/deinitalization routines and added #2 initialization very early (before component/plugin initialization) and #2 deinitialization very late (after the plugin/compononent deinitialization. Added a test plugin and a regression test.
- Loading branch information
Showing
8 changed files
with
211 additions
and
27 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
18 changes: 18 additions & 0 deletions
18
mysql-test/suite/test_services/r/test_udf_registration.result
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 @@ | ||
INSTALL PLUGIN test_udf_registration SONAME 'test_udf_services.so'; | ||
# Must work | ||
SELECT test_udf_registration_udf(); | ||
test_udf_registration_udf() | ||
0 | ||
UNINSTALL PLUGIN test_udf_registration; | ||
# Must fail: no UDF | ||
SELECT test_udf_registration_udf(); | ||
ERROR 42000: FUNCTION test.test_udf_registration_udf does not exist | ||
INSTALL PLUGIN test_udf_registration SONAME 'test_udf_services.so'; | ||
# Restart the server | ||
# restart | ||
# Must work after a restart | ||
SELECT test_udf_registration_udf(); | ||
test_udf_registration_udf() | ||
0 | ||
# Cleanup | ||
UNINSTALL PLUGIN test_udf_registration; |
2 changes: 2 additions & 0 deletions
2
mysql-test/suite/test_services/t/test_udf_registration-master.opt
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,2 @@ | ||
$TESTUDFREGISTRATION_OPT | ||
--local-infile=true |
28 changes: 28 additions & 0 deletions
28
mysql-test/suite/test_services/t/test_udf_registration.test
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,28 @@ | ||
# Save the initial number of concurrent sessions | ||
--source include/count_sessions.inc | ||
|
||
--replace_regex /\.dll/.so/ | ||
eval INSTALL PLUGIN test_udf_registration SONAME '$TESTUDFREGISTRATION'; | ||
|
||
--echo # Must work | ||
SELECT test_udf_registration_udf(); | ||
|
||
UNINSTALL PLUGIN test_udf_registration; | ||
|
||
--echo # Must fail: no UDF | ||
--error ER_SP_DOES_NOT_EXIST | ||
SELECT test_udf_registration_udf(); | ||
|
||
--replace_regex /\.dll/.so/ | ||
eval INSTALL PLUGIN test_udf_registration SONAME '$TESTUDFREGISTRATION'; | ||
|
||
|
||
--echo # Restart the server | ||
--source include/restart_mysqld.inc | ||
|
||
|
||
--echo # Must work after a restart | ||
SELECT test_udf_registration_udf(); | ||
|
||
--echo # Cleanup | ||
UNINSTALL PLUGIN test_udf_registration; |
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
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
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
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