mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed pb failure.
Problem: Warnings for truncated data were generated on hosts with long host names because @@hostname was inserted into a CHAR(40) column. Fix: Change CHAR(40) to TEXT.
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
==== Setup tables ====
|
==== Setup tables ====
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT);
|
||||||
CREATE TABLE t2 (a CHAR(40));
|
CREATE TABLE t2 (a TEXT);
|
||||||
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY);
|
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY);
|
||||||
CREATE TABLE trigger_table (a CHAR(7));
|
CREATE TABLE trigger_table (a TEXT);
|
||||||
CREATE TABLE trigger_table2 (a INT);
|
CREATE TABLE trigger_table2 (a INT);
|
||||||
==== Non-deterministic statements ====
|
==== Non-deterministic statements ====
|
||||||
INSERT DELAYED INTO t1 VALUES (5);
|
INSERT DELAYED INTO t1 VALUES (5);
|
||||||
@ -28,7 +28,6 @@ Warnings:
|
|||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1265 Data truncated for column 'a' at row 1
|
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
---- Insert from stored procedure ----
|
---- Insert from stored procedure ----
|
||||||
CREATE PROCEDURE proc()
|
CREATE PROCEDURE proc()
|
||||||
@ -49,7 +48,6 @@ Note 1592 Statement may not be safe to log in statement format.
|
|||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Warning 1265 Data truncated for column 'a' at row 6
|
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
---- Insert from stored function ----
|
---- Insert from stored function ----
|
||||||
CREATE FUNCTION func()
|
CREATE FUNCTION func()
|
||||||
@ -74,7 +72,6 @@ Note 1592 Statement may not be safe to log in statement format.
|
|||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Warning 1265 Data truncated for column 'a' at row 6
|
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
---- Insert from trigger ----
|
---- Insert from trigger ----
|
||||||
CREATE TRIGGER trig
|
CREATE TRIGGER trig
|
||||||
@ -97,7 +94,6 @@ Note 1592 Statement may not be safe to log in statement format.
|
|||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Warning 1265 Data truncated for column 'a' at row 6
|
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
---- Insert from prepared statement ----
|
---- Insert from prepared statement ----
|
||||||
@ -128,7 +124,6 @@ Warnings:
|
|||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
EXECUTE p7;
|
EXECUTE p7;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1265 Data truncated for column 'a' at row 1
|
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be 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()
|
||||||
@ -165,7 +160,6 @@ Note 1592 Statement may not be safe to log in statement format.
|
|||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
Warning 1265 Data truncated for column 'a' at row 6
|
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be 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);
|
||||||
@ -309,8 +303,6 @@ INSERT INTO t2 VALUES (@@global.init_slave);
|
|||||||
INSERT INTO t2 VALUES (@@hostname);
|
INSERT INTO t2 VALUES (@@hostname);
|
||||||
END|
|
END|
|
||||||
INSERT INTO trigger_table VALUES ('bye.');
|
INSERT INTO trigger_table VALUES ('bye.');
|
||||||
Warnings:
|
|
||||||
Warning 1265 Data truncated for column 'a' at row 6
|
|
||||||
DROP FUNCTION fun_check_log_bin;
|
DROP FUNCTION fun_check_log_bin;
|
||||||
DROP FUNCTION func6;
|
DROP FUNCTION func6;
|
||||||
DROP FUNCTION func7;
|
DROP FUNCTION func7;
|
||||||
|
@ -71,9 +71,9 @@ source include/have_binlog_format_statement.inc;
|
|||||||
--echo ==== Setup tables ====
|
--echo ==== Setup tables ====
|
||||||
|
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT);
|
||||||
CREATE TABLE t2 (a CHAR(40));
|
CREATE TABLE t2 (a TEXT);
|
||||||
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY);
|
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY);
|
||||||
CREATE TABLE trigger_table (a CHAR(7));
|
CREATE TABLE trigger_table (a TEXT);
|
||||||
CREATE TABLE trigger_table2 (a INT);
|
CREATE TABLE trigger_table2 (a INT);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user