mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
mysqlbinlog now prints "# Number of rows" and stops on errors
Main problem was that no log-event print function checked for disk full error on the IO_CACHE. All changes in this patch only affects mysqlbinlog, not the server! - Changed all log-event print functions to return 1 on error - Fixed memory usage when not using --flashback. - Added printing of number of rows in row events. Can be disabled with --print-row-count=0 - Print annotated rows when using mysqlbinlog --short-form - Fixed that mysqlbinlog --debug works - Fixed create_drop_binlog.test test failure - Reorganized fields in PRINT_EVENT_INFO to be according to size to optimize storage - Don't change print_row_event_position or print_row_counts if set by user - Remove some testing of argument to my_free is 0 - base64-output=never is now supported and works in all context - Updated help information for --base64-output and --short-form - print_row_count is now on by default. Reset automatically if --short-form is used - Removed obsolote warning for mysql 5.6.0 - More DBUG_PRINT for mysqltest.cc - my_b_write_byte() now checks for flush failures. This fixed a memory overrun on disk full - my_b_printf() now returns 1 on failure, 0 on ok. This simplifies code and no old code was using the old return value of my_b_printf(). - my_b_Write_backtick_quote() now returns 1 on failure and 0 on ok - Fixed some error conditions in log printing that was not previously handled. - Slave_rows_error_report() can now handle longlong positions - Write_on_release_cache() rewritten so that we can detect errors on flush. Not depending on automatic release anymore. - Changed types for Pos and End_log_pos to 64 bit in SHOW BINLOG EVENTS - Fixed that copy_event_cache_to_string_and_reinit() works with strings longer than 4G (Changed to use LEX_STRING instead of String) - Restricted binlog_rows_event_max_size to UINT32_MAX-1 as String's are anyway restricted to UINT32_MAX - Fixed bug in rpl_binlog_state::write_to_iocache() which hide write failures (duplicate variable name) - Fixed bug in String::append if original string was not allocated - Stop mysqlbinlog output at once if there is an error. - Before printing error message, flush result file. This ensures that the error message is printed last. (Easier to find)
This commit is contained in:
@ -163,6 +163,7 @@ BEGIN
|
||||
### INSERT INTO `test1`.`t1`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -189,6 +190,7 @@ BEGIN
|
||||
### INSERT INTO `test2`.`t2`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -215,6 +217,7 @@ BEGIN
|
||||
### INSERT INTO `test3`.`t3`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -256,6 +259,7 @@ BEGIN
|
||||
### DELETE FROM `test2`.`t2`
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 6
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -282,6 +286,7 @@ BEGIN
|
||||
### INSERT INTO `test2`.`t2`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -310,6 +315,7 @@ BEGIN
|
||||
### DELETE FROM `test2`.`t2`
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -387,6 +393,7 @@ BEGIN
|
||||
### INSERT INTO `test1`.`t1`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -551,6 +558,7 @@ BEGIN
|
||||
### INSERT INTO `test1`.`t1`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -574,6 +582,7 @@ BEGIN
|
||||
### INSERT INTO `test2`.`t2`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -597,6 +606,7 @@ BEGIN
|
||||
### INSERT INTO `test3`.`t3`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -633,6 +643,7 @@ BEGIN
|
||||
### DELETE FROM `test2`.`t2`
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 6
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -656,6 +667,7 @@ BEGIN
|
||||
### INSERT INTO `test2`.`t2`
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@ -679,6 +691,7 @@ BEGIN
|
||||
### DELETE FROM `test2`.`t2`
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
# Number of rows: 3
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
|
Reference in New Issue
Block a user