|
|
6f9931 |
Fix plugin boolean variables to receive the value "1", not "-1", when they
|
|
|
6f9931 |
are set to 1. Aside from being bizarre, the existing behavior is unportable:
|
|
|
6f9931 |
machines where char is unsigned print "255" instead. Filed upstream at
|
|
|
6f9931 |
http://bugs.mysql.com/bug.php?id=59905
|
|
|
6f9931 |
|
|
|
6f9931 |
|
|
|
6f9931 |
diff -Naur mysql-5.5.8.orig/sql/sql_plugin.cc mysql-5.5.8/sql/sql_plugin.cc
|
|
|
6f9931 |
--- mysql-5.5.8.orig/sql/sql_plugin.cc 2010-12-03 12:58:26.000000000 -0500
|
|
|
6f9931 |
+++ mysql-5.5.8/sql/sql_plugin.cc 2011-02-01 20:34:10.218305349 -0500
|
|
|
015dab |
@@ -2160,7 +2160,7 @@
|
|
|
6f9931 |
goto err;
|
|
|
6f9931 |
result= (int) tmp;
|
|
|
6f9931 |
}
|
|
|
6f9931 |
- *(my_bool *) save= -result;
|
|
|
6f9931 |
+ *(my_bool *) save= result ? true : false;
|
|
|
6f9931 |
return 0;
|
|
|
6f9931 |
err:
|
|
|
6f9931 |
return 1;
|
|
|
6f9931 |
diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result
|
|
|
6f9931 |
--- mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2010-12-03 12:58:25.000000000 -0500
|
|
|
6f9931 |
+++ mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2011-02-01 21:53:20.006302245 -0500
|
|
|
6f9931 |
@@ -45,7 +45,7 @@
|
|
|
6f9931 |
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
|
|
|
6f9931 |
select @@global.rpl_semi_sync_master_enabled;
|
|
|
6f9931 |
@@global.rpl_semi_sync_master_enabled
|
|
|
6f9931 |
--1
|
|
|
6f9931 |
+1
|
|
|
6f9931 |
select @@session.rpl_semi_sync_master_enabled;
|
|
|
6f9931 |
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable
|
|
|
6f9931 |
show global variables like 'rpl_semi_sync_master_enabled';
|
|
|
6f9931 |
diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result
|
|
|
6f9931 |
--- mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2010-12-03 12:58:26.000000000 -0500
|
|
|
6f9931 |
+++ mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2011-02-01 21:53:59.689249491 -0500
|
|
|
6f9931 |
@@ -45,7 +45,7 @@
|
|
|
6f9931 |
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
|
|
|
6f9931 |
select @@global.rpl_semi_sync_slave_enabled;
|
|
|
6f9931 |
@@global.rpl_semi_sync_slave_enabled
|
|
|
6f9931 |
--1
|
|
|
6f9931 |
+1
|
|
|
6f9931 |
select @@session.rpl_semi_sync_slave_enabled;
|
|
|
6f9931 |
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable
|
|
|
6f9931 |
show global variables like 'rpl_semi_sync_slave_enabled';
|