Simple update query has strange characters in binary log
Posted by: kjcsb
Date: February 07, 2007 10:24PM

I have the following stored procedure:
DELIMITER $$

DROP PROCEDURE IF EXISTS `tool`.`sp_replicate` $$
CREATE PROCEDURE `sp_replicate`(IN HOST VARCHAR(45))
BEGIN
DECLARE LAST_ID, GREATEST_ID INT;
START TRANSACTION;
SELECT MAX(id) INTO GREATEST_ID FROM cdrdb.cdr;
UPDATE tool.replicate_track SET id = GREATEST_ID where host = HOST;
COMMIT;
END $$

DELIMITER ;

This is called using the following:
* * * * * mysql --user='call' --password='call' --execute="CALL tool.sp_replicate_asterisk_cdr(60)"

The following appears in the binary log:
UPDATE cdr.replicate_track SET id = NAME_CONST('GREATEST_ID',10353) where NAME_CONST('host',O #@pX
Ø$ð|XpX
ÈaÏ
Øa_latin1'60') = NAME_CONST('HOST',OÌÛ"hpX
Ø$b|XȺ. #ÈaÏ
Øa_latin1'60');

This is causing replication problems so I wondered how to avoid it. Is it character set related? Any advice would be appreciated. Note that I need to pass alphanumeric data to the stored procedure; enclosing the passed data in '' didn't help.

Options: ReplyQuote


Subject
Views
Written By
Posted
Simple update query has strange characters in binary log
2877
February 07, 2007 10:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.