diff options
author | unknown <kaa@polly.(none)> | 2007-12-24 17:42:13 +0300 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-12-24 17:42:13 +0300 |
commit | bdad41bacebf141be5dbe64e744eee106a1a80fd (patch) | |
tree | b92fa2c69db7aaf59463bc9da92b226d575483bb | |
parent | 90dec398a5951da7d13dceed6eac109e0771482e (diff) | |
download | mariadb-git-bdad41bacebf141be5dbe64e744eee106a1a80fd.tar.gz |
Fix for bug #33305: Test case in 'skip_grants' file need dynamic loading
to be compiled in
The problem was that on a statically built server an attempt to create
a UDF resulted in a different, but reasonable error ("Can't open shared
library" instead of "UDFs are unavailable with the --skip-grant-tables
option"), which caused a failure for the test case for bug #32020.
Fixed by moving the test case for bug #32020 from skip_grants.test to a
separate test to ensure that it is only run when the server is built
with support for dynamically loaded libraries.
mysql-test/r/skip_grants.result:
Moved the test case for bug #32020 to a separate test.
mysql-test/t/skip_grants.test:
Moved the test case for bug #32020 to a separate test.
mysql-test/r/udf_skip_grants.result:
Moved the test case for bug #32020 to a separate test.
mysql-test/t/udf_skip_grants-master.opt:
Moved the test case for bug #32020 to a separate test.
mysql-test/t/udf_skip_grants.test:
Moved the test case for bug #32020 to a separate test.
-rw-r--r-- | mysql-test/r/skip_grants.result | 4 | ||||
-rw-r--r-- | mysql-test/r/udf_skip_grants.result | 5 | ||||
-rw-r--r-- | mysql-test/t/skip_grants.test | 10 | ||||
-rw-r--r-- | mysql-test/t/udf_skip_grants-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/udf_skip_grants.test | 28 |
5 files changed, 34 insertions, 14 deletions
diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result index 1ef35b051d6..cba46b13f19 100644 --- a/mysql-test/r/skip_grants.result +++ b/mysql-test/r/skip_grants.result @@ -70,8 +70,4 @@ count(*) select count(*) from information_schema.USER_PRIVILEGES; count(*) 0 -CREATE FUNCTION a RETURNS STRING SONAME ''; -ERROR HY000: Can't initialize function 'a'; UDFs are unavailable with the --skip-grant-tables option -DROP FUNCTION a; -ERROR 42000: FUNCTION test.a does not exist End of 5.0 tests diff --git a/mysql-test/r/udf_skip_grants.result b/mysql-test/r/udf_skip_grants.result new file mode 100644 index 00000000000..8d7081ebf6f --- /dev/null +++ b/mysql-test/r/udf_skip_grants.result @@ -0,0 +1,5 @@ +CREATE FUNCTION a RETURNS STRING SONAME ''; +ERROR HY000: Can't initialize function 'a'; UDFs are unavailable with the --skip-grant-tables option +DROP FUNCTION a; +ERROR 42000: FUNCTION test.a does not exist +End of 5.0 tests diff --git a/mysql-test/t/skip_grants.test b/mysql-test/t/skip_grants.test index 02a381063ee..1021d629540 100644 --- a/mysql-test/t/skip_grants.test +++ b/mysql-test/t/skip_grants.test @@ -117,14 +117,4 @@ select count(*) from information_schema.SCHEMA_PRIVILEGES; select count(*) from information_schema.TABLE_PRIVILEGES; select count(*) from information_schema.USER_PRIVILEGES; -# -# Bug #32020: loading udfs while --skip-grant-tables is enabled causes out of -# memory errors -# - ---error ER_CANT_INITIALIZE_UDF -CREATE FUNCTION a RETURNS STRING SONAME ''; ---error ER_SP_DOES_NOT_EXIST -DROP FUNCTION a; - --echo End of 5.0 tests diff --git a/mysql-test/t/udf_skip_grants-master.opt b/mysql-test/t/udf_skip_grants-master.opt new file mode 100644 index 00000000000..5699a3387b8 --- /dev/null +++ b/mysql-test/t/udf_skip_grants-master.opt @@ -0,0 +1 @@ +--skip-grant-tables diff --git a/mysql-test/t/udf_skip_grants.test b/mysql-test/t/udf_skip_grants.test new file mode 100644 index 00000000000..bd9402e0d8a --- /dev/null +++ b/mysql-test/t/udf_skip_grants.test @@ -0,0 +1,28 @@ +####################### udf_skip_grants.test ########################### +# # +# Test for bug #32020 "loading udfs while --skip-grant-tables is # +# enabled causes out of memory errors" # +# # +# Creation: # +# 2007-12-24 akopytov Moved the test case for bug #32020 from # +# skip_grants.test to a separate test to ensure # +# that it is only run when the server is built # +# with support for dynamically loaded libraries # +# (see bug #33305). # +# # +######################################################################## + +-- source include/not_embedded.inc +-- source include/have_udf.inc + +# +# Bug #32020: loading udfs while --skip-grant-tables is enabled causes out of +# memory errors +# + +--error ER_CANT_INITIALIZE_UDF +CREATE FUNCTION a RETURNS STRING SONAME ''; +--error ER_SP_DOES_NOT_EXIST +DROP FUNCTION a; + +--echo End of 5.0 tests |