1
SET @old_log_warnings = @@log_warnings;
2
SET @old_suppress_log_warning_1592 = @@suppress_log_warning_1592;
3
DROP TABLE IF EXISTS t1;
4
CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(20));
5
SET GLOBAL SUPPRESS_LOG_WARNING_1592 = 0;
6
SET GLOBAL LOG_WARNINGS = 0;
7
INSERT INTO t1 VALUES(UUID(), 'suppress_1592');
9
Note 1592 Statement may not be safe to log in statement format.
10
SET GLOBAL LOG_WARNINGS = 1;
11
INSERT INTO t1 VALUES(UUID(), 'suppress_1592');
13
Note 1592 Statement may not be safe to log in statement format.
14
SET GLOBAL SUPPRESS_LOG_WARNING_1592 = 1;
15
SET GLOBAL LOG_WARNINGS = 0;
16
INSERT INTO t1 VALUES(UUID(), 'suppress_1592');
18
Note 1592 Statement may not be safe to log in statement format.
19
SET GLOBAL LOG_WARNINGS = 1;
20
INSERT INTO t1 VALUES(UUID(), 'suppress_1592');
22
Note 1592 Statement may not be safe to log in statement format.
24
SET GLOBAL log_warnings = @old_log_warnings;
25
SET GLOBAL suppress_log_warning_1592 = @old_suppress_log_warning_1592;
26
# Count the number of times the "Unsafe" message was printed