mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Problem: Pushbuild errors because sql_mode is unsafe but test thinks it is
safe. Fix: Move sql_mode: from the section of the test where safe variables are tested, to the section where unsafe variables are tested. mysql-test/suite/binlog/r/binlog_unsafe.result: Updated result file of modified test.
This commit is contained in:
@ -20,6 +20,9 @@ Warning 1592 Statement is not safe to log in statement format.
|
|||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
|
Warnings:
|
||||||
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
@ -33,6 +36,7 @@ INSERT INTO t1 VALUES (@@global.sync_binlog);
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
END|
|
END|
|
||||||
@ -44,6 +48,7 @@ Warning 1592 Statement is not safe to log in statement format.
|
|||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
---- Insert from stored function ----
|
---- Insert from stored function ----
|
||||||
CREATE FUNCTION func()
|
CREATE FUNCTION func()
|
||||||
RETURNS INT
|
RETURNS INT
|
||||||
@ -52,6 +57,7 @@ INSERT INTO t1 VALUES (@@global.sync_binlog);
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
@ -66,6 +72,7 @@ Warning 1592 Statement is not safe to log in statement format.
|
|||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
---- Insert from trigger ----
|
---- Insert from trigger ----
|
||||||
CREATE TRIGGER trig
|
CREATE TRIGGER trig
|
||||||
BEFORE INSERT ON trigger_table
|
BEFORE INSERT ON trigger_table
|
||||||
@ -75,6 +82,7 @@ INSERT INTO t1 VALUES (@@global.sync_binlog);
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
END|
|
END|
|
||||||
@ -87,13 +95,15 @@ Warning 1592 Statement is not safe to log in statement format.
|
|||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
---- Insert from prepared statement ----
|
---- Insert from prepared statement ----
|
||||||
PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)';
|
PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)';
|
||||||
PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)';
|
PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)';
|
||||||
PREPARE p3 FROM 'INSERT INTO t1 VALUES (@@global.auto_increment_increment)';
|
PREPARE p3 FROM 'INSERT INTO t1 VALUES (@@global.auto_increment_increment)';
|
||||||
PREPARE p4 FROM 'INSERT INTO t2 SELECT UUID()';
|
PREPARE p4 FROM 'INSERT INTO t2 SELECT UUID()';
|
||||||
PREPARE p5 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)';
|
PREPARE p5 FROM 'INSERT INTO t2 VALUES (@@session.sql_mode)';
|
||||||
PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@hostname)';
|
PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)';
|
||||||
|
PREPARE p7 FROM 'INSERT INTO t2 VALUES (@@hostname)';
|
||||||
EXECUTE p1;
|
EXECUTE p1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
@ -112,6 +122,9 @@ Warning 1592 Statement is not safe to log in statement format.
|
|||||||
EXECUTE p6;
|
EXECUTE p6;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
|
EXECUTE p7;
|
||||||
|
Warnings:
|
||||||
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
---- Insert from nested call of triggers / functions / procedures ----
|
---- Insert from nested call of triggers / functions / procedures ----
|
||||||
CREATE PROCEDURE proc1()
|
CREATE PROCEDURE proc1()
|
||||||
INSERT INTO trigger_table VALUES ('ha!')|
|
INSERT INTO trigger_table VALUES ('ha!')|
|
||||||
@ -147,13 +160,13 @@ Warning 1592 Statement is not safe to log in statement format.
|
|||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
Warning 1592 Statement is not safe to log in statement format.
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
|
Warning 1592 Statement is not safe to log in statement format.
|
||||||
==== Variables that should *not* be unsafe ====
|
==== Variables that should *not* be unsafe ====
|
||||||
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
||||||
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
||||||
INSERT INTO t1 VALUES (@@session.foreign_key_checks);
|
INSERT INTO t1 VALUES (@@session.foreign_key_checks);
|
||||||
INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
|
INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
|
||||||
INSERT INTO t1 VALUES (@@session.unique_checks);
|
INSERT INTO t1 VALUES (@@session.unique_checks);
|
||||||
INSERT INTO t2 VALUES (@@session.sql_mode);
|
|
||||||
INSERT INTO t1 VALUES (@@session.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@session.auto_increment_increment);
|
||||||
INSERT INTO t1 VALUES (@@session.auto_increment_offset);
|
INSERT INTO t1 VALUES (@@session.auto_increment_offset);
|
||||||
INSERT INTO t2 VALUES (@@session.character_set_client);
|
INSERT INTO t2 VALUES (@@session.character_set_client);
|
||||||
@ -179,4 +192,3 @@ DROP PROCEDURE proc4;
|
|||||||
DROP FUNCTION func5;
|
DROP FUNCTION func5;
|
||||||
DROP PREPARE prep6;
|
DROP PREPARE prep6;
|
||||||
DROP TABLE t1, t2, t3, trigger_table, trigger_table2;
|
DROP TABLE t1, t2, t3, trigger_table, trigger_table2;
|
||||||
DROP VIEW v1;
|
|
||||||
|
@ -81,6 +81,7 @@ INSERT INTO t1 VALUES (@@global.sync_binlog);
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
|
|
||||||
@ -93,6 +94,7 @@ BEGIN
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
END|
|
END|
|
||||||
@ -110,6 +112,7 @@ BEGIN
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
@ -129,6 +132,7 @@ BEGIN
|
|||||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||||
INSERT INTO t2 SELECT UUID();
|
INSERT INTO t2 SELECT UUID();
|
||||||
|
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
END|
|
END|
|
||||||
@ -142,10 +146,12 @@ PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)';
|
|||||||
PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)';
|
PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)';
|
||||||
PREPARE p3 FROM 'INSERT INTO t1 VALUES (@@global.auto_increment_increment)';
|
PREPARE p3 FROM 'INSERT INTO t1 VALUES (@@global.auto_increment_increment)';
|
||||||
PREPARE p4 FROM 'INSERT INTO t2 SELECT UUID()';
|
PREPARE p4 FROM 'INSERT INTO t2 SELECT UUID()';
|
||||||
PREPARE p5 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)';
|
PREPARE p5 FROM 'INSERT INTO t2 VALUES (@@session.sql_mode)';
|
||||||
PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@hostname)';
|
PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)';
|
||||||
|
PREPARE p7 FROM 'INSERT INTO t2 VALUES (@@hostname)';
|
||||||
|
|
||||||
EXECUTE p1; EXECUTE p2; EXECUTE p3; EXECUTE p4; EXECUTE p5; EXECUTE p6;
|
EXECUTE p1; EXECUTE p2; EXECUTE p3; EXECUTE p4; EXECUTE p5;
|
||||||
|
EXECUTE p6; EXECUTE p7;
|
||||||
|
|
||||||
--echo ---- Insert from nested call of triggers / functions / procedures ----
|
--echo ---- Insert from nested call of triggers / functions / procedures ----
|
||||||
|
|
||||||
@ -200,7 +206,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
|||||||
INSERT INTO t1 VALUES (@@session.foreign_key_checks);
|
INSERT INTO t1 VALUES (@@session.foreign_key_checks);
|
||||||
INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
|
INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
|
||||||
INSERT INTO t1 VALUES (@@session.unique_checks);
|
INSERT INTO t1 VALUES (@@session.unique_checks);
|
||||||
INSERT INTO t2 VALUES (@@session.sql_mode);
|
|
||||||
INSERT INTO t1 VALUES (@@session.auto_increment_increment);
|
INSERT INTO t1 VALUES (@@session.auto_increment_increment);
|
||||||
INSERT INTO t1 VALUES (@@session.auto_increment_offset);
|
INSERT INTO t1 VALUES (@@session.auto_increment_offset);
|
||||||
INSERT INTO t2 VALUES (@@session.character_set_client);
|
INSERT INTO t2 VALUES (@@session.character_set_client);
|
||||||
|
Reference in New Issue
Block a user