Commit 1a3d5fbf authored by Sven Sandberg's avatar Sven Sandberg

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.
parent 8b27f9a0
==== 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: ...@@ -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. ...@@ -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. ...@@ -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. ...@@ -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: ...@@ -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. ...@@ -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); ...@@ -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; ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment