summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-04-25 15:37:24 +0300
committerMonty <monty@mariadb.org>2016-04-25 15:37:24 +0300
commitf6cc7f1bdc56e57cf441f99f2c88ca92aeeebc11 (patch)
tree56663353897e6146894fa064bd00c318f803f7cf
parentce38adddfa91949b30956abd0e4cab201effcdef (diff)
downloadmariadb-git-f6cc7f1bdc56e57cf441f99f2c88ca92aeeebc11.tar.gz
Fixed failing test cases and compiler warnings
- Fixed wait condition in kill_processlist-6619 - Updated Ssl_chiper for openssl tests - Added supression for valgrinds when using libcrypto - Fixed wrong argument to pthread_mutex in server_audit.c when compiling with debug - Adding missing debug_sync_update() to debug_sync.h - Added initializers to some variables and fixed error handling in jsonudf.cpp - Fixed cluster_filter_unpack_varchar which doesn't have a stable index type. - Updated compiler_warnings.supp
-rw-r--r--mysql-test/t/kill_processlist-6619.test9
-rw-r--r--mysql-test/t/openssl_1.test4
-rw-r--r--mysql-test/t/openssl_6975.test1
-rw-r--r--mysql-test/t/ssl.test4
-rw-r--r--mysql-test/t/ssl_compress.test4
-rw-r--r--mysql-test/t/ssl_timeout.test2
-rw-r--r--mysql-test/valgrind.supp7
-rw-r--r--plugin/server_audit/server_audit.c10
-rw-r--r--sql/debug_sync.h1
-rw-r--r--sql/sys_vars.h2
-rw-r--r--storage/connect/jsonudf.cpp11
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar.test4
-rw-r--r--support-files/compiler_warnings.supp6
14 files changed, 42 insertions, 27 deletions
diff --git a/mysql-test/t/kill_processlist-6619.test b/mysql-test/t/kill_processlist-6619.test
index 95af83be56d..d599d204dda 100644
--- a/mysql-test/t/kill_processlist-6619.test
+++ b/mysql-test/t/kill_processlist-6619.test
@@ -1,5 +1,5 @@
#
-# MDEV-6619 SHOW PROCESSLIST returns empty result set after KILL QUERY
+# 6619 SHOW PROCESSLIST returns empty result set after KILL QUERY
#
--source include/not_embedded.inc
--source include/have_debug_sync.inc
@@ -23,5 +23,12 @@ SET DEBUG_SYNC='now SIGNAL go';
--error ER_QUERY_INTERRUPTED
reap;
SET DEBUG_SYNC='reset';
+
+# Wait until default connection has reset query string
+let $wait_condition=
+ SELECT COUNT(*) = 1 from information_schema.processlist
+ WHERE info is NULL;
+--source include/wait_condition.inc
+
--replace_column 1 # 3 # 6 # 7 #
SHOW PROCESSLIST;
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index e36f106a5be..4578a05be36 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -132,7 +132,7 @@ drop table t1;
# verification of servers certificate by setting both ca certificate
# and ca path to NULL
#
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1
--echo End of 5.0 tests
@@ -257,7 +257,7 @@ select 'is still running; no cipher request crashed the server' as result from d
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
connect(con1,localhost,bug42158,,,,,SSL);
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_cipher';
disconnect con1;
connection default;
diff --git a/mysql-test/t/openssl_6975.test b/mysql-test/t/openssl_6975.test
index bc6397c5c28..89e6983cf47 100644
--- a/mysql-test/t/openssl_6975.test
+++ b/mysql-test/t/openssl_6975.test
@@ -15,6 +15,7 @@ let $mysql=$MYSQL --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$
disable_abort_on_error;
echo TLS1.2 ciphers: user is ok with any cipher;
exec $mysql --ssl-cipher=AES128-SHA256;
+--replace_result DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-GCM-SHA384
exec $mysql --ssl-cipher=TLSv1.2;
echo TLS1.2 ciphers: user requires SSLv3 cipher RC4-SHA;
exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA256;
diff --git a/mysql-test/t/ssl.test b/mysql-test/t/ssl.test
index 0d14ad82692..21733f7e594 100644
--- a/mysql-test/t/ssl.test
+++ b/mysql-test/t/ssl.test
@@ -11,7 +11,7 @@
connect (ssl_con,localhost,root,,,,,SSL);
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_cipher';
# Check ssl expiration
@@ -22,7 +22,7 @@ SHOW STATUS LIKE 'Ssl_server_not_after';
-- source include/common-tests.inc
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_cipher';
#
diff --git a/mysql-test/t/ssl_compress.test b/mysql-test/t/ssl_compress.test
index 5e45e3824a2..28f3453c23e 100644
--- a/mysql-test/t/ssl_compress.test
+++ b/mysql-test/t/ssl_compress.test
@@ -11,7 +11,7 @@
connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS);
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_cipher';
# Check compression turned on
@@ -21,7 +21,7 @@ SHOW STATUS LIKE 'Compression';
-- source include/common-tests.inc
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_cipher';
# Check compression turned on
diff --git a/mysql-test/t/ssl_timeout.test b/mysql-test/t/ssl_timeout.test
index 0d96b3f6601..806b928aca0 100644
--- a/mysql-test/t/ssl_timeout.test
+++ b/mysql-test/t/ssl_timeout.test
@@ -7,7 +7,7 @@
connect (ssl_con,localhost,root,,,,,SSL read_timeout=5);
--echo # Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_cipher';
# --error CR_SERVER_LOST
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index e8eb47eb1cb..d83bb1d206c 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1158,6 +1158,13 @@
fun:SSL_library_init
}
+{
+ libcrypto 2.2.1 leak
+ Memcheck:Leak
+ fun:malloc
+ ...
+ fun:ERR_get_state
+}
{
Problem with udf and libresolve
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 30b7cdb5dcb..b84f2b94806 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -97,13 +97,11 @@ static void closelog() {}
#define FLOGGER_NO_PSI
/* How to access the pthread_mutex in mysql_mutex_t */
-//#ifdef SAFE_MUTEX
-//#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
-//#elif defined(MY_PTHREAD_FASTMUTEX)
-//#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
-//#else
+#if defined(SAFE_MUTEX) || defined(MY_PTHREAD_FASTMUTEX)
+#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
+#else
#define mysql_mutex_real_mutex(A) &(A)->m_mutex
-//#endif
+#endif
#define flogger_mutex_init(A,B,C) do{}while(0)
#define flogger_mutex_destroy(A) do{}while(0)
diff --git a/sql/debug_sync.h b/sql/debug_sync.h
index bf1b3167dbc..25b379e5892 100644
--- a/sql/debug_sync.h
+++ b/sql/debug_sync.h
@@ -44,6 +44,7 @@ extern void debug_sync_end(void);
extern void debug_sync_init_thread(THD *thd);
extern void debug_sync_end_thread(THD *thd);
extern bool debug_sync_set_action(THD *thd, const char *action_str, size_t len);
+extern bool debug_sync_update(THD *thd, char *val_str);
#endif /* defined(ENABLED_DEBUG_SYNC) */
diff --git a/sql/sys_vars.h b/sql/sys_vars.h
index 36067c50cc1..79b67d3b45c 100644
--- a/sql/sys_vars.h
+++ b/sql/sys_vars.h
@@ -30,6 +30,7 @@
#include "strfunc.h"
#include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone
#include "rpl_mi.h" // For Multi-Source Replication
+#include "debug_sync.h"
/*
a set of mostly trivial (as in f(X)=X) defines below to make system variable
@@ -1455,7 +1456,6 @@ public:
}
bool session_update(THD *thd, set_var *var)
{
- extern bool debug_sync_update(THD *thd, char *val_str);
return debug_sync_update(thd, var->save_result.string_value.str);
}
bool global_update(THD *thd, set_var *var)
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 25c77cea534..7b82ba2d627 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -533,7 +533,7 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
/*********************************************************************************/
my_bool JSNX::CheckPath(PGLOBAL g)
{
- PJVAL val;
+ PJVAL val= NULL;
PJSON row = Row;
for (int i = 0; i < Nod && row; i++) {
@@ -1302,7 +1302,7 @@ static my_bool CalcLen(UDF_ARGS *args, my_bool obj,
{
char fn[_MAX_PATH];
unsigned long i, k, m, n;
- long fl, j = -1;
+ long fl= 0, j = -1;
reslen = args->arg_count + 2;
@@ -2087,7 +2087,7 @@ my_bool json_object_nonull_init(UDF_INIT *initid, UDF_ARGS *args,
char *json_object_nonull(UDF_INIT *initid, UDF_ARGS *args, char *result,
unsigned long *res_length, char *, char *)
{
- char *str;
+ char *str= 0;
PGLOBAL g = (PGLOBAL)initid->ptr;
if (!g->Xchk) {
@@ -2621,7 +2621,7 @@ char *json_item_merge(UDF_INIT *initid, UDF_ARGS *args, char *result,
} // endif Xchk
if (!CheckMemory(g, initid, args, 2, false, false, true)) {
- PJSON top;
+ PJSON top= 0;
PJVAL jvp;
PJSON jsp[2] = {NULL, NULL};
@@ -4721,7 +4721,7 @@ char *jbin_set_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
my_bool b = true;
PJSON jsp;
PJSNX jsx;
- PJVAL jvp;
+ PJVAL jvp= 0;
PBSON bsp = NULL;
PGLOBAL g = (PGLOBAL)initid->ptr;
PGLOBAL gb = GetMemPtr(g, args, 0);
@@ -4742,6 +4742,7 @@ char *jbin_set_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!g->Xchk) {
if (CheckMemory(g, initid, args, 1, true, false, true)) {
PUSH_WARNING("CheckMemory error");
+ goto fin;
} else
jvp = MakeValue(g, args, 0);
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar.result b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar.result
index d3273437f77..9faf04b6a10 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar.result
@@ -182,14 +182,14 @@ a b c d e f
3 30 200 2000 20000 200000
explain select * from t1 where b > "0";
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 # b b NULL NULL NULL; Using where; Using index
select * from t1 where b > "0";
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select * from t1 where d > "0";
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 # d d NULL NULL NULL; Using where; Using index
select * from t1 where d > "0";
a b c d e f
2 20 100 1000 10000 100000
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar.test b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar.test
index 3a30919a8ff..f3e494e0dd4 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar.test
@@ -82,11 +82,11 @@ alter table t1 add key d(d,a) clustering=yes, add key b(b) clustering=yes;
explain select * from t1 where c > "0";
select * from t1 where c > "0";
---replace_column 7 NULL 9 NULL;
+--replace_column 4 # 7 NULL 9 NULL;
explain select * from t1 where b > "0";
select * from t1 where b > "0";
---replace_column 7 NULL 9 NULL;
+--replace_column 4 # 7 NULL 9 NULL;
explain select * from t1 where d > "0";
select * from t1 where d > "0";
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index 47eb8a827f1..9f9215704ec 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -184,10 +184,10 @@ jemalloc/src/jemalloc\.c: set but not used
#
# Connect engine
#
-storage/connect/ha_connect\.cc: might be clobbered by ~longjmp~
-storage/connect/connect\.cc: might be clobbered by ~longjmp~
+storage/connect/ha_connect\.cc: might be clobbered by .*longjmp
+storage/connect/connect\.cc: might be clobbered by .*longjmp
storage/connect/filamvct\.cpp: ignoring return value of
-storage/connect/filamvct\.cpp: might be clobbered by ~longjmp~
+storage/connect/filamvct\.cpp: might be clobbered by .*longjmp
storage/connect/xindex\.cpp: ignoring return value of
storage/connect/value\.cpp: always false