summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@host.loc>2008-05-06 21:43:46 +0500
committerunknown <gshchepa/uchum@host.loc>2008-05-06 21:43:46 +0500
commit5a1b7ddb683a34c0a512c890a11170e0b0b14da2 (patch)
tree274f7ab47cd2d388e2f9a34437a09d2eaba46f74 /sql/field.h
parent65a310fe2a594aca6e73308896763933adb59e3e (diff)
downloadmariadb-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 'sql/field.h')
-rw-r--r--sql/field.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index c82d65147ac..8d771a151a7 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -455,7 +455,8 @@ public:
class Field_longstr :public Field_str
{
protected:
- int report_if_important_data(const char *ptr, const char *end);
+ int report_if_important_data(const char *ptr, const char *end,
+ bool count_spaces);
public:
Field_longstr(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,