From: Date: June 20 2007 11:06pm Subject: bk commit into 5.0 tree (gshchepa:1.2498) BUG#28293 List-Archive: http://lists.mysql.com/commits/29219 X-Bug: 28293 Message-Id: <20070620210648.6EF683D495C@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of uchum. When uchum does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-06-21 02:06:43+05:00, gshchepa@stripped +3 -0 Fixed bug #28293. Occasionally mysqlbinlog --hexdump failed with error: ERROR 1064 (42000) at line ...: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query thread_id=... exec_time=... error_code=... When the length of hexadecimal dump of binlog header was divisible by 16, commentary sign '#' after header was lost. The Log_event::print_header function has been modified to always finish hexadecimal binlog header with "\n# ". mysql-test/r/mysqlbinlog.result@stripped, 2007-06-21 02:05:45+05:00, gshchepa@stripped +6 -0 Updated test case for bug #28293. mysql-test/t/mysqlbinlog.test@stripped, 2007-06-21 02:05:45+05:00, gshchepa@stripped +13 -0 Updated test case for bug #28293. sql/log_event.cc@stripped, 2007-06-21 02:05:42+05:00, gshchepa@stripped +5 -1 Fixed bug #28293. The Log_event::print_header function has been modified to always finish hexadecimal binlog header with "\n# ". # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: gshchepa # Host: gleb.loc # Root: /home/uchum/work/bk/5.0-opt-28293 --- 1.233/sql/log_event.cc 2007-05-29 00:20:18 +05:00 +++ 1.234/sql/log_event.cc 2007-06-21 02:05:42 +05:00 @@ -1001,11 +1001,15 @@ void Log_event::print_header(FILE* file, } *c= '\0'; - /* Non-full last line */ if (hex_string[0]) + { + /* Non-full last line */ fprintf(file, "# %8.8lx %-48.48s |%s|\n# ", (unsigned long) (hexdump_from + (i & 0xfffffff0)), hex_string, char_string); + } + else + fprintf(file, "# "); } } --- 1.34/mysql-test/r/mysqlbinlog.result 2007-03-31 20:18:01 +05:00 +++ 1.35/mysql-test/r/mysqlbinlog.result 2007-06-21 02:05:45 +05:00 @@ -312,4 +312,10 @@ DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +CREATE TABLE t1 (c1 CHAR(10)); +flush logs; +INSERT INTO t1 VALUES ('0123456789'); +flush logs; +DROP TABLE t1; +# Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED End of 5.0 tests --- 1.48/mysql-test/t/mysqlbinlog.test 2007-06-15 02:22:14 +05:00 +++ 1.49/mysql-test/t/mysqlbinlog.test 2007-06-21 02:05:45 +05:00 @@ -203,4 +203,17 @@ flush logs; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000009 +# +# Bug#28293 missed '#' sign in the hex dump when the dump length +# is divisible by 16. +# + +CREATE TABLE t1 (c1 CHAR(10)); +# we need this for getting fixed timestamps inside of this test +flush logs; +INSERT INTO t1 VALUES ('0123456789'); +flush logs; +DROP TABLE t1; +--exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000011 | grep 'Query' | sed 's/[0-9]\{1,\}/REMOVED/g' + --echo End of 5.0 tests