summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <ram@gw.mysql.r18.ru>2004-01-16 19:18:57 +0400
committerunknown <ram@gw.mysql.r18.ru>2004-01-16 19:18:57 +0400
commit2ff0016df35be813d335178cab2df0c99e6cbeff (patch)
tree47e0e0d3d5b597791c1747e4b868642afa397c33 /myisam
parentd894ca49bd899b4317f1c0a9627f3248c407f078 (diff)
downloadmariadb-git-2ff0016df35be813d335178cab2df0c99e6cbeff.tar.gz
a fix (Bug #2298: Trailing whitespace inconsistently handled in WHERE clause)
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_key.c4
-rw-r--r--myisam/mi_search.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c
index 766ecf334b6..58318697e57 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] == ' ')
+ while (end > pos && (end[-1] == ' ' || end[-1] == '\t'))
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] == ' ')
+ while (end > pos && (end[-1] == ' ' || end[-1] == '\t'))
end--;
}
else
diff --git a/myisam/mi_search.c b/myisam/mi_search.c
index c6ee18a8477..82004c6f172 100644
--- a/myisam/mi_search.c
+++ b/myisam/mi_search.c
@@ -795,9 +795,9 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a,
uint length=(uint) (end-a), a_length=length, b_length=length;
if (!(nextflag & SEARCH_PREFIX))
{
- while (a_length && a[a_length-1] == ' ')
+ while (a_length && (a[a_length-1] == ' ' || a[a_length-1] == '\t'))
a_length--;
- while (b_length && b[b_length-1] == ' ')
+ while (b_length && (b[b_length-1] == ' ' || b[b_length-1] == '\t'))
b_length--;
}
if (piks &&
@@ -849,9 +849,9 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a,
if (!(nextflag & (SEARCH_PREFIX | SEARCH_UPDATE)))
{
- while (a_length && a[a_length-1] == ' ')
+ while (a_length && (a[a_length-1] == ' ' || a[a_length-1] == '\t'))
a_length--;
- while (b_length && b[b_length-1] == ' ')
+ while (b_length && (b[b_length-1] == ' ' || b[b_length-1] == '\t'))
b_length--;
}
if (piks &&