|
|||||||||||
|
bk commit into 5.0 tree (aelkin:1.2501) BUG#26199
From: Andrei Elkin <aelkin(at)mysql.com>
Date: Fri Sep 14 2007 - 10:02:02 EDT
ChangeSet@1.2501, 2007-09-14 17:01:53+03:00, aelkin@koti.dsl.inet.fi +3 -0 Bug #26199 Replication Failure on Slave when using stored procs with bit-type parameters. The value of the actual argument of BIT-type-arg stored procedure was binlogged as non-espaped sequence of bytes corresponding to internal representation of the bit value.
The patch enforces binlogging of the bit-argument as a valid literal: prefixing the quoted bytes sequence with
_binary.
mysql-test/r/rpl_sp_effects.result@1.4, 2007-09-14 17:01:43+03:00, aelkin@koti.dsl.inet.fi +32 -1 testing stored function and procedure called with BIT-arg. mysql-test/t/rpl_sp_effects.test@1.4, 2007-09-14 17:01:43+03:00, aelkin@koti.dsl.inet.fi +36 -1 results changed sql/sp_head.cc@1.254, 2007-09-14 17:01:43+03:00, aelkin@koti.dsl.inet.fi +3 -2 Treating BIT field type specially to for its value to be prefixed and quoted. diff -Nrup a/mysql-test/r/rpl_sp_effects.result b/mysql-test/r/rpl_sp_effects.result --- a/mysql-test/r/rpl_sp_effects.result 2005-09-07 18:39:41 +03:00 -drop table t1; +create table t2 (b BIT(7)); +create procedure sp_bug26199(bitvalue BIT(7)) +begin +insert into t2 set b = bitvalue; +end // +create function sf_bug26199(b BIT(7)) returns int +begin +insert into t2 values(b); +return 0; +end// +call sp_bug26199(b'1110'); +select sf_bug26199(b'1111111'); +sf_bug26199(b'1111111') +0 +select sf_bug26199(b'101111111'); +sf_bug26199(b'101111111') +0 +Warnings: +Warning 1264 Out of range value adjusted for column 'b' at row 1 +select hex(b) from t2; +hex(b) +E +7F +7F +select hex(b) from t2; +hex(b) +E +7F +7F +drop table t1,t2; drop function f1; drop function f2; drop procedure p1; +drop procedure sp_bug26199; +drop function sf_bug26199; diff -Nrup a/mysql-test/t/rpl_sp_effects.test b/mysql-test/t/rpl_sp_effects.test --- a/mysql-test/t/rpl_sp_effects.test 2005-09-07 18:39:41 +03:00 select 'slave', a from t1; +# bug#26199 Replication Failure on Slave when using stored procs with bit-type parameters --- a/sql/sp_head.cc 2007-07-31 15:23:23 +03:00@@ -100,8 +100,9 @@ sp_get_item_value(THD *thd, Item *item,
case REAL_RESULT:
case STRING_RESULT:
{
String *result= item->val_str(str);
-- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Fri Sep 14 10:02:13 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 09:28:34 EDT |
||||||||||
|
|||||||||||