Fix plugin boolean variables to receive the value "1", not "-1", when they are set to 1. Aside from being bizarre, the existing behavior is unportable: machines where char is unsigned print "255" instead. Filed upstream at http://bugs.mysql.com/bug.php?id=59905 Filed upstream at https://bugs.launchpad.net/maria/+bug/886479 diff -Naur 5.5_orig/sql/sql_plugin.cc 5.5/sql/sql_plugin.cc --- 5.5_orig/sql/sql_plugin.cc 2011-11-01 16:20:49.000000000 +0100 +++ 5.5/sql/sql_plugin.cc 2011-11-05 10:39:05.574604026 +0100 @@ -2285,7 +2285,7 @@ goto err; result= (int) tmp; } - *(my_bool *) save= -result; + *(my_bool *) save= result ? true : false; return 0; err: return 1; diff -Naur 5.5_orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 5.5/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result --- 5.5_orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2011-11-01 16:20:49.000000000 +0100 +++ 5.5/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2011-11-05 10:39:05.654604133 +0100 @@ -45,7 +45,7 @@ ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL select @@global.rpl_semi_sync_master_enabled; @@global.rpl_semi_sync_master_enabled --1 +1 select @@session.rpl_semi_sync_master_enabled; ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable show global variables like 'rpl_semi_sync_master_enabled'; diff -Naur 5.5_orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 5.5/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result --- 5.5_orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2011-11-01 16:20:49.000000000 +0100 +++ 5.5/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2011-11-05 10:39:05.693604115 +0100 @@ -45,7 +45,7 @@ ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL select @@global.rpl_semi_sync_slave_enabled; @@global.rpl_semi_sync_slave_enabled --1 +1 select @@session.rpl_semi_sync_slave_enabled; ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable show global variables like 'rpl_semi_sync_slave_enabled';