mirror of
https://github.com/MariaDB/server.git
synced 2025-10-21 08:47:42 +03:00
UDF can be created from any library in any part of the server LD_LIBRARY_PATH. Allow to load udfs only from plugin_dir. On windows, refuse to open udf in case it's path contains a slash. No good test case for this bug because of imperfect error message that includes error code and error string when it fails to dlopen a library. mysql-test/mysql-test-run.pl: Since plugins are allowed to be open only from plugin_dir: - there is no sence to update LD_LIBRARY_PATH - there is no sence to add plugin_dir arg by default - set UDF_EXAMPLE_LIB_OPT and EXAMPLE_PLUGIN_OPT to be used by udf and plugin tests accordingly. mysql-test/r/plugin.result: Updated test result (we report addition warning). sql/sql_udf.cc: Allow to load udfs only from plugin_dir. On windows, refuse to open udf in case it's path contains a slash. mysql-test/t/plugin-master.opt: New BitKeeper file ``mysql-test/t/plugin-master.opt'' mysql-test/t/udf-master.opt: New BitKeeper file ``mysql-test/t/udf-master.opt''
17 lines
525 B
Plaintext
17 lines
525 B
Plaintext
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
|
|
Warnings:
|
|
Warning 1286 Unknown table engine 'EXAMPLE'
|
|
Warning 1266 Using storage engine MyISAM for table 't1'
|
|
DROP TABLE t1;
|
|
INSTALL PLUGIN example SONAME 'ha_example.so';
|
|
INSTALL PLUGIN EXAMPLE SONAME 'ha_example.so';
|
|
ERROR HY000: Function 'EXAMPLE' already exists
|
|
UNINSTALL PLUGIN example;
|
|
INSTALL PLUGIN example SONAME 'ha_example.so';
|
|
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
|
|
SELECT * FROM t1;
|
|
a
|
|
DROP TABLE t1;
|
|
UNINSTALL PLUGIN non_exist;
|
|
ERROR 42000: PLUGIN non_exist does not exist
|