summaryrefslogtreecommitdiff
path: root/mysql-test/r/strict.result
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@host.loc>2008-02-07 02:33:21 +0400
committerunknown <gshchepa/uchum@host.loc>2008-02-07 02:33:21 +0400
commit3891d43617e82dcb1a1ecdf876fa2094d672cb79 (patch)
treeff291bc2f29088223b8c4d9ca51b5f4dc2d2ec2e /mysql-test/r/strict.result
parent1919d238e530d6c551ca60893f62e51dbad325cd (diff)
downloadmariadb-git-3891d43617e82dcb1a1ecdf876fa2094d672cb79.tar.gz
Fixed bug#30059.
Server handles truncation for assignment of too-long values into CHAR/VARCHAR/TEXT columns in a different ways when the truncated characters are spaces: 1. CHAR(N) columns silently ignore end-space truncation; 2. TEXT columns post a truncation warning/error in the non-strict/strict mode. 3. VARCHAR columns always post a truncation note in any mode. Space truncation processing has been synchronised over CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR columns has been propagated as standard. Binary-encoded string/BLOB columns are not affected. mysql-test/r/heap.result: Updated test case for bug#30059. mysql-test/r/innodb.result: Updated test case for bug#30059. mysql-test/r/myisam.result: Updated test case for bug#30059. mysql-test/r/strict.result: Updated test case for bug#30059. mysql-test/r/type_binary.result: Updated test case for bug#30059. mysql-test/r/warnings.result: Added test case for bug#30059. mysql-test/t/warnings.test: Added test case for bug#30059. sql/field.cc: Fixed bug#30059. The report_data_too_long function was replaced with the Field_longstr::report_if_important_data method. The Field_string::store and the Field_blob::store methods was synchronized with the Field_varstring::store method. Changes: 1. to CHAR(N): posting of space truncation note has been added in both (strict and non-strict) modes; 2. to BLOBs: a check for space truncation has been added, a warning in the non-strict mode and an error message in the strict mode have been replaced with a truncation note. Similar parts of Field_string::store, Field_blob::store and Field_varstring::store have been moved to the Field_longstr::report_if_important_data method. sql/field.h: Fixed bug#30059. The Field_longstr::report_if_important_data method has been declared.
Diffstat (limited to 'mysql-test/r/strict.result')
-rw-r--r--mysql-test/r/strict.result2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 34869862a63..0a714635f70 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -934,6 +934,8 @@ 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');