diff options
author | unknown <monty@mysql.com> | 2005-10-25 02:27:40 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-10-25 02:27:40 +0300 |
commit | 8d6634c9e0c43b2d4ed2b0cc9f90b66c850855ab (patch) | |
tree | 56b86b67bce65a21ff4ffd27cd2dd139b110b622 /heap | |
parent | 3c02a0534d4b5450b2a5126bbf84428595c4a803 (diff) | |
download | mariadb-git-8d6634c9e0c43b2d4ed2b0cc9f90b66c850855ab.tar.gz |
Added more tests for new UPDATE ... ORDER BY ... LIMIT optimization
heap/_check.c:
Change arguments to ha_key_cmp
heap/hp_create.c:
Change arguments to ha_key_cmp
include/my_base.h:
Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument
myisam/mi_check.c:
Change arguments to ha_key_cmp
myisam/mi_rnext_same.c:
Change arguments to ha_key_cmp
myisam/mi_search.c:
Change arguments to ha_key_cmp
myisam/mi_write.c:
Change arguments to ha_key_cmp
myisammrg/myrg_queue.c:
Change arguments to ha_key_cmp
mysys/my_handler.c:
Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument
(This removes an if in a loop at the expensive of an int on the stack)
sql/records.cc:
Simplify new rr_index() code
Create common error handling function for rr_() functions.
Remove loop from rr_index() as handler::index_next() can never return HA_ERR_RECORD_DELETED
sql/sql_load.cc:
Simplify
sql/sql_update.cc:
Simplify code
Fixed bug when one is updating an index column that could be used with ORDER BY
sql/structs.h:
Removed not needed structure element
Diffstat (limited to 'heap')
-rw-r--r-- | heap/_check.c | 4 | ||||
-rw-r--r-- | heap/hp_create.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/heap/_check.c b/heap/_check.c index a745aee48bf..ad432856a69 100644 --- a/heap/_check.c +++ b/heap/_check.c @@ -167,7 +167,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, ulong found= 0; byte *key, *recpos; uint key_length; - uint not_used; + uint not_used[2]; if ((key= tree_search_edge(&keydef->rb_tree, info->parents, &info->last_pos, offsetof(TREE_ELEMENT, left)))) @@ -177,7 +177,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, memcpy(&recpos, key + (*keydef->get_key_length)(keydef,key), sizeof(byte*)); key_length= hp_rb_make_key(keydef, info->recbuf, recpos, 0); if (ha_key_cmp(keydef->seg, (uchar*) info->recbuf, (uchar*) key, - key_length, SEARCH_FIND | SEARCH_SAME, ¬_used)) + key_length, SEARCH_FIND | SEARCH_SAME, not_used)) { error= 1; DBUG_PRINT("error",("Record in wrong link: key: %d Record: %lx\n", diff --git a/heap/hp_create.c b/heap/hp_create.c index af32fefea1b..2b811dac89b 100644 --- a/heap/hp_create.c +++ b/heap/hp_create.c @@ -170,9 +170,9 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, static int keys_compare(heap_rb_param *param, uchar *key1, uchar *key2) { - uint not_used; + uint not_used[2]; return ha_key_cmp(param->keyseg, key1, key2, param->key_length, - param->search_flag, ¬_used); + param->search_flag, not_used); } static void init_block(HP_BLOCK *block, uint reclength, ulong min_records, |