mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#50312 Warnings for unsafe sub-statement not returned to client
After BUG#36649, warnings for sub-statements are cleared when a new sub-statement is started. This is problematic since it suppresses warnings for unsafe statements in some cases. It is important that we always give a warning to the client, because the user needs to know when there is a risk that the slave goes out of sync. We fixed the problem by generating warning messages for unsafe statements while returning from a stored procedure, function, trigger or while executing a top level statement. We also started checking unsafeness when both performance and log tables are used. This is necessary after the performance schema which does a distinction between performance and log tables.
This commit is contained in:
@ -200,7 +200,7 @@ if (`SELECT $CRC_ARG_type = 1`) {
|
||||
if (`SELECT $CRC_ARG_type = 2`) {
|
||||
# It will be unsafe to call this procedure.
|
||||
--let $CRC_name= proc_$CRC_ARG_level
|
||||
--let $CRC_create= CREATE PROCEDURE $CRC_name() BEGIN INSERT INTO ta$CRC_ARG_level VALUES (47); $CRC_ARG_stmt_sidef; END
|
||||
--let $CRC_create= CREATE PROCEDURE $CRC_name() BEGIN $CRC_ARG_stmt_sidef; INSERT INTO ta$CRC_ARG_level VALUES (47); END
|
||||
--let $CRC_RET_stmt_sidef= CALL $CRC_name()
|
||||
--let $CRC_RET_value=
|
||||
--let $CRC_RET_sel_retval=
|
||||
@ -344,25 +344,8 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
|
||||
if (`SELECT '$event_type' != 'Table_map'`) {
|
||||
--enable_query_log
|
||||
--echo ******** Failure! Event number 3 was a '$event_type', not a 'Table_map'. ********
|
||||
|
||||
# Currently, there is a bug causing some statements to be logged
|
||||
# partially in statement format. Hence, we don't fail here, we
|
||||
# just print the events (masking out nondeterministic components
|
||||
# of the output) and continue. When binloggging works perfectly,
|
||||
# we should instead execute:
|
||||
#--enable_query_log
|
||||
#SHOW BINLOG EVENTS;
|
||||
#--die Wrong events in binlog.
|
||||
|
||||
# Here, we should really source
|
||||
# include/show_binlog_events.inc. But due to BUG#41913, that
|
||||
# doesn't work, and we have to inline the entire file here. Sigh
|
||||
# :-(
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR 107 <binlog_start>
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
|
||||
--eval SHOW BINLOG EVENTS FROM 107
|
||||
--disable_query_log
|
||||
SHOW BINLOG EVENTS;
|
||||
--die Wrong events in binlog.
|
||||
}
|
||||
SET binlog_format = STATEMENT;
|
||||
|
||||
|
Reference in New Issue
Block a user