diff options
author | unknown <sergefp@mysql.com> | 2004-05-13 01:38:40 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-05-13 01:38:40 +0400 |
commit | f63352d37b3ffe7b4e420ee84830e18c45a9cf2c (patch) | |
tree | 34118ff1da06b90ade9507174ddccf92c228286a /sql/ha_heap.h | |
parent | f04652653a872fb6666c4db320bc60b6573ce6ae (diff) | |
download | mariadb-git-f63352d37b3ffe7b4e420ee84830e18c45a9cf2c.tar.gz |
This is first cset for WL#1394 "Optimize index merge when all involved index ranges include only values with equal keys"
The main idea is to exploit the fact that key scans for "key=const" return ordered sequences of rowids.
include/my_base.h:
Added HA_EXTRA_KEYREAD_PRESERVE_FIELDS flag
include/my_bitmap.h:
Added a couple of utility functions
include/my_sys.h:
Added my_conunt_bits_ushort function
innobase/include/row0mysql.h:
Added support for HA_EXTRA_KEYREAD_PRESERVE_FIELDS
innobase/row/row0sel.c:
Added support for HA_EXTRA_KEYREAD_PRESERVE_FIELDS
mysys/my_bit.c:
Added my_count_bits_ushort function
mysys/my_bitmap.c:
Added a couple of utility functions
sql/ha_berkeley.cc:
Added cmp_ref rowid comparison function.
sql/ha_berkeley.h:
Added cmp_ref rowid comparison function.
sql/ha_heap.h:
Added cmp_ref rowid comparison function.
sql/ha_innodb.cc:
Added cmp_ref rowid comparison function and support from HA_EXTRA_KEYREAD_PRESERVE_FIELDS
sql/ha_innodb.h:
Added cmp_ref rowid comparison function.
sql/handler.h:
Added cmp_ref rowid comparison function.
sql/opt_range.cc:
Added QUICK_ROR_{INTERSECT,UNION}_SELECT classes and related optimizer code
sql/opt_range.h:
Added QUICK_ROR_{INTERSECT,UNION}_SELECT classes
sql/sql_delete.cc:
Changed to use new ROWID comparison function
also always call quick->reset() for quick selects
sql/sql_select.cc:
Account for new quick select types
sql/sql_select.h:
New, proper rowid ordering/comparison function to be used with Unique class etc.
sql/sql_test.cc:
Account for new quick select types
sql/sql_update.cc:
Account for new quick select types
Diffstat (limited to 'sql/ha_heap.h')
-rw-r--r-- | sql/ha_heap.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/ha_heap.h b/sql/ha_heap.h index c369c7029b4..80cd143eec3 100644 --- a/sql/ha_heap.h +++ b/sql/ha_heap.h @@ -93,5 +93,10 @@ class ha_heap: public handler THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); - + int cmp_ref(const byte *ref1, const byte *ref2) + { + HEAP_PTR ptr1=*(HEAP_PTR*)ref1; + HEAP_PTR ptr2=*(HEAP_PTR*)ref2; + return ptr1 < ptr2? -1 : (ptr1 > ptr2? 1 : 0); + } }; |