diff options
author | unknown <msvensson@neptunus.(none)> | 2006-04-12 15:13:16 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-04-12 15:13:16 +0200 |
commit | 0a8d876d1480f2da2f6783378ce5cfea6e45b0fb (patch) | |
tree | 90ca5269b114f88c1195777a2595d1e9ba68693e | |
parent | 10633fd8397f8450b5076bb98f336f6d20967b5d (diff) | |
download | mariadb-git-0a8d876d1480f2da2f6783378ce5cfea6e45b0fb.tar.gz |
Bug#18564 Test failure due to test not checking preconditions
- Add variable "have_dynamic_loading" and use it to check if the udf test should be run.
mysql-test/include/have_udf.inc:
Use variable "have_dynamic_loading" to to determine if there is support for udf's
mysql-test/r/have_udf.require:
Use variable "have_dynamic_loading" to to determine if there is support for udf's
mysql-test/t/disabled.def:
Remove udf from disabled
sql/mysql_priv.h:
Add have_dlopen variable
sql/mysqld.cc:
Add have_dlopen variable
sql/set_var.cc:
Add have_dlopen variable and name it "have_dynamic_loading" in "SHOW VARIABLES"
-rw-r--r-- | mysql-test/include/have_udf.inc | 14 | ||||
-rw-r--r-- | mysql-test/r/have_udf.require | 3 | ||||
-rw-r--r-- | mysql-test/t/disabled.def | 1 | ||||
-rw-r--r-- | sql/mysql_priv.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 7 | ||||
-rw-r--r-- | sql/set_var.cc | 1 |
6 files changed, 15 insertions, 13 deletions
diff --git a/mysql-test/include/have_udf.inc b/mysql-test/include/have_udf.inc index a22b2a52e61..b6e6f0f2516 100644 --- a/mysql-test/include/have_udf.inc +++ b/mysql-test/include/have_udf.inc @@ -1,12 +1,8 @@ # -# To check if the udf_example.so is available, -# try to load one function from it. -# +# Check if server has support for loading udf's +# i.e it will support dlopen # --require r/have_udf.require ---disable_abort_on_error -CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so'; ---disable_query_log -DROP FUNCTION metaphon; ---enable_query_log ---enable_abort_on_error +disable_query_log; +show variables like "have_dynamic_loading"; +enable_query_log; diff --git a/mysql-test/r/have_udf.require b/mysql-test/r/have_udf.require index 869d1b254fd..2d21f65e4ac 100644 --- a/mysql-test/r/have_udf.require +++ b/mysql-test/r/have_udf.require @@ -1 +1,2 @@ -CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so'; +Variable_name Value +have_dynamic_loading YES diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index a836b1a2897..f71e24ff3ed 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,4 +12,3 @@ sp-goto : GOTO is currently is disabled - will be fixed in the future ndb_load : Bug#17233 -udf : Bug#18564 (Permission by Brian) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index ca7801039c5..4e9015910cb 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1296,7 +1296,7 @@ extern SHOW_COMP_OPTION have_ndbcluster; #endif extern SHOW_COMP_OPTION have_isam; -extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink; +extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_dlopen; extern SHOW_COMP_OPTION have_query_cache; extern SHOW_COMP_OPTION have_geometry, have_rtree_keys; extern SHOW_COMP_OPTION have_crypt; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9dd37bbebc9..f97a9ebadc3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -474,7 +474,7 @@ CHARSET_INFO *character_set_filesystem; SHOW_COMP_OPTION have_isam; SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_query_cache; -SHOW_COMP_OPTION have_geometry, have_rtree_keys; +SHOW_COMP_OPTION have_geometry, have_rtree_keys, have_dlopen; SHOW_COMP_OPTION have_crypt, have_compress; /* Thread specific variables */ @@ -6415,6 +6415,11 @@ static void mysql_init_variables(void) #else have_symlink=SHOW_OPTION_YES; #endif +#ifdef HAVE_DLOPEN + have_dlopen=SHOW_OPTION_YES; +#else + have_dlopen=SHOW_OPTION_NO; +#endif #ifdef HAVE_QUERY_CACHE have_query_cache=SHOW_OPTION_YES; #else diff --git a/sql/set_var.cc b/sql/set_var.cc index 7be79ab59f0..a1860027630 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -810,6 +810,7 @@ struct show_var_st init_vars[]= { {"have_compress", (char*) &have_compress, SHOW_HAVE}, {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, + {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, {"have_geometry", (char*) &have_geometry, SHOW_HAVE}, |