mariadb/heap
unknown bfe2425aad WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
HEAP: Copies the key count to a backup variable and sets the key count to zero.
That way, no HEAP function will ever try to touch any index.
Re-enabling is done by copying back the backup variable.
To avoid memory leak at table close, disable deletes all index trees.
Re-enabling must be done with empty indexes and data anyway. Otherwise,
the indexes would need to be repaired, wich HEAP is not capable of.
MyISAM: Only the key_map is cleared and set.
Re-enabling must be done with empty indexes and data. Otherwise, repair needs
to be done which will enable all keys persistently.
The former implementation disabled only non-unique keys and maked this persistent.
The new implementation additionally can disable all keys, but only without
making this persistent. Re-enabling all keys can be done without repair,
if data file and indexes are empty.


heap/heapdef.h:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Pulled hp_clear_keys() out of hp_clear().
heap/hp_clear.c:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Pulled hp_clear_keys() out of hp_clear().
  Added the new functions for disabling and enabling keys and to ask for the key state.
include/heap.h:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Added a new HP_SHARE element to save the key count while keys are disabled.
  Added declarations for the new functions.
myisam/mi_open.c:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Added the new functions for disabling and enabling keys and to ask for the key state.
myisam/myisamdef.h:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Added declarations for the new functions.
sql/ha_heap.cc:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Pulled set_keys_for_scanning() out of open().
  Added the new functions for disabling and enabling keys and to ask for the key state.
sql/ha_heap.h:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Added declarations for the new functions.
sql/ha_myisam.cc:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Extended disable_indexes() for all keys and no save.
  The argument is now 'mode' as it must handle different cases.
  Extended enable_indexes() for no save.
  The new feature needs the new argument 'mode' with the same semantics as in disable_indexes().
  Added indexes_are_disabled() to ask for the key state.
  Extended the existing call to enable_indexes() by the new argument.
sql/ha_myisam.h:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Modified the declarations of dis-/enable_indexes() for the new argument.
  Added the declaration of the new function to ask for the key state.
sql/handler.h:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Added declarations for the operation modes for the key switching functions.
  Modified the declarations of dis-/enable_indexes() for the new argument.
  Added the declaration of the new function to ask for the key state.
sql/sql_select.cc:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  In create_myisam_from_heap() take notice of disabled keys
  and disable them in the new table before copying the data.
sql/sql_table.cc:
  WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
  Modified the calls of dis-/enable_indexes() for the new argument.
2004-05-06 15:53:01 +02:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
_check.c Portability fixes 2003-02-27 03:44:44 +02:00
_rectest.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
ChangeLog Import changeset 2000-07-31 21:29:14 +02:00
heapdef.h WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again). 2004-05-06 15:53:01 +02:00
hp_block.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
hp_clear.c WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again). 2004-05-06 15:53:01 +02:00
hp_close.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
hp_create.c After merge fixes 2003-08-19 00:08:08 +03:00
hp_delete.c Optimized GIS functions 2004-03-04 08:50:37 +02:00
hp_extra.c WL#1648 - Start/Stop Inserting Duplicates Into a Table 2004-03-18 16:47:16 +01:00
hp_hash.c BTREE-indexes in HEAP tables can now be used to optimize ORDER BY 2004-03-25 15:05:01 +02:00
hp_info.c After merge fixes 2004-02-16 10:03:25 +02:00
hp_open.c After merge fixes 2004-02-16 10:03:25 +02:00
hp_panic.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
hp_rename.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
hp_rfirst.c Stupid bug has been fixed 2002-07-12 13:12:32 +05:00
hp_rkey.c Bugfix for HEAP table rb-index scan. 2003-06-10 12:19:28 +05:00
hp_rlast.c Stupid bug has been fixed 2002-07-12 13:12:32 +05:00
hp_rnext.c Heap table code cleanup 2002-05-23 19:26:16 +05:00
hp_rprev.c Heap table code cleanup 2002-05-23 19:26:16 +05:00
hp_rrnd.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
hp_rsame.c RB-Tree indexes support in HEAP tables 2002-04-25 13:36:55 +05:00
hp_scan.c Merge with 4.0.6 2002-12-05 19:38:42 +02:00
hp_static.c Update copyright 2001-12-06 14:10:51 +02:00
hp_test1.c Merge key cache structures to one 2003-11-20 22:06:25 +02:00
hp_test2.c Merge key cache structures to one 2003-11-20 22:06:25 +02:00
hp_update.c Merge with 4.0.6 2002-12-05 19:38:42 +02:00
hp_write.c fixed for BUG #2719 "Heap tables status shows wrong or missing data" 2004-02-20 00:33:16 +04:00
make-ccc Import changeset 2000-07-31 21:29:14 +02:00
Makefile.am removed redundant -I include-dirs 2002-11-26 14:01:08 +01:00