summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jani@prima.mysql.fi>2000-12-08 00:34:16 +0200
committerunknown <jani@prima.mysql.fi>2000-12-08 00:34:16 +0200
commit1324803d765267696b4d75b5d0a2546dc2686881 (patch)
tree31d3abc6417e660720a808c63266d3405426f25f
parentbbc25ae6948cac32cc8322eb15e508d1dde1c49c (diff)
downloadmariadb-git-1324803d765267696b4d75b5d0a2546dc2686881.tar.gz
Temporary fix for handling wild_one at end of string (key compression).
Full fix shall be in MySQL 4.1. (This is a hard one (!)) sql/opt_range.cc: Temporary fix for handling wild_one at end of string (key compression). A full fix shall be somewhere in 4.1 (!) This is a hard one... BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--sql/opt_range.cc5
2 files changed, 6 insertions, 0 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index ce14b65fb96..fb7d3b9d9c5 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -2,3 +2,4 @@ jani@prima.mysql.com
sasha@mysql.sashanet.com
sasha@work.mysql.com
serg@serg.mysql.com
+jani@prima.mysql.fi
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index dfd45933999..a3f236462b4 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1116,6 +1116,11 @@ static bool like_range(const char *ptr,uint ptr_length,char escape,
*min_str++= *max_str++ = *ptr;
}
*min_length= *max_length = (uint) (min_str - min_org);
+
+ /* Temporary fix for handling wild_one at end of string (key compression) */
+ for (char *tmp= min_str ; tmp > min_org && tmp[-1] == '\0';)
+ *--tmp=' ';
+
while (min_str != min_end)
*min_str++ = *max_str++ = ' '; // Because if key compression
return 0;