Commit f195f939 authored by Monty's avatar Monty

Cleanups, fixed warnings from valgrind, fixed failing tests (because on...

Cleanups, fixed warnings from valgrind, fixed failing tests (because on changes in WSREP initialization)
parent 24881437
...@@ -6028,6 +6028,8 @@ Options to control what test suites or cases to run ...@@ -6028,6 +6028,8 @@ Options to control what test suites or cases to run
skip-test-list=FILE Skip the tests listed in FILE. Each line in the file skip-test-list=FILE Skip the tests listed in FILE. Each line in the file
is an entry and should be formatted as: is an entry and should be formatted as:
<TESTNAME> : <COMMENT> <TESTNAME> : <COMMENT>
force-restart Always restart servers between tests. This makes it
easier to see from which test warnings may come from.
Options that specify ports Options that specify ports
...@@ -6145,7 +6147,6 @@ Misc options ...@@ -6145,7 +6147,6 @@ Misc options
servers to exit before finishing the process servers to exit before finishing the process
fast Run as fast as possible, dont't wait for servers fast Run as fast as possible, dont't wait for servers
to shutdown etc. to shutdown etc.
force-restart Always restart servers between tests
parallel=N Run tests in N parallel threads (default 1) parallel=N Run tests in N parallel threads (default 1)
Use parallel=auto for auto-setting of N Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times repeat=N Run each test N number of times
......
...@@ -13,13 +13,11 @@ SELECT @@global.wsrep_desync; ...@@ -13,13 +13,11 @@ SELECT @@global.wsrep_desync;
SELECT @@session.wsrep_desync; SELECT @@session.wsrep_desync;
ERROR HY000: Variable 'wsrep_desync' is a GLOBAL variable ERROR HY000: Variable 'wsrep_desync' is a GLOBAL variable
SET @@global.wsrep_desync=OFF; SET @@global.wsrep_desync=OFF;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
@@global.wsrep_desync @@global.wsrep_desync
0 0
SET @@global.wsrep_desync=ON; SET @@global.wsrep_desync=ON;
ERROR HY000: Operation 'desync' failed for SET @@global.wsrep_desync=ON Got one of the listed errors
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
@@global.wsrep_desync @@global.wsrep_desync
1 1
...@@ -30,7 +28,7 @@ SELECT @@global.wsrep_desync; ...@@ -30,7 +28,7 @@ SELECT @@global.wsrep_desync;
@@global.wsrep_desync @@global.wsrep_desync
0 0
SET @@global.wsrep_desync=ON; SET @@global.wsrep_desync=ON;
ERROR HY000: Operation 'desync' failed for SET @@global.wsrep_desync=ON Got one of the listed errors
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
@@global.wsrep_desync @@global.wsrep_desync
1 1
...@@ -47,6 +45,4 @@ ERROR 42000: Variable 'wsrep_desync' can't be set to the value of 'junk' ...@@ -47,6 +45,4 @@ ERROR 42000: Variable 'wsrep_desync' can't be set to the value of 'junk'
# restore the initial value # restore the initial value
SET @@global.wsrep_desync = @wsrep_desync_global_saved; SET @@global.wsrep_desync = @wsrep_desync_global_saved;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
# End of test # End of test
...@@ -38,7 +38,7 @@ SELECT @@global.wsrep_provider_options; ...@@ -38,7 +38,7 @@ SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options @@global.wsrep_provider_options
SET @@global.wsrep_provider_options=NULL; SET @@global.wsrep_provider_options=NULL;
ERROR HY000: Incorrect arguments to SET Got one of the listed errors
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options @@global.wsrep_provider_options
NULL NULL
......
...@@ -43,6 +43,7 @@ SELECT @@global.wsrep_cluster_address; ...@@ -43,6 +43,7 @@ SELECT @@global.wsrep_cluster_address;
--echo --echo
--echo # restore the initial value --echo # restore the initial value
--error 0,ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_cluster_address = @wsrep_cluster_address_global_saved; SET @@global.wsrep_cluster_address = @wsrep_cluster_address_global_saved;
--echo # End of test --echo # End of test
...@@ -17,21 +17,26 @@ SELECT @@global.wsrep_desync; ...@@ -17,21 +17,26 @@ SELECT @@global.wsrep_desync;
--echo # scope --echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR --error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_desync; SELECT @@session.wsrep_desync;
--disable_warnings
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=OFF; SET @@global.wsrep_desync=OFF;
--enable_warnings
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
# expected as no wsrep provider is currently loaded # expected as no wsrep provider is currently loaded
--error ER_CANNOT_USER --error ER_CANNOT_USER,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=ON; SET @@global.wsrep_desync=ON;
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
--echo --echo
--echo # valid values --echo # valid values
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync='OFF'; SET @@global.wsrep_desync='OFF';
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
# expected as no wsrep provider is currently loaded # expected as no wsrep provider is currently loaded
--error ER_CANNOT_USER --error ER_CANNOT_USER,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=ON; SET @@global.wsrep_desync=ON;
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=default; SET @@global.wsrep_desync=default;
SELECT @@global.wsrep_desync; SELECT @@global.wsrep_desync;
...@@ -44,6 +49,9 @@ SET @@global.wsrep_desync='junk'; ...@@ -44,6 +49,9 @@ SET @@global.wsrep_desync='junk';
--echo --echo
--echo # restore the initial value --echo # restore the initial value
--disable_warnings
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync = @wsrep_desync_global_saved; SET @@global.wsrep_desync = @wsrep_desync_global_saved;
--enable_warnings
--echo # End of test --echo # End of test
...@@ -16,15 +16,19 @@ SELECT @@global.wsrep_provider_options; ...@@ -16,15 +16,19 @@ SELECT @@global.wsrep_provider_options;
--echo # scope --echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR --error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_provider_options; SELECT @@session.wsrep_provider_options;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='option1'; SET @@global.wsrep_provider_options='option1';
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
--echo --echo
--echo # valid values --echo # valid values
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='name1=value1;name2=value2'; SET @@global.wsrep_provider_options='name1=value1;name2=value2';
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='hyphenated-name:value'; SET @@global.wsrep_provider_options='hyphenated-name:value';
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options=default; SET @@global.wsrep_provider_options=default;
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
...@@ -33,12 +37,13 @@ SELECT @@global.wsrep_provider_options; ...@@ -33,12 +37,13 @@ SELECT @@global.wsrep_provider_options;
--error ER_WRONG_TYPE_FOR_VAR --error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_provider_options=1; SET @@global.wsrep_provider_options=1;
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
--error ER_WRONG_ARGUMENTS --error ER_WRONG_ARGUMENTS,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options=NULL; SET @@global.wsrep_provider_options=NULL;
SELECT @@global.wsrep_provider_options; SELECT @@global.wsrep_provider_options;
--echo --echo
--echo # restore the initial value --echo # restore the initial value
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved; SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved;
--echo # End of test --echo # End of test
...@@ -420,7 +420,7 @@ ...@@ -420,7 +420,7 @@
Memcheck:Leak Memcheck:Leak
fun:memalign fun:memalign
... ...
fun:call_init fun:call_init*
fun:_dl_init fun:_dl_init
} }
......
...@@ -5812,7 +5812,7 @@ int mysqld_main(int argc, char **argv) ...@@ -5812,7 +5812,7 @@ int mysqld_main(int argc, char **argv)
} }
} }
if (opt_bootstrap) if (opt_bootstrap)
{ {
select_thread_in_use= 0; // Allow 'kill' to work select_thread_in_use= 0; // Allow 'kill' to work
bootstrap(mysql_stdin); bootstrap(mysql_stdin);
......
...@@ -295,7 +295,11 @@ bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var) ...@@ -295,7 +295,11 @@ bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var)
bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type) bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type)
{ {
DBUG_ASSERT(wsrep != NULL); if (wsrep == NULL)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
}
wsrep_status_t ret= wsrep->options_set(wsrep, wsrep_provider_options); wsrep_status_t ret= wsrep->options_set(wsrep, wsrep_provider_options);
if (ret != WSREP_OK) if (ret != WSREP_OK)
...@@ -497,7 +501,11 @@ bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var) ...@@ -497,7 +501,11 @@ bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type) bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
{ {
DBUG_ASSERT(wsrep != NULL); if (wsrep == NULL)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
}
wsrep_status_t ret(WSREP_WARNING); wsrep_status_t ret(WSREP_WARNING);
if (wsrep_desync) { if (wsrep_desync) {
...@@ -553,9 +561,12 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff, ...@@ -553,9 +561,12 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff,
DBUG_ASSERT(i < maxi); DBUG_ASSERT(i < maxi);
if (wsrep != NULL) { if (wsrep != NULL)
{
wsrep_stats_var* stats= wsrep->stats_get(wsrep); wsrep_stats_var* stats= wsrep->stats_get(wsrep);
for (wsrep_stats_var *sv= stats; i < maxi && sv && sv->name; i++, sv++, v++) for (wsrep_stats_var *sv= stats;
i < maxi && sv && sv->name; i++,
sv++, v++)
{ {
v->name = thd->strdup(sv->name); v->name = thd->strdup(sv->name);
switch (sv->type) { switch (sv->type) {
...@@ -572,7 +583,6 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff, ...@@ -572,7 +583,6 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff,
v->type = SHOW_DOUBLE; v->type = SHOW_DOUBLE;
break; break;
} }
DBUG_ASSERT(i < maxi);
} }
wsrep->stats_free(wsrep, stats); wsrep->stats_free(wsrep, stats);
} }
......
...@@ -421,6 +421,10 @@ static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args) ...@@ -421,6 +421,10 @@ static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
memcpy(dst + block_size - tail, src + block_size - tail, tail); memcpy(dst + block_size - tail, src + block_size - tail, tail);
/* 4 - store key version */ /* 4 - store key version */
_ma_store_key_version(share, dst, key_version); _ma_store_key_version(share, dst, key_version);
#ifdef HAVE_valgrind
/* 5 - keep valgrind happy by zeroing not used bytes */
bzero(dst+head+size, block_size - size - tail - head);
#endif
} }
/* swap pointers to instead write out the encrypted block */ /* swap pointers to instead write out the encrypted block */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment