diff options
author | unknown <gshchepa/uchum@host.loc> | 2008-02-07 02:33:21 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@host.loc> | 2008-02-07 02:33:21 +0400 |
commit | 3891d43617e82dcb1a1ecdf876fa2094d672cb79 (patch) | |
tree | ff291bc2f29088223b8c4d9ca51b5f4dc2d2ec2e /mysql-test/r/myisam.result | |
parent | 1919d238e530d6c551ca60893f62e51dbad325cd (diff) | |
download | mariadb-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/myisam.result')
-rw-r--r-- | mysql-test/r/myisam.result | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 33f64d600bb..24c1cecfb4f 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1104,6 +1104,7 @@ 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,'*') *+ *+*+ * |