mirror of
https://github.com/MariaDB/server.git
synced 2025-08-27 13:04:36 +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:
@@ -72,6 +72,8 @@ before call db1.p1()
|
||||
INSERT INTO db1.t2 VALUES ('before call db1.p2()');
|
||||
BEGIN;
|
||||
CALL db1.p2();
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
|
||||
ROLLBACK;
|
||||
INSERT INTO db1.t2 VALUES ('after call db1.p2()');
|
||||
SELECT * FROM db1.t1;
|
||||
|
Reference in New Issue
Block a user