summaryrefslogtreecommitdiff
path: root/mysys/tree.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-03-25 15:05:01 +0200
committermonty@mysql.com <>2004-03-25 15:05:01 +0200
commitebc3b3afac575b2c2a3e89823dfba217436a85c4 (patch)
tree27e5290a14e7d3e6c7aaced5b2ce86546de4721e /mysys/tree.c
parent042af556d57f305734e64c7aa047e4709288f5bd (diff)
downloadmariadb-git-ebc3b3afac575b2c2a3e89823dfba217436a85c4.tar.gz
BTREE-indexes in HEAP tables can now be used to optimize ORDER BY
Don't read character set files if we are using only the default charset. In most cases the user will not anymore get a warning about missing character set files Compare strings with space extend instead of space strip. Now the following comparisons holds: "a" == "a " and "a\t" < "a". (Bug #3152). Note: Because of the above fix, one has to do a REPAIR on any table that has an ascii character < 32 last in a CHAR/VARCHAR/TEXT columns.
Diffstat (limited to 'mysys/tree.c')
-rw-r--r--mysys/tree.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/mysys/tree.c b/mysys/tree.c
index 0b30ffa4971..063c8739e58 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -481,7 +481,6 @@ ha_rows tree_record_pos(TREE *tree, const void *key,
TREE_ELEMENT *element= tree->root;
double left= 1;
double right= tree->elements_in_tree;
- ha_rows last_equal_pos= HA_POS_ERROR;
while (element != &tree->null_element)
{
@@ -490,9 +489,6 @@ ha_rows tree_record_pos(TREE *tree, const void *key,
{
switch (flag) {
case HA_READ_KEY_EXACT:
- last_equal_pos= (ha_rows) ((left + right) / 2);
- cmp= 1;
- break;
case HA_READ_BEFORE_KEY:
cmp= 1;
break;
@@ -516,7 +512,6 @@ ha_rows tree_record_pos(TREE *tree, const void *key,
}
switch (flag) {
case HA_READ_KEY_EXACT:
- return last_equal_pos;
case HA_READ_BEFORE_KEY:
return (ha_rows) right;
case HA_READ_AFTER_KEY: