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
skip-test-list=FILE Skip the tests listed in FILE. Each line in the file
is an entry and should be formatted as:
<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
......@@ -6145,7 +6147,6 @@ Misc options
servers to exit before finishing the process
fast Run as fast as possible, dont't wait for servers
to shutdown etc.
force-restart Always restart servers between tests
parallel=N Run tests in N parallel threads (default 1)
Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times
......
......@@ -13,13 +13,11 @@ SELECT @@global.wsrep_desync;
SELECT @@session.wsrep_desync;
ERROR HY000: Variable 'wsrep_desync' is a GLOBAL variable
SET @@global.wsrep_desync=OFF;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
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;
@@global.wsrep_desync
1
......@@ -30,7 +28,7 @@ SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
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;
@@global.wsrep_desync
1
......@@ -47,6 +45,4 @@ ERROR 42000: Variable 'wsrep_desync' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_desync = @wsrep_desync_global_saved;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
# End of test
......@@ -38,7 +38,7 @@ SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
SET @@global.wsrep_provider_options=NULL;
ERROR HY000: Incorrect arguments to SET
Got one of the listed errors
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
NULL
......
......@@ -43,6 +43,7 @@ SELECT @@global.wsrep_cluster_address;
--echo
--echo # restore the initial value
--error 0,ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_cluster_address = @wsrep_cluster_address_global_saved;
--echo # End of test
......@@ -17,21 +17,26 @@ SELECT @@global.wsrep_desync;
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_desync;
--disable_warnings
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=OFF;
--enable_warnings
SELECT @@global.wsrep_desync;
# expected as no wsrep provider is currently loaded
--error ER_CANNOT_USER
--error ER_CANNOT_USER,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=ON;
SELECT @@global.wsrep_desync;
--echo
--echo # valid values
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync='OFF';
SELECT @@global.wsrep_desync;
# expected as no wsrep provider is currently loaded
--error ER_CANNOT_USER
--error ER_CANNOT_USER,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=ON;
SELECT @@global.wsrep_desync;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync=default;
SELECT @@global.wsrep_desync;
......@@ -44,6 +49,9 @@ SET @@global.wsrep_desync='junk';
--echo
--echo # restore the initial value
--disable_warnings
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_desync = @wsrep_desync_global_saved;
--enable_warnings
--echo # End of test
......@@ -16,15 +16,19 @@ SELECT @@global.wsrep_provider_options;
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_provider_options;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='option1';
SELECT @@global.wsrep_provider_options;
--echo
--echo # valid values
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='name1=value1;name2=value2';
SELECT @@global.wsrep_provider_options;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='hyphenated-name:value';
SELECT @@global.wsrep_provider_options;
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options=default;
SELECT @@global.wsrep_provider_options;
......@@ -33,12 +37,13 @@ SELECT @@global.wsrep_provider_options;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_provider_options=1;
SELECT @@global.wsrep_provider_options;
--error ER_WRONG_ARGUMENTS
--error ER_WRONG_ARGUMENTS,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options=NULL;
SELECT @@global.wsrep_provider_options;
--echo
--echo # restore the initial value
--error 0,ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved;
--echo # End of test
......@@ -420,7 +420,7 @@
Memcheck:Leak
fun:memalign
...
fun:call_init
fun:call_init*
fun:_dl_init
}
......
......@@ -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
bootstrap(mysql_stdin);
......
......@@ -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)
{
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);
if (ret != WSREP_OK)
......@@ -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)
{
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);
if (wsrep_desync) {
......@@ -553,9 +561,12 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff,
DBUG_ASSERT(i < maxi);
if (wsrep != NULL) {
if (wsrep != NULL)
{
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);
switch (sv->type) {
......@@ -572,7 +583,6 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff,
v->type = SHOW_DOUBLE;
break;
}
DBUG_ASSERT(i < maxi);
}
wsrep->stats_free(wsrep, stats);
}
......
......@@ -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);
/* 4 - store 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 */
......
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