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. mysql-test/extra/rpl_tests/create_recursive_construct.inc: Replaced 'exit' by 'die' to avoid similar mysql-test/suite/binlog/r/binlog_unsafe.result: Updated result file. mysql-test/suite/binlog/t/binlog_unsafe.test: Since BUG#45827 is now fixed, we need to update the test case in two places where it expects the wrong result because of BUG#45827.
This commit is contained in:
parent
46fe96c11f
commit
e83c9f6273
@ -296,10 +296,10 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
|
|||||||
--eval $CRC_RET_stmt_sidef
|
--eval $CRC_RET_stmt_sidef
|
||||||
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||||
if (`SELECT '$n_warnings' != '$CRC_ARG_expected_number_of_warnings'`) {
|
if (`SELECT '$n_warnings' != '$CRC_ARG_expected_number_of_warnings'`) {
|
||||||
--echo Failure! Expected $CRC_ARG_expected_number_of_warnings warnings, got $n_warnings warnings.
|
--echo ******** Failure! Expected $CRC_ARG_expected_number_of_warnings warnings, got $n_warnings warnings. ********
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
--exit
|
--die Wrong number of warnings.
|
||||||
}
|
}
|
||||||
|
|
||||||
# These queries are run without query log, to make result file more
|
# These queries are run without query log, to make result file more
|
||||||
@ -313,17 +313,17 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
|
|||||||
--eval $CRC_RET_stmt_sidef
|
--eval $CRC_RET_stmt_sidef
|
||||||
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||||
if (`SELECT '$n_warnings' != '0'`) {
|
if (`SELECT '$n_warnings' != '0'`) {
|
||||||
--echo Failure! Expected 0 warnings, got $n_warnings warnings.
|
--echo ******** Failure! Expected 0 warnings, got $n_warnings warnings. ********
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
--exit
|
--die Wrong number of warnings.
|
||||||
}
|
}
|
||||||
--let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 2)
|
--let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 2)
|
||||||
if (`SELECT '$binlog_event' != 'No such row'`) {
|
if (`SELECT '$binlog_event' != 'No such row'`) {
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--echo Failure! Something was written to the binlog despite SQL_LOG_BIN=0:
|
--echo ******** Failure! Something was written to the binlog despite SQL_LOG_BIN=0 ********
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
--exit
|
--die Binlog not empty
|
||||||
}
|
}
|
||||||
SET SQL_LOG_BIN = 1;
|
SET SQL_LOG_BIN = 1;
|
||||||
|
|
||||||
@ -333,17 +333,17 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
|
|||||||
--eval $CRC_RET_stmt_sidef
|
--eval $CRC_RET_stmt_sidef
|
||||||
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||||
if (`SELECT '$n_warnings' != '0'`) {
|
if (`SELECT '$n_warnings' != '0'`) {
|
||||||
--echo Failure! Expected 0 warnings, got $n_warnings warnings.
|
--echo ******** Failure! Expected 0 warnings, got $n_warnings warnings. ********
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
--exit
|
--die Warnings printed
|
||||||
}
|
}
|
||||||
# The first event is format_description, the second is
|
# The first event is format_description, the second is
|
||||||
# Query_event('BEGIN'), and the third should be our Table_map.
|
# Query_event('BEGIN'), and the third should be our Table_map.
|
||||||
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 3)
|
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 3)
|
||||||
if (`SELECT '$event_type' != 'Table_map'`) {
|
if (`SELECT '$event_type' != 'Table_map'`) {
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--echo Failure! Event number 3 was a '$event_type', not a 'Table_map'.
|
--echo ******** Failure! Event number 3 was a '$event_type', not a 'Table_map'. ********
|
||||||
|
|
||||||
# Currently, there is a bug causing some statements to be logged
|
# Currently, there is a bug causing some statements to be logged
|
||||||
# partially in statement format. Hence, we don't fail here, we
|
# partially in statement format. Hence, we don't fail here, we
|
||||||
@ -352,7 +352,7 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
|
|||||||
# we should instead execute:
|
# we should instead execute:
|
||||||
#--enable_query_log
|
#--enable_query_log
|
||||||
#SHOW BINLOG EVENTS;
|
#SHOW BINLOG EVENTS;
|
||||||
#--exit
|
#--die Wrong events in binlog.
|
||||||
|
|
||||||
# Here, we should really source
|
# Here, we should really source
|
||||||
# include/show_binlog_events.inc. But due to BUG#41913, that
|
# include/show_binlog_events.inc. But due to BUG#41913, that
|
||||||
@ -386,7 +386,7 @@ if (`SELECT '$CRC_RET_sel_retval' != ''`) {
|
|||||||
# --echo Failure! Expected 0 warnings, got $n_warnings warnings.
|
# --echo Failure! Expected 0 warnings, got $n_warnings warnings.
|
||||||
# SHOW WARNINGS;
|
# SHOW WARNINGS;
|
||||||
# SHOW BINLOG EVENTS;
|
# SHOW BINLOG EVENTS;
|
||||||
# --exit
|
# --die Wrong number of warnings.
|
||||||
#}
|
#}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -194,8 +194,7 @@ while (`SELECT $unsafe_type < 9`) {
|
|||||||
--let $value_0=
|
--let $value_0=
|
||||||
--let $sel_sidef_0=
|
--let $sel_sidef_0=
|
||||||
--let $sel_retval_0=
|
--let $sel_retval_0=
|
||||||
# Note: we will expect 1 warning when BUG#45827 is fixed.
|
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||||
--let $CRC_ARG_expected_number_of_warnings= 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (`SELECT $unsafe_type = 5`) {
|
if (`SELECT $unsafe_type = 5`) {
|
||||||
@ -227,8 +226,7 @@ while (`SELECT $unsafe_type < 9`) {
|
|||||||
--let $value_0=
|
--let $value_0=
|
||||||
--let $sel_sidef_0=
|
--let $sel_sidef_0=
|
||||||
--let $sel_retval_0=
|
--let $sel_retval_0=
|
||||||
# Note: we will expect 7 warnings when BUG#45827 is fixed.
|
--let $CRC_ARG_expected_number_of_warnings= 7
|
||||||
--let $CRC_ARG_expected_number_of_warnings= 6
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (`SELECT $unsafe_type = 8`) {
|
if (`SELECT $unsafe_type = 8`) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user