Skip to content

Commit 0758893

Browse files
author
Sven Sandberg
committed
Post-push fixes after wrong merge from 5.1->rep+2->rep+3.
Problem: The test was written before BUG#45827 was fixed. The test contained code that assumed the wrong behavior, pre-BUG#45827. Then, the fix for BUG#45827 was merged from 5.1-rep+2 to 5.1-rep+3. Since the test case assumed the wrong behavior, it failed. This should have been fixed by making the test assume the correct behavior, but was fixed by updating the result file to assert failure. Fix 1: fix the test to assume correct behavior (post-BUG#45827), update result file. Fix 2: make test fail with 'die' instead of 'exit' when wrong behavior is detected. Thus, the test cannot be silenced with a wrong result file in case the behavior will change again.
1 parent 75f382e commit 0758893

File tree

3 files changed

+1945
-47
lines changed

3 files changed

+1945
-47
lines changed

mysql-test/extra/rpl_tests/create_recursive_construct.inc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
296296
--eval $CRC_RET_stmt_sidef
297297
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
298298
if (`SELECT '$n_warnings' != '$CRC_ARG_expected_number_of_warnings'`) {
299-
--echo Failure! Expected $CRC_ARG_expected_number_of_warnings warnings, got $n_warnings warnings.
299+
--echo ******** Failure! Expected $CRC_ARG_expected_number_of_warnings warnings, got $n_warnings warnings. ********
300300
SHOW WARNINGS;
301301
SHOW BINLOG EVENTS;
302-
--exit
302+
--die Wrong number of warnings.
303303
}
304304

305305
# These queries are run without query log, to make result file more
@@ -313,17 +313,17 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
313313
--eval $CRC_RET_stmt_sidef
314314
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
315315
if (`SELECT '$n_warnings' != '0'`) {
316-
--echo Failure! Expected 0 warnings, got $n_warnings warnings.
316+
--echo ******** Failure! Expected 0 warnings, got $n_warnings warnings. ********
317317
SHOW WARNINGS;
318318
SHOW BINLOG EVENTS;
319-
--exit
319+
--die Wrong number of warnings.
320320
}
321321
--let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 2)
322322
if (`SELECT '$binlog_event' != 'No such row'`) {
323323
--enable_query_log
324-
--echo Failure! Something was written to the binlog despite SQL_LOG_BIN=0:
324+
--echo ******** Failure! Something was written to the binlog despite SQL_LOG_BIN=0 ********
325325
SHOW BINLOG EVENTS;
326-
--exit
326+
--die Binlog not empty
327327
}
328328
SET SQL_LOG_BIN = 1;
329329

@@ -333,17 +333,17 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
333333
--eval $CRC_RET_stmt_sidef
334334
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
335335
if (`SELECT '$n_warnings' != '0'`) {
336-
--echo Failure! Expected 0 warnings, got $n_warnings warnings.
336+
--echo ******** Failure! Expected 0 warnings, got $n_warnings warnings. ********
337337
SHOW WARNINGS;
338338
SHOW BINLOG EVENTS;
339-
--exit
339+
--die Warnings printed
340340
}
341341
# The first event is format_description, the second is
342342
# Query_event('BEGIN'), and the third should be our Table_map.
343343
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 3)
344344
if (`SELECT '$event_type' != 'Table_map'`) {
345345
--enable_query_log
346-
--echo Failure! Event number 3 was a '$event_type', not a 'Table_map'.
346+
--echo ******** Failure! Event number 3 was a '$event_type', not a 'Table_map'. ********
347347

348348
# Currently, there is a bug causing some statements to be logged
349349
# partially in statement format. Hence, we don't fail here, we
@@ -352,7 +352,7 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
352352
# we should instead execute:
353353
#--enable_query_log
354354
#SHOW BINLOG EVENTS;
355-
#--exit
355+
#--die Wrong events in binlog.
356356

357357
# Here, we should really source
358358
# include/show_binlog_events.inc. But due to BUG#41913, that
@@ -386,7 +386,7 @@ if (`SELECT '$CRC_RET_sel_retval' != ''`) {
386386
# --echo Failure! Expected 0 warnings, got $n_warnings warnings.
387387
# SHOW WARNINGS;
388388
# SHOW BINLOG EVENTS;
389-
# --exit
389+
# --die Wrong number of warnings.
390390
#}
391391
}
392392

0 commit comments

Comments
 (0)