diff options
author | unknown <ram@gw.mysql.r18.ru> | 2004-01-22 18:05:47 +0400 |
---|---|---|
committer | unknown <ram@gw.mysql.r18.ru> | 2004-01-22 18:05:47 +0400 |
commit | ef325a4704e9aabe09f773528f6496a94298396f (patch) | |
tree | e54fe0db01fe767dff386d9f648bc7f6557511f8 /myisam/mi_key.c | |
parent | 9d59b3481b4f207f363dafc7c98954903adedb8c (diff) | |
download | mariadb-git-ef325a4704e9aabe09f773528f6496a94298396f.tar.gz |
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
<monty> ramil, in MySQL/MyISAM we should only strip end space, not 'space-like' characters.
<monty> This is according to SQL; When doing a comparision end space and only end space are ignored.
myisam/mi_key.c:
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
myisam/mi_search.c:
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
mysql-test/r/select.result:
test case for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
mysql-test/t/select.test:
test case for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
sql/sql_string.cc:
a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause.
Diffstat (limited to 'myisam/mi_key.c')
-rw-r--r-- | myisam/mi_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c index 58318697e57..766ecf334b6 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -62,7 +62,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, end=pos+length; if (type != HA_KEYTYPE_NUM) { - while (end > pos && (end[-1] == ' ' || end[-1] == '\t')) + while (end > pos && end[-1] == ' ') end--; } else @@ -186,7 +186,7 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old, end=pos+length; if (type != HA_KEYTYPE_NUM) { - while (end > pos && (end[-1] == ' ' || end[-1] == '\t')) + while (end > pos && end[-1] == ' ') end--; } else |