diff --git a/mysql-test/include/have_debug_sync.inc b/mysql-test/include/have_debug_sync.inc index ea2247a2746..8efec7dad95 100644 --- a/mysql-test/include/have_debug_sync.inc +++ b/mysql-test/include/have_debug_sync.inc @@ -1,3 +1,4 @@ -if (`select @@debug_sync not like 'ON %'`) { - --skip Needs a debug_sync enabled +if (`SELECT COUNT(*) = 0 FROM information_schema.session_variables WHERE + variable_name = 'debug_sync' AND variable_value LIKE 'ON %'`) { + --skip Needs debug_sync enabled } diff --git a/mysql-test/include/not_openssl.inc b/mysql-test/include/not_openssl.inc deleted file mode 100644 index afe2ed37c28..00000000000 --- a/mysql-test/include/not_openssl.inc +++ /dev/null @@ -1,4 +0,0 @@ --- require r/not_openssl.require -disable_query_log; -show variables like "have_openssl"; -enable_query_log; diff --git a/mysql-test/include/not_ssl.inc b/mysql-test/include/not_ssl.inc new file mode 100644 index 00000000000..99866923621 --- /dev/null +++ b/mysql-test/include/not_ssl.inc @@ -0,0 +1,4 @@ +if (`select @@have_ssl = 'YES'`) +{ + skip only without SSL; +} diff --git a/mysql-test/r/not_openssl.require b/mysql-test/r/not_openssl.require deleted file mode 100644 index 2b5e423999c..00000000000 --- a/mysql-test/r/not_openssl.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_openssl NO diff --git a/mysql-test/t/func_encrypt_nossl.test b/mysql-test/t/func_encrypt_nossl.test index 11866db1da7..2dafaa671c4 100644 --- a/mysql-test/t/func_encrypt_nossl.test +++ b/mysql-test/t/func_encrypt_nossl.test @@ -1,4 +1,4 @@ --- source include/not_openssl.inc +-- source include/not_ssl.inc # # Test output from des_encrypt and des_decrypt when server is diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ea38d61cca2..8a873257090 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -660,6 +660,7 @@ SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen, have_query_cache; SHOW_COMP_OPTION have_geometry, have_rtree_keys; SHOW_COMP_OPTION have_crypt, have_compress; SHOW_COMP_OPTION have_profiling; +SHOW_COMP_OPTION have_openssl; /* Thread specific variables */ @@ -7600,8 +7601,13 @@ static int mysql_init_variables(void) #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) have_ssl=SHOW_OPTION_YES; +#if HAVE_YASSL + have_openssl= SHOW_OPTION_NO; #else - have_ssl=SHOW_OPTION_NO; + have_openssl= SHOW_OPTION_YES; +#endif +#else + have_openssl= have_ssl= SHOW_OPTION_NO; #endif #ifdef HAVE_BROKEN_REALPATH have_symlink=SHOW_OPTION_NO; diff --git a/sql/set_var.h b/sql/set_var.h index 52c68a4031e..683f74e35b7 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -299,6 +299,7 @@ extern SHOW_COMP_OPTION have_query_cache; extern SHOW_COMP_OPTION have_geometry, have_rtree_keys; extern SHOW_COMP_OPTION have_crypt; extern SHOW_COMP_OPTION have_compress; +extern SHOW_COMP_OPTION have_openssl; /* Prototypes for helper functions diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 193447156c0..55b225f32d2 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3326,7 +3326,7 @@ static Sys_var_have Sys_have_geometry( static Sys_var_have Sys_have_openssl( "have_openssl", "have_openssl", - READ_ONLY GLOBAL_VAR(have_ssl), NO_CMD_LINE); + READ_ONLY GLOBAL_VAR(have_openssl), NO_CMD_LINE); static Sys_var_have Sys_have_profiling( "have_profiling", "have_profiling",