diff options
author | unknown <gshchepa/uchum@host.loc> | 2008-05-06 21:43:46 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@host.loc> | 2008-05-06 21:43:46 +0500 |
commit | 5a1b7ddb683a34c0a512c890a11170e0b0b14da2 (patch) | |
tree | 274f7ab47cd2d388e2f9a34437a09d2eaba46f74 /mysql-test/r | |
parent | 65a310fe2a594aca6e73308896763933adb59e3e (diff) | |
download | mariadb-git-5a1b7ddb683a34c0a512c890a11170e0b0b14da2.tar.gz |
Partial rollback of fix for bug #30059: End-space truncation is inconsistent
or incorrect.
For better conformance with standard, truncation procedure of CHAR columns
has been changed to ignore truncation of trailing whitespace characters
(note has been removed).
Finally, for columns with non-binary charsets:
1. CHAR(N) columns silently ignore trailing whitespace truncation;
2. VARCHAR and TEXT columns issue Note about truncation.
BLOBs and other columns with BINARY charset are unaffected.
mysql-test/r/bdb.result:
Rollback of bug #30059 fix.
mysql-test/r/heap.result:
Rollback of bug #30059 fix.
mysql-test/r/innodb.result:
Rollback of bug #30059 fix.
mysql-test/r/myisam.result:
Rollback of bug #30059 fix.
mysql-test/r/strict.result:
Rollback of bug #30059 fix.
mysql-test/r/type_binary.result:
Rollback of bug #30059 fix.
mysql-test/r/warnings.result:
Updated test case for bug #30059.
sql/field.cc:
Post-commit fix for bug #30059.
The Field_longstr::report_if_important_data method
has been changed to notify about trailing spaces only if
the new count_spaces parameter is TRUE.
The Field_string::store method has been changed to
ignore trailing whitespace truncation (CHAR column
type).
sql/field.h:
Post-commit fix for bug #30059.
The Field_longstr::report_if_important_data method declaration
has been changed to accept extra parameter: bool count_spaces.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/bdb.result | 1 | ||||
-rw-r--r-- | mysql-test/r/heap.result | 1 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 1 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 1 | ||||
-rw-r--r-- | mysql-test/r/strict.result | 2 | ||||
-rw-r--r-- | mysql-test/r/type_binary.result | 1 | ||||
-rw-r--r-- | mysql-test/r/warnings.result | 2 |
7 files changed, 0 insertions, 9 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index fefeeb405c5..3356d23053f 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1325,7 +1325,6 @@ set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: Note 1265 Data truncated for column 'v' at row 1 -Note 1265 Data truncated for column 'c' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index adfcc00174f..906c431b834 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -256,7 +256,6 @@ set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: Note 1265 Data truncated for column 'v' at row 1 -Note 1265 Data truncated for column 'c' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 774e0bd167b..854712fdb1d 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1901,7 +1901,6 @@ set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: Note 1265 Data truncated for column 'v' at row 1 -Note 1265 Data truncated for column 'c' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 24c1cecfb4f..33f64d600bb 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1104,7 +1104,6 @@ set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: Note 1265 Data truncated for column 'v' at row 1 -Note 1265 Data truncated for column 'c' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 0a714635f70..34869862a63 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -934,8 +934,6 @@ NULL NULL DROP TABLE t1; CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6)); INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello '); -Warnings: -Note 1265 Data truncated for column 'col1' at row 3 INSERT INTO t1 (col1) VALUES ('hellobob'); ERROR 22001: Data too long for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES ('hellobob'); diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result index aaa46ab415e..debf4ff8fb8 100644 --- a/mysql-test/r/type_binary.result +++ b/mysql-test/r/type_binary.result @@ -125,7 +125,6 @@ create table t1 (c char(2), vc varchar(2)); insert into t1 values(0x4120, 0x4120); insert into t1 values(0x412020, 0x412020); Warnings: -Note 1265 Data truncated for column 'c' at row 1 Note 1265 Data truncated for column 'vc' at row 1 drop table t1; set @old_sql_mode= @@sql_mode, sql_mode= 'traditional'; diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index e74f92205aa..94170a04674 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -305,7 +305,6 @@ set @q = repeat('q', 256); set sql_mode = ''; insert into t1 values(@c, @c, @c); Warnings: -Note 1265 Data truncated for column 'c_char' at row 1 Note 1265 Data truncated for column 'c_varchar' at row 1 Note 1265 Data truncated for column 'c_tinytext' at row 1 insert into t2 values(@c); @@ -322,7 +321,6 @@ Warning 1265 Data truncated for column 'c_tinyblob' at row 1 set sql_mode = 'traditional'; insert into t1 values(@c, @c, @c); Warnings: -Note 1265 Data truncated for column 'c_char' at row 1 Note 1265 Data truncated for column 'c_varchar' at row 1 Note 1265 Data truncated for column 'c_tinytext' at row 1 insert into t2 values(@c); |