summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSven Sandberg <sven.sandberg@oracle.com>2010-12-20 10:07:35 +0100
committerSven Sandberg <sven.sandberg@oracle.com>2010-12-20 10:07:35 +0100
commitc676f125a216d29660fff88b0c3dee947d3904d9 (patch)
tree1d7315db755444cff3bc86e9955183277ad9d3ee /mysql-test
parent09c80e12c535b080eaf914ed25dbf79546494030 (diff)
downloadmariadb-git-c676f125a216d29660fff88b0c3dee947d3904d9.tar.gz
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.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/binlog/r/binlog_unsafe.result12
-rw-r--r--mysql-test/suite/binlog/t/binlog_unsafe.test4
2 files changed, 4 insertions, 12 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result
index b851e472689..77fe5eb0b5e 100644
--- a/mysql-test/suite/binlog/r/binlog_unsafe.result
+++ b/mysql-test/suite/binlog/r/binlog_unsafe.result
@@ -1,8 +1,8 @@
==== Setup tables ====
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 trigger_table (a CHAR(7));
+CREATE TABLE trigger_table (a TEXT);
CREATE TABLE trigger_table2 (a INT);
==== Non-deterministic statements ====
INSERT DELAYED INTO t1 VALUES (5);
@@ -28,7 +28,6 @@ Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t2 VALUES (@@hostname);
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
Note 1592 Statement may not be safe to log in statement format.
---- Insert from stored procedure ----
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.
-Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
---- Insert from stored function ----
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.
-Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
---- Insert from trigger ----
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.
-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 prepared statement ----
@@ -128,7 +124,6 @@ Warnings:
Note 1592 Statement may not be safe to log in statement format.
EXECUTE p7;
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
Note 1592 Statement may not be safe to log in statement format.
---- Insert from nested call of triggers / functions / procedures ----
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.
-Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
==== Variables that should *not* be unsafe ====
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
@@ -309,8 +303,6 @@ INSERT INTO t2 VALUES (@@global.init_slave);
INSERT INTO t2 VALUES (@@hostname);
END|
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 func6;
DROP FUNCTION func7;
diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test
index 5e399f3e602..a86e49e475a 100644
--- a/mysql-test/suite/binlog/t/binlog_unsafe.test
+++ b/mysql-test/suite/binlog/t/binlog_unsafe.test
@@ -71,9 +71,9 @@ source include/have_binlog_format_statement.inc;
--echo ==== Setup tables ====
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 trigger_table (a CHAR(7));
+CREATE TABLE trigger_table (a TEXT);
CREATE TABLE trigger_table2 (a INT);