mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #54579 Wrong unsafe warning for INSERT DELAYED in SBR
The lock_type is upgrade to TL_WRITE from TL_WRITE_DELAYED for INSERT DELAYED when inserting multi values in one statement. It's safe. But it causes an unsafe warning in SBR. Make INSERT DELAYED safe by logging it as INSERT without DELAYED.
This commit is contained in:
@ -338,10 +338,21 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) {
|
||||
SHOW BINLOG EVENTS;
|
||||
--die Warnings printed
|
||||
}
|
||||
# The first event is format_description, the second is
|
||||
# Query_event('BEGIN'), and the third should be our Table_map.
|
||||
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 3)
|
||||
if (`SELECT '$event_type' != 'Table_map'`) {
|
||||
# The first event is format_description, the second is
|
||||
# Query_event('BEGIN'), and the third should be our Query
|
||||
# for 'INSERT DELAYED' unsafe_type 3, which is safe after
|
||||
# the fix of bug#54579.
|
||||
if (`SELECT $unsafe_type = 3 AND '$event_type' != 'Query'`) {
|
||||
--enable_query_log
|
||||
--echo ******** Failure! Event number 3 was a '$event_type', not a 'Query'. ********
|
||||
SHOW BINLOG EVENTS;
|
||||
--die Wrong events in binlog.
|
||||
}
|
||||
# The first event is format_description, the second is
|
||||
# Query_event('BEGIN'), and the third should be our Table_map
|
||||
# for unsafe statement.
|
||||
if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) {
|
||||
--enable_query_log
|
||||
--echo ******** Failure! Event number 3 was a '$event_type', not a 'Table_map'. ********
|
||||
SHOW BINLOG EVENTS;
|
||||
|
Reference in New Issue
Block a user