mariadb/storage/maria/ma_rt_key.c

121 lines
3.5 KiB
C
Raw Normal View History

Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
/* Copyright (C) 2006 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
GPL license update (same change as was done for all files in 5.1). storage/maria/Makefile.am: GPL license update storage/maria/ft_maria.c: GPL license update storage/maria/ha_maria.cc: GPL license update storage/maria/ha_maria.h: GPL license update storage/maria/lockman.c: GPL license update storage/maria/lockman.h: GPL license update storage/maria/ma_bitmap.c: GPL license update storage/maria/ma_blockrec.c: GPL license update storage/maria/ma_blockrec.h: GPL license update storage/maria/ma_cache.c: GPL license update storage/maria/ma_changed.c: GPL license update storage/maria/ma_check.c: GPL license update storage/maria/ma_checkpoint.c: GPL license update storage/maria/ma_checkpoint.h: GPL license update storage/maria/ma_checksum.c: GPL license update storage/maria/ma_close.c: GPL license update storage/maria/ma_control_file.c: GPL license update storage/maria/ma_control_file.h: GPL license update storage/maria/ma_create.c: GPL license update storage/maria/ma_dbug.c: GPL license update storage/maria/ma_delete.c: GPL license update storage/maria/ma_delete_all.c: GPL license update storage/maria/ma_delete_table.c: GPL license update storage/maria/ma_dynrec.c: GPL license update storage/maria/ma_extra.c: GPL license update storage/maria/ma_ft_boolean_search.c: GPL license update storage/maria/ma_ft_eval.c: GPL license update storage/maria/ma_ft_eval.h: GPL license update storage/maria/ma_ft_nlq_search.c: GPL license update storage/maria/ma_ft_parser.c: GPL license update storage/maria/ma_ft_stem.c: GPL license update storage/maria/ma_ft_test1.c: GPL license update storage/maria/ma_ft_test1.h: GPL license update storage/maria/ma_ft_update.c: GPL license update storage/maria/ma_ftdefs.h: GPL license update storage/maria/ma_fulltext.h: GPL license update storage/maria/ma_info.c: GPL license update storage/maria/ma_init.c: GPL license update storage/maria/ma_key.c: GPL license update storage/maria/ma_keycache.c: GPL license update storage/maria/ma_least_recently_dirtied.c: GPL license update storage/maria/ma_least_recently_dirtied.h: GPL license update storage/maria/ma_locking.c: GPL license update storage/maria/ma_open.c: GPL license update storage/maria/ma_packrec.c: GPL license update storage/maria/ma_page.c: GPL license update storage/maria/ma_panic.c: GPL license update storage/maria/ma_preload.c: GPL license update storage/maria/ma_range.c: GPL license update storage/maria/ma_recovery.c: GPL license update storage/maria/ma_recovery.h: GPL license update storage/maria/ma_rename.c: GPL license update storage/maria/ma_rfirst.c: GPL license update storage/maria/ma_rkey.c: GPL license update storage/maria/ma_rlast.c: GPL license update storage/maria/ma_rnext.c: GPL license update storage/maria/ma_rnext_same.c: GPL license update storage/maria/ma_rprev.c: GPL license update storage/maria/ma_rrnd.c: GPL license update storage/maria/ma_rsame.c: GPL license update storage/maria/ma_rsamepos.c: GPL license update storage/maria/ma_rt_index.c: GPL license update storage/maria/ma_rt_index.h: GPL license update storage/maria/ma_rt_key.c: GPL license update storage/maria/ma_rt_key.h: GPL license update storage/maria/ma_rt_mbr.c: GPL license update storage/maria/ma_rt_mbr.h: GPL license update storage/maria/ma_rt_split.c: GPL license update storage/maria/ma_rt_test.c: GPL license update storage/maria/ma_scan.c: GPL license update storage/maria/ma_search.c: GPL license update storage/maria/ma_sort.c: GPL license update storage/maria/ma_sp_defs.h: GPL license update storage/maria/ma_sp_key.c: GPL license update storage/maria/ma_sp_test.c: GPL license update storage/maria/ma_static.c: GPL license update storage/maria/ma_statrec.c: GPL license update storage/maria/ma_test1.c: GPL license update storage/maria/ma_test2.c: GPL license update storage/maria/ma_test3.c: GPL license update storage/maria/ma_unique.c: GPL license update storage/maria/ma_update.c: GPL license update storage/maria/ma_write.c: GPL license update storage/maria/maria_chk.c: GPL license update storage/maria/maria_def.h: GPL license update storage/maria/maria_ftdump.c: GPL license update storage/maria/maria_pack.c: GPL license update storage/maria/tablockman.c: GPL license update storage/maria/tablockman.h: GPL license update storage/maria/trnman.c: GPL license update storage/maria/trnman.h: GPL license update
2007-03-02 11:20:23 +01:00
the Free Software Foundation; version 2 of the License.
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
#include "maria_def.h"
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
#include "trnman.h"
#include "ma_key_recover.h"
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
#ifdef HAVE_RTREE_KEYS
#include "ma_rt_index.h"
#include "ma_rt_key.h"
#include "ma_rt_mbr.h"
/*
Add key to the page
RESULT VALUES
-1 Error
0 Not split
1 Split
*/
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
int maria_rtree_add_key(const MARIA_KEY *key, MARIA_PAGE *page,
my_off_t *new_page)
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
{
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
MARIA_HA *info= page->info;
Added MARIA_SHARE *share to a lot of places to make code simpler Changed info->s -> share to get more efficent code Updated arguments to page accessor functions to use MARIA_SHARE * instead of MARIA_HA *. Tested running tests in quick mode (no balance page on insert and only when critical on delete) Fixed bug in underflow handling in quick mode Fixed bug in log handler where it accessed not initialized variable Fixed bug in log handler where it didn't free mutex in unlikely error condition Removed double write of page in case of of some underflow conditions Added DBUG_PRINT in safemutex lock/unlock dbug/dbug.c: Compile without SAFE_MUTEX (to be able to use DBUG_PRINT in safe_mutex code) Use calls to get/set my_thread_var->dbug. (Make dbug independent of compile time options for mysys) include/my_pthread.h: Added prototypes for my_thread_var_get_dbug() & my_thread_var_set_dbug() mysql-test/lib/mtr_report.pl: Don't check warnings in log files if we are using --extern mysys/my_thr_init.c: Added my_thread_var_get_dbug() & my_thread_var_set_dbug() mysys/thr_mutex.c: Added DBUG printing of addresses to mutex for lock/unlock storage/maria/ma_blockrec.c: Fixed comment storage/maria/ma_check.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_close.c: Indentation fixes storage/maria/ma_create.c: Calculate min_key_length correctly storage/maria/ma_dbug.c: Indentation fixes storage/maria/ma_delete.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Removed some writing of key pages that underflow (will be written by caller) Fixed crashing bug in underflow handling when using quick mode storage/maria/ma_delete_all.c: Indentation fixes storage/maria/ma_dynrec.c: Indentation fixes storage/maria/ma_extra.c: Fixed indentation Removed old useless code Reset share->changed if we have written state storage/maria/ma_ft_update.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_info.c: Indentation fixes storage/maria/ma_key_recover.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_locking.c: Indentation fixes storage/maria/ma_loghandler.c: Removed wrapper functions translog_mutex_lock and translog_mutex_unlock (safemutex now does same kind of printing) Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free Fixed some DBUG_PRINT to ensure that convert-dbug-for-diff works Fixed bug in translog_flush() that caused log to stop syncing to disk Added missing mutex_unlock in case of error storage/maria/ma_loghandler.h: Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free storage/maria/ma_open.c: Indentation fixes storage/maria/ma_packrec.c: Indentation fixes storage/maria/ma_page.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Added check that we never write a key page without content (except in recovery where a key page may temporary be without content) storage/maria/ma_preload.c: Updated arguments to page accessor functions storage/maria/ma_range.c: Updated arguments to page accessor functions storage/maria/ma_rkey.c: Indentation fixes storage/maria/ma_rprev.c: Indentation fixes storage/maria/ma_rt_index.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_index.h: Updated arguments to page accessor functions storage/maria/ma_rt_key.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_mbr.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_split.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_search.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_sort.c: Indentation fixes storage/maria/ma_statrec.c: Indentation fixes storage/maria/ma_test1.c: Added extra undo test Flush also keys in -u1, to ensure that the full log is flushed storage/maria/ma_test2.c: Added extra undo test Flush also keys in -u1, to ensure that the full log is flushed storage/maria/ma_test_recovery.expected: Updated results storage/maria/ma_test_recovery: Added extra undo test storage/maria/ma_update.c: Indentation fixes storage/maria/ma_write.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Prepare for quick mode for insert (don't balance page) storage/maria/maria_chk.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/maria_def.h: Updated arguments to page accessor functions
2007-12-10 01:32:00 +01:00
MARIA_SHARE *share= info->s;
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
uint page_size= page->size;
uint nod_flag= page->node;
uchar *key_pos= rt_PAGE_END(page);
Added versioning of Maria index Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey Renamed old info->lastkey to info->lastkey_buff Use exact key lenghts for keys, not USE_WHOLE_KEY For partial key searches, use SEARCH_PART_KEY When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid Changes done in a lot of files: - Modified functions to use MARIA_KEY instead of key pointer and key length - Use keyinfo->root_lock instead of share->key_root_lock[keynr] - Simplify code by using local variable keyinfo instead if share->keyinfo[i] - Added #fdef EXTERNAL_LOCKING around removed state elements - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid) - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it .bzrignore: Added missing temporary directory extra/Makefile.am: comp_err is now deleted on make distclean include/maria.h: Added structure MARIA_KEY, which is used for intern key objects in Maria. Changed functions to take MARIA_KEY as an argument instead of pointer to packed key. Changed some functions that always return true or false to my_bool. Added virtual function make_key() to avoid if in _ma_make_key() Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster include/my_base.h: Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check() Added SEARCH_INSERT to be used when inserting new keys Added SEARCH_PART_KEY for partial searches Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid include/my_handler.h: Make next_flag 32 bit to make sure we can handle all SEARCH_ bits mysql-test/include/maria_empty_logs.inc: Read and restore current database; Don't assume we are using mysqltest. Don't log use databasename to log. Using this include should not cause any result changes. mysql-test/r/maria-gis-rtree-dynamic.result: Updated results after adding some check table commands to help pinpoint errors mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria-purge.result: New result after adding removal of logs mysql-test/r/maria-recovery-big.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-bitmap.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-rtree-ft.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria.result: New tests mysql-test/r/variables-big.result: Don't log id as it's not predictable mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result: Updated results to new binlog results. (Test has not been run in a long time as it requires --big) mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt: Moved file to ndb replication test directory mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: Fixed wrong path to included tests mysql-test/t/maria-gis-rtree-dynamic.test: Added some check table commands to help pinpoint errors mysql-test/t/maria-mvcc.test: New tests mysql-test/t/maria-purge.test: Remove logs to make test results predictable mysql-test/t/maria.test: New tests for some possible problems mysql-test/t/variables-big.test: Don't log id as it's not predictable mysys/my_handler.c: Updated function comment to reflect old code Changed nextflag to be uint32 to ensure we can have flags > 16 bit Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored. Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag mysys/my_lock.c: Fixed wrong test (Found by Guilhem) scripts/Makefile.am: Ensure that test programs are deleted by make clean sql/rpl_rli.cc: Moved assignment order to fix compiler warning storage/heap/hp_write.c: Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys storage/maria/Makefile.am: Remove also maria log files when doing make distclean storage/maria/ha_maria.cc: Use 'file->start_state' as default state for transactional tables without versioning At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows) In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event. Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave storage/maria/ma_blockrec.c: Updated comment storage/maria/ma_check.c: Compact key pages (removes transid) when doing --zerofill Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid Modified functions to use MARIA_KEY instead of key pointer and key length Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn() Removed not needed argument from get_record_for_key() Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL Remove some SPATIAL specific code where the virtual functions can handle this in a general manner Use info->lastkey_buff instead of info->lastkey _ma_dpos() -> _ma_row_pos_from_key() _ma_make_key() -> keyinfo->make_key() _ma_print_key() -> _ma_print_keydata() _ma_move_key() -> ma_copy_copy() Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Ensure that data on page doesn't overwrite page checksum position Use DBUG_DUMP_KEY instead of DBUG_DUMP Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp() Fixed check if rowid points outside of BLOCK_RECORD data file Use info->lastkey_buff instead of key on stack in some safe places Added #fdef EXTERNAL_LOCKING around removed state elements storage/maria/ma_close.c: Use keyinfo->root_lock instead of share->key_root_lock[keynr] storage/maria/ma_create.c: Removed assert that is already checked in maria_init() Force transactinal tables to be of type BLOCK_RECORD Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD) Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. storage/maria/ma_dbug.c: Changed _ma_print_key() to use MARIA_KEY storage/maria/ma_delete.c: Modified functions to use MARIA_KEY instead of key pointer and key length info->lastkey2-> info->lastkey_buff2 Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Use new interface for get_key(), _ma_get_last_key() and others _ma_dpos() -> ma_row_pos_from_key() Simplify setting of prev_key in del() Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid Treath key pages that may have a transid as if keys would be of variable length storage/maria/ma_delete_all.c: Reset history state if maria_delete_all_rows() are called Update parameters to _ma_update_state_lsns() call storage/maria/ma_extra.c: Store and restore info->lastkey storage/maria/ma_ft_boolean_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ft_nlq_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing) storage/maria/ma_ft_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ftdefs.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_fulltext.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_init.c: Check if blocksize is legal (Moved test here from ma_open()) storage/maria/ma_key.c: Added functions for storing/reading of transid Modified functions to use MARIA_KEY instead of key pointer and key length Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys Add transid to keys if table is versioned Added _ma_copy_key() storage/maria/ma_key_recover.c: Add logging of page_flag (holds information if there are keys with transid on page) Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive Added lots of DBUG_PRINT() Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE storage/maria/ma_key_recover.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_locking.c: Added new arguments to _ma_update_state_lsns_sub() storage/maria/ma_loghandler.c: Fixed all logging of LSN to look similar in DBUG log Changed if (left != 0) to if (left) as the later is used also later in the code storage/maria/ma_loghandler.h: Added new index page operations storage/maria/ma_open.c: Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned This is needed to not get double increments of state.records (one in ma_write.c and on when log is written) Changed info->lastkey to MARIA_KEY type Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled) Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Check on open that state.create_trid is correct Extend share->base.max_key_length in case of transactional table so that it can hold transid Removed 4.0 compatible fulltext key mode as this is not relevant for Maria Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block Initialize all new virtual function pointers Removed storing of state->unique, state->process and store state->create_trid instead storage/maria/ma_page.c: Added comment to describe key page structure Added functions to compact key page and log the compact operation storage/maria/ma_range.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search Added handling of pages with transid storage/maria/ma_recovery.c: Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal Added new arguments to _ma_update_state_lsns() storage/maria/ma_rename.c: Added new arguments to _ma_update_state_lsns() storage/maria/ma_rkey.c: Modified functions to use MARIA_KEY instead of key pointer and key length Don't use USE_WHOLE_KEY, use real length of key Use share->row_is_visible() to test if row is visible Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once Removed test if last_used_keyseg != 0 as this is always true storage/maria/ma_rnext.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rnext_same.c: Modified functions to use MARIA_KEY instead of key pointer and key length lastkey2 -> lastkey_buff2 storage/maria/ma_rprev.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rsame.c: Updated comment Simplify code by using local variable keyinfo instead if share->keyinfo[i] Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rsamepos.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_index.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use better variable names Removed not needed casts _ma_dpos() -> _ma_row_pos_from_key() Use info->last_rtree_keypos to save position to key instead of info->int_keypos Simplify err: condition Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function storage/maria/ma_rt_index.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_key.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify maria_rtree_add_key by combining idenitcal code and removing added_len storage/maria/ma_rt_key.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_mbr.c: Changed type of 'nextflag' to uint32 Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value storage/maria/ma_rt_mbr.h: Changed type of 'nextflag' to uint32 storage/maria/ma_rt_split.c: Modified functions to use MARIA_KEY instead of key pointer and key length key_length -> key_data_length to catch possible errors storage/maria/ma_rt_test.c: Fixed wrong comment Reset recinfo to avoid valgrind varnings Fixed wrong argument to create_record() that caused test to fail storage/maria/ma_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Added support of keys with optional trid Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads _ma_dpos() -> _ma_row_pos_from_key() If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search() Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data) Combine similar code at end of _ma_get_binary_pack_key() Removed not used function _ma_move_key() In _ma_search_next() don't call _ma_search() if we aren't on a nod page. Update info->cur_row.trid with trid for found key Removed some not needed casts Added _ma_trid_from_key() Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller storage/maria/ma_sort.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_sp_defs.h: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value storage/maria/ma_sp_key.c: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value Don't test sizeof(double), test against 8 as we are using float8store() Use mi_float8store() instead of doing swap of value (same thing but faster) storage/maria/ma_state.c: maria_versioning() now only calls _ma_block_get_status() if table supports versioning Added _ma_row_visible_xxx() functions for different occasions When emptying history, set info->state to point to the first history event. storage/maria/ma_state.h: Added _ma_row_visible_xxx() prototypes storage/maria/ma_static.c: Indentation changes storage/maria/ma_statrec.c: Fixed arguments to _ma_dpointer() and _ma_rec_pos() storage/maria/ma_test1.c: Call init_thr_lock() if we have versioning storage/maria/ma_test2.c: Call init_thr_lock() if we have versioning storage/maria/ma_unique.c: Modified functions to use MARIA_KEY storage/maria/ma_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_write.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] In _ma_enlarge_root(), mark in page_flag if new key has transid _ma_dpos() -> _ma_row_pos_from_key() Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not Moved 'reversed' to outside block as area was used later storage/maria/maria_chk.c: Added error if trying to sort with HA_BINARY_PACK_KEY Use new interface to get_key() and _ma_dpointer() _ma_dpos() -> _ma_row_pos_from_key() storage/maria/maria_def.h: Modified functions to use MARIA_KEY instead of key pointer and key length Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning Added create_trid to MARIA_SHARE Removed not used state variables 'process' and 'unique' Added defines for handling TRID's in index pages Changed to use MARIA_SHARE instead of MARIA_HA for some functions Added 'have_versioning' flag if table supports versioning Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF Changed last_key to be of type MARIA_KEY. Removed lastkey_length lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2 Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key Changed 'nextflag' and assocaited variables to uint32 storage/maria/maria_ftdump.c: lastkey -> lastkey_buff storage/maria/trnman.c: Fixed wrong initialization of min_read_from and max_commit_trid Added trnman_get_min_safe_trid() storage/maria/unittest/ma_test_all-t: Added --start-from storage/myisam/mi_check.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_delete.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_range.c: Updated comment storage/myisam/mi_write.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/rt_index.c: Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 07:18:28 +02:00
uint tot_key_length= key->data_length + key->ref_length + nod_flag;
merging MyISAM changes into Maria (not done in 5.1->maria merge of Jul 7th). "maria.test" and "ps_maria.test" still fail; "ma_test_all" starts failing (MyISAM has the same issue see BUG#30094). include/maria.h: merging MyISAM changes into Maria mysys/mf_keycache.c: mi_test_all showed "floating point exception", this was already fixed in the latest 5.1, importing fix. sql/item_xmlfunc.cc: compiler warning (already fixed in latest 5.1) storage/maria/ha_maria.cc: merging MyISAM changes into Maria. See #ifdef ASK_MONTY. storage/maria/ha_maria.h: merging MyISAM changes into Maria storage/maria/ma_cache.c: merging MyISAM changes into Maria storage/maria/ma_check.c: merging MyISAM changes into Maria storage/maria/ma_create.c: merging MyISAM changes into Maria storage/maria/ma_dynrec.c: merging MyISAM changes into Maria storage/maria/ma_extra.c: merging MyISAM changes into Maria storage/maria/ma_ft_boolean_search.c: merging MyISAM changes into Maria storage/maria/ma_ft_nlq_search.c: merging MyISAM changes into Maria storage/maria/ma_info.c: merging MyISAM changes into Maria storage/maria/ma_key.c: merging MyISAM changes into Maria storage/maria/ma_loghandler.c: compiler warning (part->length is size_t) storage/maria/ma_open.c: merging MyISAM changes into Maria storage/maria/ma_preload.c: merging MyISAM changes into Maria storage/maria/ma_range.c: merging MyISAM changes into Maria storage/maria/ma_rkey.c: merging MyISAM changes into Maria storage/maria/ma_rt_index.c: merging MyISAM changes into Maria storage/maria/ma_rt_key.c: merging MyISAM changes into Maria storage/maria/ma_rt_split.c: merging MyISAM changes into Maria storage/maria/ma_search.c: merging MyISAM changes into Maria storage/maria/ma_sort.c: merging MyISAM changes into Maria storage/maria/maria_def.h: merging MyISAM changes into Maria
2007-07-27 12:06:39 +02:00
DBUG_ENTER("maria_rtree_add_key");
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
Added versioning of Maria index Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey Renamed old info->lastkey to info->lastkey_buff Use exact key lenghts for keys, not USE_WHOLE_KEY For partial key searches, use SEARCH_PART_KEY When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid Changes done in a lot of files: - Modified functions to use MARIA_KEY instead of key pointer and key length - Use keyinfo->root_lock instead of share->key_root_lock[keynr] - Simplify code by using local variable keyinfo instead if share->keyinfo[i] - Added #fdef EXTERNAL_LOCKING around removed state elements - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid) - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it .bzrignore: Added missing temporary directory extra/Makefile.am: comp_err is now deleted on make distclean include/maria.h: Added structure MARIA_KEY, which is used for intern key objects in Maria. Changed functions to take MARIA_KEY as an argument instead of pointer to packed key. Changed some functions that always return true or false to my_bool. Added virtual function make_key() to avoid if in _ma_make_key() Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster include/my_base.h: Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check() Added SEARCH_INSERT to be used when inserting new keys Added SEARCH_PART_KEY for partial searches Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid include/my_handler.h: Make next_flag 32 bit to make sure we can handle all SEARCH_ bits mysql-test/include/maria_empty_logs.inc: Read and restore current database; Don't assume we are using mysqltest. Don't log use databasename to log. Using this include should not cause any result changes. mysql-test/r/maria-gis-rtree-dynamic.result: Updated results after adding some check table commands to help pinpoint errors mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria-purge.result: New result after adding removal of logs mysql-test/r/maria-recovery-big.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-bitmap.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-rtree-ft.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria.result: New tests mysql-test/r/variables-big.result: Don't log id as it's not predictable mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result: Updated results to new binlog results. (Test has not been run in a long time as it requires --big) mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt: Moved file to ndb replication test directory mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: Fixed wrong path to included tests mysql-test/t/maria-gis-rtree-dynamic.test: Added some check table commands to help pinpoint errors mysql-test/t/maria-mvcc.test: New tests mysql-test/t/maria-purge.test: Remove logs to make test results predictable mysql-test/t/maria.test: New tests for some possible problems mysql-test/t/variables-big.test: Don't log id as it's not predictable mysys/my_handler.c: Updated function comment to reflect old code Changed nextflag to be uint32 to ensure we can have flags > 16 bit Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored. Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag mysys/my_lock.c: Fixed wrong test (Found by Guilhem) scripts/Makefile.am: Ensure that test programs are deleted by make clean sql/rpl_rli.cc: Moved assignment order to fix compiler warning storage/heap/hp_write.c: Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys storage/maria/Makefile.am: Remove also maria log files when doing make distclean storage/maria/ha_maria.cc: Use 'file->start_state' as default state for transactional tables without versioning At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows) In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event. Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave storage/maria/ma_blockrec.c: Updated comment storage/maria/ma_check.c: Compact key pages (removes transid) when doing --zerofill Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid Modified functions to use MARIA_KEY instead of key pointer and key length Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn() Removed not needed argument from get_record_for_key() Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL Remove some SPATIAL specific code where the virtual functions can handle this in a general manner Use info->lastkey_buff instead of info->lastkey _ma_dpos() -> _ma_row_pos_from_key() _ma_make_key() -> keyinfo->make_key() _ma_print_key() -> _ma_print_keydata() _ma_move_key() -> ma_copy_copy() Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Ensure that data on page doesn't overwrite page checksum position Use DBUG_DUMP_KEY instead of DBUG_DUMP Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp() Fixed check if rowid points outside of BLOCK_RECORD data file Use info->lastkey_buff instead of key on stack in some safe places Added #fdef EXTERNAL_LOCKING around removed state elements storage/maria/ma_close.c: Use keyinfo->root_lock instead of share->key_root_lock[keynr] storage/maria/ma_create.c: Removed assert that is already checked in maria_init() Force transactinal tables to be of type BLOCK_RECORD Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD) Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. storage/maria/ma_dbug.c: Changed _ma_print_key() to use MARIA_KEY storage/maria/ma_delete.c: Modified functions to use MARIA_KEY instead of key pointer and key length info->lastkey2-> info->lastkey_buff2 Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Use new interface for get_key(), _ma_get_last_key() and others _ma_dpos() -> ma_row_pos_from_key() Simplify setting of prev_key in del() Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid Treath key pages that may have a transid as if keys would be of variable length storage/maria/ma_delete_all.c: Reset history state if maria_delete_all_rows() are called Update parameters to _ma_update_state_lsns() call storage/maria/ma_extra.c: Store and restore info->lastkey storage/maria/ma_ft_boolean_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ft_nlq_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing) storage/maria/ma_ft_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ftdefs.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_fulltext.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_init.c: Check if blocksize is legal (Moved test here from ma_open()) storage/maria/ma_key.c: Added functions for storing/reading of transid Modified functions to use MARIA_KEY instead of key pointer and key length Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys Add transid to keys if table is versioned Added _ma_copy_key() storage/maria/ma_key_recover.c: Add logging of page_flag (holds information if there are keys with transid on page) Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive Added lots of DBUG_PRINT() Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE storage/maria/ma_key_recover.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_locking.c: Added new arguments to _ma_update_state_lsns_sub() storage/maria/ma_loghandler.c: Fixed all logging of LSN to look similar in DBUG log Changed if (left != 0) to if (left) as the later is used also later in the code storage/maria/ma_loghandler.h: Added new index page operations storage/maria/ma_open.c: Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned This is needed to not get double increments of state.records (one in ma_write.c and on when log is written) Changed info->lastkey to MARIA_KEY type Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled) Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Check on open that state.create_trid is correct Extend share->base.max_key_length in case of transactional table so that it can hold transid Removed 4.0 compatible fulltext key mode as this is not relevant for Maria Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block Initialize all new virtual function pointers Removed storing of state->unique, state->process and store state->create_trid instead storage/maria/ma_page.c: Added comment to describe key page structure Added functions to compact key page and log the compact operation storage/maria/ma_range.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search Added handling of pages with transid storage/maria/ma_recovery.c: Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal Added new arguments to _ma_update_state_lsns() storage/maria/ma_rename.c: Added new arguments to _ma_update_state_lsns() storage/maria/ma_rkey.c: Modified functions to use MARIA_KEY instead of key pointer and key length Don't use USE_WHOLE_KEY, use real length of key Use share->row_is_visible() to test if row is visible Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once Removed test if last_used_keyseg != 0 as this is always true storage/maria/ma_rnext.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rnext_same.c: Modified functions to use MARIA_KEY instead of key pointer and key length lastkey2 -> lastkey_buff2 storage/maria/ma_rprev.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rsame.c: Updated comment Simplify code by using local variable keyinfo instead if share->keyinfo[i] Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rsamepos.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_index.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use better variable names Removed not needed casts _ma_dpos() -> _ma_row_pos_from_key() Use info->last_rtree_keypos to save position to key instead of info->int_keypos Simplify err: condition Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function storage/maria/ma_rt_index.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_key.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify maria_rtree_add_key by combining idenitcal code and removing added_len storage/maria/ma_rt_key.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_mbr.c: Changed type of 'nextflag' to uint32 Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value storage/maria/ma_rt_mbr.h: Changed type of 'nextflag' to uint32 storage/maria/ma_rt_split.c: Modified functions to use MARIA_KEY instead of key pointer and key length key_length -> key_data_length to catch possible errors storage/maria/ma_rt_test.c: Fixed wrong comment Reset recinfo to avoid valgrind varnings Fixed wrong argument to create_record() that caused test to fail storage/maria/ma_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Added support of keys with optional trid Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads _ma_dpos() -> _ma_row_pos_from_key() If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search() Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data) Combine similar code at end of _ma_get_binary_pack_key() Removed not used function _ma_move_key() In _ma_search_next() don't call _ma_search() if we aren't on a nod page. Update info->cur_row.trid with trid for found key Removed some not needed casts Added _ma_trid_from_key() Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller storage/maria/ma_sort.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_sp_defs.h: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value storage/maria/ma_sp_key.c: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value Don't test sizeof(double), test against 8 as we are using float8store() Use mi_float8store() instead of doing swap of value (same thing but faster) storage/maria/ma_state.c: maria_versioning() now only calls _ma_block_get_status() if table supports versioning Added _ma_row_visible_xxx() functions for different occasions When emptying history, set info->state to point to the first history event. storage/maria/ma_state.h: Added _ma_row_visible_xxx() prototypes storage/maria/ma_static.c: Indentation changes storage/maria/ma_statrec.c: Fixed arguments to _ma_dpointer() and _ma_rec_pos() storage/maria/ma_test1.c: Call init_thr_lock() if we have versioning storage/maria/ma_test2.c: Call init_thr_lock() if we have versioning storage/maria/ma_unique.c: Modified functions to use MARIA_KEY storage/maria/ma_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_write.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] In _ma_enlarge_root(), mark in page_flag if new key has transid _ma_dpos() -> _ma_row_pos_from_key() Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not Moved 'reversed' to outside block as area was used later storage/maria/maria_chk.c: Added error if trying to sort with HA_BINARY_PACK_KEY Use new interface to get_key() and _ma_dpointer() _ma_dpos() -> _ma_row_pos_from_key() storage/maria/maria_def.h: Modified functions to use MARIA_KEY instead of key pointer and key length Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning Added create_trid to MARIA_SHARE Removed not used state variables 'process' and 'unique' Added defines for handling TRID's in index pages Changed to use MARIA_SHARE instead of MARIA_HA for some functions Added 'have_versioning' flag if table supports versioning Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF Changed last_key to be of type MARIA_KEY. Removed lastkey_length lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2 Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key Changed 'nextflag' and assocaited variables to uint32 storage/maria/maria_ftdump.c: lastkey -> lastkey_buff storage/maria/trnman.c: Fixed wrong initialization of min_read_from and max_commit_trid Added trnman_get_min_safe_trid() storage/maria/unittest/ma_test_all-t: Added --start-from storage/myisam/mi_check.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_delete.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_range.c: Updated comment storage/myisam/mi_write.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/rt_index.c: Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 07:18:28 +02:00
if (page_size + tot_key_length <=
(uint)(key->keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE))
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
{
/* split won't be necessary */
if (nod_flag)
{
Added versioning of Maria index Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey Renamed old info->lastkey to info->lastkey_buff Use exact key lenghts for keys, not USE_WHOLE_KEY For partial key searches, use SEARCH_PART_KEY When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid Changes done in a lot of files: - Modified functions to use MARIA_KEY instead of key pointer and key length - Use keyinfo->root_lock instead of share->key_root_lock[keynr] - Simplify code by using local variable keyinfo instead if share->keyinfo[i] - Added #fdef EXTERNAL_LOCKING around removed state elements - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid) - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it .bzrignore: Added missing temporary directory extra/Makefile.am: comp_err is now deleted on make distclean include/maria.h: Added structure MARIA_KEY, which is used for intern key objects in Maria. Changed functions to take MARIA_KEY as an argument instead of pointer to packed key. Changed some functions that always return true or false to my_bool. Added virtual function make_key() to avoid if in _ma_make_key() Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster include/my_base.h: Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check() Added SEARCH_INSERT to be used when inserting new keys Added SEARCH_PART_KEY for partial searches Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid include/my_handler.h: Make next_flag 32 bit to make sure we can handle all SEARCH_ bits mysql-test/include/maria_empty_logs.inc: Read and restore current database; Don't assume we are using mysqltest. Don't log use databasename to log. Using this include should not cause any result changes. mysql-test/r/maria-gis-rtree-dynamic.result: Updated results after adding some check table commands to help pinpoint errors mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria-purge.result: New result after adding removal of logs mysql-test/r/maria-recovery-big.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-bitmap.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-rtree-ft.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria.result: New tests mysql-test/r/variables-big.result: Don't log id as it's not predictable mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result: Updated results to new binlog results. (Test has not been run in a long time as it requires --big) mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt: Moved file to ndb replication test directory mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: Fixed wrong path to included tests mysql-test/t/maria-gis-rtree-dynamic.test: Added some check table commands to help pinpoint errors mysql-test/t/maria-mvcc.test: New tests mysql-test/t/maria-purge.test: Remove logs to make test results predictable mysql-test/t/maria.test: New tests for some possible problems mysql-test/t/variables-big.test: Don't log id as it's not predictable mysys/my_handler.c: Updated function comment to reflect old code Changed nextflag to be uint32 to ensure we can have flags > 16 bit Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored. Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag mysys/my_lock.c: Fixed wrong test (Found by Guilhem) scripts/Makefile.am: Ensure that test programs are deleted by make clean sql/rpl_rli.cc: Moved assignment order to fix compiler warning storage/heap/hp_write.c: Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys storage/maria/Makefile.am: Remove also maria log files when doing make distclean storage/maria/ha_maria.cc: Use 'file->start_state' as default state for transactional tables without versioning At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows) In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event. Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave storage/maria/ma_blockrec.c: Updated comment storage/maria/ma_check.c: Compact key pages (removes transid) when doing --zerofill Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid Modified functions to use MARIA_KEY instead of key pointer and key length Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn() Removed not needed argument from get_record_for_key() Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL Remove some SPATIAL specific code where the virtual functions can handle this in a general manner Use info->lastkey_buff instead of info->lastkey _ma_dpos() -> _ma_row_pos_from_key() _ma_make_key() -> keyinfo->make_key() _ma_print_key() -> _ma_print_keydata() _ma_move_key() -> ma_copy_copy() Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Ensure that data on page doesn't overwrite page checksum position Use DBUG_DUMP_KEY instead of DBUG_DUMP Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp() Fixed check if rowid points outside of BLOCK_RECORD data file Use info->lastkey_buff instead of key on stack in some safe places Added #fdef EXTERNAL_LOCKING around removed state elements storage/maria/ma_close.c: Use keyinfo->root_lock instead of share->key_root_lock[keynr] storage/maria/ma_create.c: Removed assert that is already checked in maria_init() Force transactinal tables to be of type BLOCK_RECORD Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD) Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. storage/maria/ma_dbug.c: Changed _ma_print_key() to use MARIA_KEY storage/maria/ma_delete.c: Modified functions to use MARIA_KEY instead of key pointer and key length info->lastkey2-> info->lastkey_buff2 Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Use new interface for get_key(), _ma_get_last_key() and others _ma_dpos() -> ma_row_pos_from_key() Simplify setting of prev_key in del() Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid Treath key pages that may have a transid as if keys would be of variable length storage/maria/ma_delete_all.c: Reset history state if maria_delete_all_rows() are called Update parameters to _ma_update_state_lsns() call storage/maria/ma_extra.c: Store and restore info->lastkey storage/maria/ma_ft_boolean_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ft_nlq_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing) storage/maria/ma_ft_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ftdefs.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_fulltext.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_init.c: Check if blocksize is legal (Moved test here from ma_open()) storage/maria/ma_key.c: Added functions for storing/reading of transid Modified functions to use MARIA_KEY instead of key pointer and key length Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys Add transid to keys if table is versioned Added _ma_copy_key() storage/maria/ma_key_recover.c: Add logging of page_flag (holds information if there are keys with transid on page) Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive Added lots of DBUG_PRINT() Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE storage/maria/ma_key_recover.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_locking.c: Added new arguments to _ma_update_state_lsns_sub() storage/maria/ma_loghandler.c: Fixed all logging of LSN to look similar in DBUG log Changed if (left != 0) to if (left) as the later is used also later in the code storage/maria/ma_loghandler.h: Added new index page operations storage/maria/ma_open.c: Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned This is needed to not get double increments of state.records (one in ma_write.c and on when log is written) Changed info->lastkey to MARIA_KEY type Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled) Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Check on open that state.create_trid is correct Extend share->base.max_key_length in case of transactional table so that it can hold transid Removed 4.0 compatible fulltext key mode as this is not relevant for Maria Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block Initialize all new virtual function pointers Removed storing of state->unique, state->process and store state->create_trid instead storage/maria/ma_page.c: Added comment to describe key page structure Added functions to compact key page and log the compact operation storage/maria/ma_range.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search Added handling of pages with transid storage/maria/ma_recovery.c: Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal Added new arguments to _ma_update_state_lsns() storage/maria/ma_rename.c: Added new arguments to _ma_update_state_lsns() storage/maria/ma_rkey.c: Modified functions to use MARIA_KEY instead of key pointer and key length Don't use USE_WHOLE_KEY, use real length of key Use share->row_is_visible() to test if row is visible Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once Removed test if last_used_keyseg != 0 as this is always true storage/maria/ma_rnext.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rnext_same.c: Modified functions to use MARIA_KEY instead of key pointer and key length lastkey2 -> lastkey_buff2 storage/maria/ma_rprev.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rsame.c: Updated comment Simplify code by using local variable keyinfo instead if share->keyinfo[i] Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rsamepos.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_index.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use better variable names Removed not needed casts _ma_dpos() -> _ma_row_pos_from_key() Use info->last_rtree_keypos to save position to key instead of info->int_keypos Simplify err: condition Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function storage/maria/ma_rt_index.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_key.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify maria_rtree_add_key by combining idenitcal code and removing added_len storage/maria/ma_rt_key.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_mbr.c: Changed type of 'nextflag' to uint32 Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value storage/maria/ma_rt_mbr.h: Changed type of 'nextflag' to uint32 storage/maria/ma_rt_split.c: Modified functions to use MARIA_KEY instead of key pointer and key length key_length -> key_data_length to catch possible errors storage/maria/ma_rt_test.c: Fixed wrong comment Reset recinfo to avoid valgrind varnings Fixed wrong argument to create_record() that caused test to fail storage/maria/ma_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Added support of keys with optional trid Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads _ma_dpos() -> _ma_row_pos_from_key() If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search() Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data) Combine similar code at end of _ma_get_binary_pack_key() Removed not used function _ma_move_key() In _ma_search_next() don't call _ma_search() if we aren't on a nod page. Update info->cur_row.trid with trid for found key Removed some not needed casts Added _ma_trid_from_key() Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller storage/maria/ma_sort.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_sp_defs.h: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value storage/maria/ma_sp_key.c: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value Don't test sizeof(double), test against 8 as we are using float8store() Use mi_float8store() instead of doing swap of value (same thing but faster) storage/maria/ma_state.c: maria_versioning() now only calls _ma_block_get_status() if table supports versioning Added _ma_row_visible_xxx() functions for different occasions When emptying history, set info->state to point to the first history event. storage/maria/ma_state.h: Added _ma_row_visible_xxx() prototypes storage/maria/ma_static.c: Indentation changes storage/maria/ma_statrec.c: Fixed arguments to _ma_dpointer() and _ma_rec_pos() storage/maria/ma_test1.c: Call init_thr_lock() if we have versioning storage/maria/ma_test2.c: Call init_thr_lock() if we have versioning storage/maria/ma_unique.c: Modified functions to use MARIA_KEY storage/maria/ma_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_write.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] In _ma_enlarge_root(), mark in page_flag if new key has transid _ma_dpos() -> _ma_row_pos_from_key() Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not Moved 'reversed' to outside block as area was used later storage/maria/maria_chk.c: Added error if trying to sort with HA_BINARY_PACK_KEY Use new interface to get_key() and _ma_dpointer() _ma_dpos() -> _ma_row_pos_from_key() storage/maria/maria_def.h: Modified functions to use MARIA_KEY instead of key pointer and key length Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning Added create_trid to MARIA_SHARE Removed not used state variables 'process' and 'unique' Added defines for handling TRID's in index pages Changed to use MARIA_SHARE instead of MARIA_HA for some functions Added 'have_versioning' flag if table supports versioning Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF Changed last_key to be of type MARIA_KEY. Removed lastkey_length lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2 Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key Changed 'nextflag' and assocaited variables to uint32 storage/maria/maria_ftdump.c: lastkey -> lastkey_buff storage/maria/trnman.c: Fixed wrong initialization of min_read_from and max_commit_trid Added trnman_get_min_safe_trid() storage/maria/unittest/ma_test_all-t: Added --start-from storage/myisam/mi_check.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_delete.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_range.c: Updated comment storage/myisam/mi_write.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/rt_index.c: Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 07:18:28 +02:00
DBUG_ASSERT(_ma_kpos(nod_flag, key->data) <
info->state->key_file_length);
/* We don't store reference to row on nod pages for rtree index */
tot_key_length-= key->ref_length;
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
}
Added versioning of Maria index Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey Renamed old info->lastkey to info->lastkey_buff Use exact key lenghts for keys, not USE_WHOLE_KEY For partial key searches, use SEARCH_PART_KEY When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid Changes done in a lot of files: - Modified functions to use MARIA_KEY instead of key pointer and key length - Use keyinfo->root_lock instead of share->key_root_lock[keynr] - Simplify code by using local variable keyinfo instead if share->keyinfo[i] - Added #fdef EXTERNAL_LOCKING around removed state elements - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid) - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it .bzrignore: Added missing temporary directory extra/Makefile.am: comp_err is now deleted on make distclean include/maria.h: Added structure MARIA_KEY, which is used for intern key objects in Maria. Changed functions to take MARIA_KEY as an argument instead of pointer to packed key. Changed some functions that always return true or false to my_bool. Added virtual function make_key() to avoid if in _ma_make_key() Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster include/my_base.h: Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check() Added SEARCH_INSERT to be used when inserting new keys Added SEARCH_PART_KEY for partial searches Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid include/my_handler.h: Make next_flag 32 bit to make sure we can handle all SEARCH_ bits mysql-test/include/maria_empty_logs.inc: Read and restore current database; Don't assume we are using mysqltest. Don't log use databasename to log. Using this include should not cause any result changes. mysql-test/r/maria-gis-rtree-dynamic.result: Updated results after adding some check table commands to help pinpoint errors mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria-purge.result: New result after adding removal of logs mysql-test/r/maria-recovery-big.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-bitmap.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-rtree-ft.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria.result: New tests mysql-test/r/variables-big.result: Don't log id as it's not predictable mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result: Updated results to new binlog results. (Test has not been run in a long time as it requires --big) mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt: Moved file to ndb replication test directory mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: Fixed wrong path to included tests mysql-test/t/maria-gis-rtree-dynamic.test: Added some check table commands to help pinpoint errors mysql-test/t/maria-mvcc.test: New tests mysql-test/t/maria-purge.test: Remove logs to make test results predictable mysql-test/t/maria.test: New tests for some possible problems mysql-test/t/variables-big.test: Don't log id as it's not predictable mysys/my_handler.c: Updated function comment to reflect old code Changed nextflag to be uint32 to ensure we can have flags > 16 bit Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored. Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag mysys/my_lock.c: Fixed wrong test (Found by Guilhem) scripts/Makefile.am: Ensure that test programs are deleted by make clean sql/rpl_rli.cc: Moved assignment order to fix compiler warning storage/heap/hp_write.c: Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys storage/maria/Makefile.am: Remove also maria log files when doing make distclean storage/maria/ha_maria.cc: Use 'file->start_state' as default state for transactional tables without versioning At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows) In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event. Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave storage/maria/ma_blockrec.c: Updated comment storage/maria/ma_check.c: Compact key pages (removes transid) when doing --zerofill Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid Modified functions to use MARIA_KEY instead of key pointer and key length Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn() Removed not needed argument from get_record_for_key() Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL Remove some SPATIAL specific code where the virtual functions can handle this in a general manner Use info->lastkey_buff instead of info->lastkey _ma_dpos() -> _ma_row_pos_from_key() _ma_make_key() -> keyinfo->make_key() _ma_print_key() -> _ma_print_keydata() _ma_move_key() -> ma_copy_copy() Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Ensure that data on page doesn't overwrite page checksum position Use DBUG_DUMP_KEY instead of DBUG_DUMP Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp() Fixed check if rowid points outside of BLOCK_RECORD data file Use info->lastkey_buff instead of key on stack in some safe places Added #fdef EXTERNAL_LOCKING around removed state elements storage/maria/ma_close.c: Use keyinfo->root_lock instead of share->key_root_lock[keynr] storage/maria/ma_create.c: Removed assert that is already checked in maria_init() Force transactinal tables to be of type BLOCK_RECORD Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD) Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. storage/maria/ma_dbug.c: Changed _ma_print_key() to use MARIA_KEY storage/maria/ma_delete.c: Modified functions to use MARIA_KEY instead of key pointer and key length info->lastkey2-> info->lastkey_buff2 Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Use new interface for get_key(), _ma_get_last_key() and others _ma_dpos() -> ma_row_pos_from_key() Simplify setting of prev_key in del() Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid Treath key pages that may have a transid as if keys would be of variable length storage/maria/ma_delete_all.c: Reset history state if maria_delete_all_rows() are called Update parameters to _ma_update_state_lsns() call storage/maria/ma_extra.c: Store and restore info->lastkey storage/maria/ma_ft_boolean_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ft_nlq_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing) storage/maria/ma_ft_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ftdefs.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_fulltext.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_init.c: Check if blocksize is legal (Moved test here from ma_open()) storage/maria/ma_key.c: Added functions for storing/reading of transid Modified functions to use MARIA_KEY instead of key pointer and key length Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys Add transid to keys if table is versioned Added _ma_copy_key() storage/maria/ma_key_recover.c: Add logging of page_flag (holds information if there are keys with transid on page) Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive Added lots of DBUG_PRINT() Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE storage/maria/ma_key_recover.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_locking.c: Added new arguments to _ma_update_state_lsns_sub() storage/maria/ma_loghandler.c: Fixed all logging of LSN to look similar in DBUG log Changed if (left != 0) to if (left) as the later is used also later in the code storage/maria/ma_loghandler.h: Added new index page operations storage/maria/ma_open.c: Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned This is needed to not get double increments of state.records (one in ma_write.c and on when log is written) Changed info->lastkey to MARIA_KEY type Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled) Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Check on open that state.create_trid is correct Extend share->base.max_key_length in case of transactional table so that it can hold transid Removed 4.0 compatible fulltext key mode as this is not relevant for Maria Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block Initialize all new virtual function pointers Removed storing of state->unique, state->process and store state->create_trid instead storage/maria/ma_page.c: Added comment to describe key page structure Added functions to compact key page and log the compact operation storage/maria/ma_range.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search Added handling of pages with transid storage/maria/ma_recovery.c: Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal Added new arguments to _ma_update_state_lsns() storage/maria/ma_rename.c: Added new arguments to _ma_update_state_lsns() storage/maria/ma_rkey.c: Modified functions to use MARIA_KEY instead of key pointer and key length Don't use USE_WHOLE_KEY, use real length of key Use share->row_is_visible() to test if row is visible Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once Removed test if last_used_keyseg != 0 as this is always true storage/maria/ma_rnext.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rnext_same.c: Modified functions to use MARIA_KEY instead of key pointer and key length lastkey2 -> lastkey_buff2 storage/maria/ma_rprev.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rsame.c: Updated comment Simplify code by using local variable keyinfo instead if share->keyinfo[i] Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rsamepos.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_index.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use better variable names Removed not needed casts _ma_dpos() -> _ma_row_pos_from_key() Use info->last_rtree_keypos to save position to key instead of info->int_keypos Simplify err: condition Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function storage/maria/ma_rt_index.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_key.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify maria_rtree_add_key by combining idenitcal code and removing added_len storage/maria/ma_rt_key.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_mbr.c: Changed type of 'nextflag' to uint32 Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value storage/maria/ma_rt_mbr.h: Changed type of 'nextflag' to uint32 storage/maria/ma_rt_split.c: Modified functions to use MARIA_KEY instead of key pointer and key length key_length -> key_data_length to catch possible errors storage/maria/ma_rt_test.c: Fixed wrong comment Reset recinfo to avoid valgrind varnings Fixed wrong argument to create_record() that caused test to fail storage/maria/ma_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Added support of keys with optional trid Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads _ma_dpos() -> _ma_row_pos_from_key() If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search() Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data) Combine similar code at end of _ma_get_binary_pack_key() Removed not used function _ma_move_key() In _ma_search_next() don't call _ma_search() if we aren't on a nod page. Update info->cur_row.trid with trid for found key Removed some not needed casts Added _ma_trid_from_key() Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller storage/maria/ma_sort.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_sp_defs.h: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value storage/maria/ma_sp_key.c: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value Don't test sizeof(double), test against 8 as we are using float8store() Use mi_float8store() instead of doing swap of value (same thing but faster) storage/maria/ma_state.c: maria_versioning() now only calls _ma_block_get_status() if table supports versioning Added _ma_row_visible_xxx() functions for different occasions When emptying history, set info->state to point to the first history event. storage/maria/ma_state.h: Added _ma_row_visible_xxx() prototypes storage/maria/ma_static.c: Indentation changes storage/maria/ma_statrec.c: Fixed arguments to _ma_dpointer() and _ma_rec_pos() storage/maria/ma_test1.c: Call init_thr_lock() if we have versioning storage/maria/ma_test2.c: Call init_thr_lock() if we have versioning storage/maria/ma_unique.c: Modified functions to use MARIA_KEY storage/maria/ma_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_write.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] In _ma_enlarge_root(), mark in page_flag if new key has transid _ma_dpos() -> _ma_row_pos_from_key() Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not Moved 'reversed' to outside block as area was used later storage/maria/maria_chk.c: Added error if trying to sort with HA_BINARY_PACK_KEY Use new interface to get_key() and _ma_dpointer() _ma_dpos() -> _ma_row_pos_from_key() storage/maria/maria_def.h: Modified functions to use MARIA_KEY instead of key pointer and key length Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning Added create_trid to MARIA_SHARE Removed not used state variables 'process' and 'unique' Added defines for handling TRID's in index pages Changed to use MARIA_SHARE instead of MARIA_HA for some functions Added 'have_versioning' flag if table supports versioning Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF Changed last_key to be of type MARIA_KEY. Removed lastkey_length lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2 Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key Changed 'nextflag' and assocaited variables to uint32 storage/maria/maria_ftdump.c: lastkey -> lastkey_buff storage/maria/trnman.c: Fixed wrong initialization of min_read_from and max_commit_trid Added trnman_get_min_safe_trid() storage/maria/unittest/ma_test_all-t: Added --start-from storage/myisam/mi_check.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_delete.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_range.c: Updated comment storage/myisam/mi_write.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/rt_index.c: Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 07:18:28 +02:00
/* save key */
memcpy(key_pos, key->data - nod_flag, tot_key_length);
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
page->size+= tot_key_length;
page_store_size(share, page);
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
if (share->now_transactional &&
_ma_log_add(page, (uint)(key_pos - page->buff),
key_pos, tot_key_length, tot_key_length, 0,
KEY_OP_DEBUG_LOG_ADD_1))
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
DBUG_RETURN(-1);
merging MyISAM changes into Maria (not done in 5.1->maria merge of Jul 7th). "maria.test" and "ps_maria.test" still fail; "ma_test_all" starts failing (MyISAM has the same issue see BUG#30094). include/maria.h: merging MyISAM changes into Maria mysys/mf_keycache.c: mi_test_all showed "floating point exception", this was already fixed in the latest 5.1, importing fix. sql/item_xmlfunc.cc: compiler warning (already fixed in latest 5.1) storage/maria/ha_maria.cc: merging MyISAM changes into Maria. See #ifdef ASK_MONTY. storage/maria/ha_maria.h: merging MyISAM changes into Maria storage/maria/ma_cache.c: merging MyISAM changes into Maria storage/maria/ma_check.c: merging MyISAM changes into Maria storage/maria/ma_create.c: merging MyISAM changes into Maria storage/maria/ma_dynrec.c: merging MyISAM changes into Maria storage/maria/ma_extra.c: merging MyISAM changes into Maria storage/maria/ma_ft_boolean_search.c: merging MyISAM changes into Maria storage/maria/ma_ft_nlq_search.c: merging MyISAM changes into Maria storage/maria/ma_info.c: merging MyISAM changes into Maria storage/maria/ma_key.c: merging MyISAM changes into Maria storage/maria/ma_loghandler.c: compiler warning (part->length is size_t) storage/maria/ma_open.c: merging MyISAM changes into Maria storage/maria/ma_preload.c: merging MyISAM changes into Maria storage/maria/ma_range.c: merging MyISAM changes into Maria storage/maria/ma_rkey.c: merging MyISAM changes into Maria storage/maria/ma_rt_index.c: merging MyISAM changes into Maria storage/maria/ma_rt_key.c: merging MyISAM changes into Maria storage/maria/ma_rt_split.c: merging MyISAM changes into Maria storage/maria/ma_search.c: merging MyISAM changes into Maria storage/maria/ma_sort.c: merging MyISAM changes into Maria storage/maria/maria_def.h: merging MyISAM changes into Maria
2007-07-27 12:06:39 +02:00
DBUG_RETURN(0);
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
}
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
DBUG_RETURN(maria_rtree_split_page(key, page, new_page) ? -1 : 1);
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
}
Implementation of rows-in-block - Fixes some things missed in myisam->maria port - Moved variables that holds the state for the current row to 'cur_row' - Changed most uchar * to byte * to be able to remove a lot of casts - Removed RAID support - Added CHECK for rows-in-block - Added allocate_dynamic() for easier usage of dynamic rows when we know how many entries we will need - Reorder columns after CREATE for more optimal row storage (for rows-in-block) - Removed flag 'RRND_PRESERVER_LASTINX' (not needed) - Extended ma_test_all.sh to test more completely all row formats - New structs and variables to hold rows-in-block and bitmap information - Added org_data_file_type in header to allow easy restore of old record format when doing maria_pack / maria_chk -u - More virtual functions to handle different row types - Pointer to row is now MARIA_RECORD_POS instead of my_off_t - New header signature for MARIA index files - Fixed bugs in ma_test1.c and ma_test2.c - All key and row blocks are now of same size - We now only have one link chain for deleted key blocks include/m_string.h: Define bzero_if_purify include/maria.h: Implementation of rows-in-block include/my_base.h: Implementation of rows-in-block include/my_handler.h: Cleanup macros Added size_to_store_key_length() include/my_sys.h: Added 'allocate_dynamic()' include/myisamchk.h: Implementation of rows-in-block mysys/array.c: Added allocate_dynamic() mysys/mf_keycache.c: Moved DBUG_ENTER to it's right position mysys/my_pread.c: Ensure my_errno is always set sql/filesort.cc: Fixed some compiler warnings sql/gen_lex_hash.cc: Removed not needed 'inline' sql/ha_maria.cc: Implementation of rows-in-block Fixed compiler warnings sql/mysqld.cc: Fixed setting of wrong variable sql/uniques.cc: Fixed compiler warnings storage/maria/Makefile.am: Implementation of rows-in-block storage/maria/ma_check.c: Removed RAID functions Added support for CHECK of rows-in-blocks rows storage/maria/ma_checksum.c: Implementation of rows-in-block storage/maria/ma_close.c: Implementation of rows-in-block storage/maria/ma_create.c: Implementation of rows-in-block: - Reorder columns - All key blocks are now of same size - Removed old RAID support storage/maria/ma_dbug.c: Implementation of rows-in-block storage/maria/ma_delete.c: Implementation of rows-in-block storage/maria/ma_delete_all.c: Implementation of rows-in-block storage/maria/ma_dynrec.c: info->rec_buff is now allocated through _ma_alloc_buffer() Use new info->cur_row structure storage/maria/ma_extra.c: Implementation of rows-in-block storage/maria/ma_ft_boolean_search.c: Removed compiler warnings Indentation fixes storage/maria/ma_ft_nlq_search.c: Removed compiler warnings Indentation fixes storage/maria/ma_ft_update.c: Removed some casts storage/maria/ma_fulltext.h: Changed pointer type storage/maria/ma_info.c: Implementation of rows-in-block More general _ma_report_error() storage/maria/ma_init.c: Implementation of rows-in-block storage/maria/ma_key.c: Implementation of rows-in-block Removed some casts storage/maria/ma_keycache.c: Fixed DBUG entry storage/maria/ma_locking.c: Implementation of rows-in-block storage/maria/ma_open.c: Implementation of rows-in-block storage/maria/ma_packrec.c: Indentation fixes Changed uchar * to byte * to make it possible to remove some casts storage/maria/ma_page.c: Implementation of rows-in-block storage/maria/ma_range.c: Implementation of rows-in-block storage/maria/ma_rfirst.c: Implementation of rows-in-block storage/maria/ma_rkey.c: Implementation of rows-in-block Indentation fixes storage/maria/ma_rlast.c: Implementation of rows-in-block storage/maria/ma_rnext.c: Implementation of rows-in-block storage/maria/ma_rnext_same.c: Implementation of rows-in-block storage/maria/ma_rprev.c: Implementation of rows-in-block storage/maria/ma_rrnd.c: Implementation of rows-in-block Removed flag 'RRND_PRESERVER_LASTINX', by not resetting lastinx (This is reset by maria_scan_init()) storage/maria/ma_rsame.c: Implementation of rows-in-block storage/maria/ma_rsamepos.c: Implementation of rows-in-block storage/maria/ma_rt_index.c: Implementation of rows-in-block storage/maria/ma_rt_index.h: Implementation of rows-in-block storage/maria/ma_rt_key.c: Implementation of rows-in-block storage/maria/ma_rt_key.h: Implementation of rows-in-block storage/maria/ma_rt_mbr.c: Implementation of rows-in-block storage/maria/ma_rt_mbr.h: Implementation of rows-in-block storage/maria/ma_rt_split.c: Implementation of rows-in-block storage/maria/ma_rt_test.c: Indentation fix storage/maria/ma_scan.c: Implementation of rows-in-block Added 'maria_scan_end()' storage/maria/ma_search.c: Implementation of rows-in-block storage/maria/ma_sort.c: Indentation fixes uchar -> byte to be able to remove some casts storage/maria/ma_sp_defs.h: uchar * -> byte * storage/maria/ma_sp_key.c: uchar * -> byte * storage/maria/ma_sp_test.c: Indentation fixes storage/maria/ma_static.c: New header signature for MARIA storage/maria/ma_statrec.c: int -> my_bool functions my_off_t -> MARIA_RECORD_POS Fixed argument order for _ma_read_static_record() storage/maria/ma_test1.c: Implementation of rows-in-block Fixed some bugs in VARCHAR and BLOB testing storage/maria/ma_test2.c: Implementation of rows-in-block Fixed bug in BLOB testing storage/maria/ma_test3.c: Implementation of rows-in-block storage/maria/ma_test_all.sh: Run all tests with dynamic, static and block row formats (For the moment we skip REPAIR test of rows-in-block as this is not yet implemented) storage/maria/ma_unique.c: Implementation of rows-in-block storage/maria/ma_update.c: Implementation of rows-in-block storage/maria/ma_write.c: Implementation of rows-in-block Write of row is split into two parts, as rows-in-block format require us to do write of row before keys (to get row position) in contrast to all other row formats storage/maria/maria_chk.c: Implementation of rows-in-block storage/maria/maria_def.h: Implementation of rows-in-block - New structs and variables to hold rows-in-block and bitmap information - Added org_data_file_type in header to allow easy restore of old record format when doing maria_pack / maria_chk -u - More virtual functions to handle different row types - Pointer to row is now MARIA_RECORD_POS instead of my_off_t - uchar -> byte for many parameters to avoid casts storage/maria/maria_ftdump.c: Implementation of rows-in-block storage/maria/maria_pack.c: Implementation of rows-in-block storage/myisam/mi_check.c: Added new row types into switch to avoid compiler warnings Added some casts to avoid warnings after changing type of lastkey and buff storage/myisam/mi_create.c: Fix that 'pack_fields' is calculated correctly storage/myisam/mi_rsamepos.c: Implementation of rows-in-block storage/myisam/mi_test2.c: Fixed wrong printf storage/myisam/sort.c: uchar * -> byte * support-files/magic: Added support for Maria files Fided wrong entry's for MyISAM files storage/maria/ma_bitmap.c: New BitKeeper file ``storage/maria/ma_bitmap.c'' storage/maria/ma_blockrec.c: New BitKeeper file ``storage/maria/ma_blockrec.c'' storage/maria/ma_blockrec.h: New BitKeeper file ``storage/maria/ma_blockrec.h''
2007-01-18 20:38:14 +01:00
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
/*
Delete key from the page
Added versioning of Maria index Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey Renamed old info->lastkey to info->lastkey_buff Use exact key lenghts for keys, not USE_WHOLE_KEY For partial key searches, use SEARCH_PART_KEY When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid Changes done in a lot of files: - Modified functions to use MARIA_KEY instead of key pointer and key length - Use keyinfo->root_lock instead of share->key_root_lock[keynr] - Simplify code by using local variable keyinfo instead if share->keyinfo[i] - Added #fdef EXTERNAL_LOCKING around removed state elements - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid) - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it .bzrignore: Added missing temporary directory extra/Makefile.am: comp_err is now deleted on make distclean include/maria.h: Added structure MARIA_KEY, which is used for intern key objects in Maria. Changed functions to take MARIA_KEY as an argument instead of pointer to packed key. Changed some functions that always return true or false to my_bool. Added virtual function make_key() to avoid if in _ma_make_key() Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster include/my_base.h: Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check() Added SEARCH_INSERT to be used when inserting new keys Added SEARCH_PART_KEY for partial searches Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid include/my_handler.h: Make next_flag 32 bit to make sure we can handle all SEARCH_ bits mysql-test/include/maria_empty_logs.inc: Read and restore current database; Don't assume we are using mysqltest. Don't log use databasename to log. Using this include should not cause any result changes. mysql-test/r/maria-gis-rtree-dynamic.result: Updated results after adding some check table commands to help pinpoint errors mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria-purge.result: New result after adding removal of logs mysql-test/r/maria-recovery-big.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-bitmap.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-rtree-ft.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria.result: New tests mysql-test/r/variables-big.result: Don't log id as it's not predictable mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result: Updated results to new binlog results. (Test has not been run in a long time as it requires --big) mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt: Moved file to ndb replication test directory mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: Fixed wrong path to included tests mysql-test/t/maria-gis-rtree-dynamic.test: Added some check table commands to help pinpoint errors mysql-test/t/maria-mvcc.test: New tests mysql-test/t/maria-purge.test: Remove logs to make test results predictable mysql-test/t/maria.test: New tests for some possible problems mysql-test/t/variables-big.test: Don't log id as it's not predictable mysys/my_handler.c: Updated function comment to reflect old code Changed nextflag to be uint32 to ensure we can have flags > 16 bit Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored. Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag mysys/my_lock.c: Fixed wrong test (Found by Guilhem) scripts/Makefile.am: Ensure that test programs are deleted by make clean sql/rpl_rli.cc: Moved assignment order to fix compiler warning storage/heap/hp_write.c: Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys storage/maria/Makefile.am: Remove also maria log files when doing make distclean storage/maria/ha_maria.cc: Use 'file->start_state' as default state for transactional tables without versioning At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows) In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event. Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave storage/maria/ma_blockrec.c: Updated comment storage/maria/ma_check.c: Compact key pages (removes transid) when doing --zerofill Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid Modified functions to use MARIA_KEY instead of key pointer and key length Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn() Removed not needed argument from get_record_for_key() Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL Remove some SPATIAL specific code where the virtual functions can handle this in a general manner Use info->lastkey_buff instead of info->lastkey _ma_dpos() -> _ma_row_pos_from_key() _ma_make_key() -> keyinfo->make_key() _ma_print_key() -> _ma_print_keydata() _ma_move_key() -> ma_copy_copy() Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Ensure that data on page doesn't overwrite page checksum position Use DBUG_DUMP_KEY instead of DBUG_DUMP Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp() Fixed check if rowid points outside of BLOCK_RECORD data file Use info->lastkey_buff instead of key on stack in some safe places Added #fdef EXTERNAL_LOCKING around removed state elements storage/maria/ma_close.c: Use keyinfo->root_lock instead of share->key_root_lock[keynr] storage/maria/ma_create.c: Removed assert that is already checked in maria_init() Force transactinal tables to be of type BLOCK_RECORD Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD) Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. storage/maria/ma_dbug.c: Changed _ma_print_key() to use MARIA_KEY storage/maria/ma_delete.c: Modified functions to use MARIA_KEY instead of key pointer and key length info->lastkey2-> info->lastkey_buff2 Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Use new interface for get_key(), _ma_get_last_key() and others _ma_dpos() -> ma_row_pos_from_key() Simplify setting of prev_key in del() Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid Treath key pages that may have a transid as if keys would be of variable length storage/maria/ma_delete_all.c: Reset history state if maria_delete_all_rows() are called Update parameters to _ma_update_state_lsns() call storage/maria/ma_extra.c: Store and restore info->lastkey storage/maria/ma_ft_boolean_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ft_nlq_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing) storage/maria/ma_ft_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ftdefs.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_fulltext.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_init.c: Check if blocksize is legal (Moved test here from ma_open()) storage/maria/ma_key.c: Added functions for storing/reading of transid Modified functions to use MARIA_KEY instead of key pointer and key length Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys Add transid to keys if table is versioned Added _ma_copy_key() storage/maria/ma_key_recover.c: Add logging of page_flag (holds information if there are keys with transid on page) Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive Added lots of DBUG_PRINT() Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE storage/maria/ma_key_recover.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_locking.c: Added new arguments to _ma_update_state_lsns_sub() storage/maria/ma_loghandler.c: Fixed all logging of LSN to look similar in DBUG log Changed if (left != 0) to if (left) as the later is used also later in the code storage/maria/ma_loghandler.h: Added new index page operations storage/maria/ma_open.c: Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned This is needed to not get double increments of state.records (one in ma_write.c and on when log is written) Changed info->lastkey to MARIA_KEY type Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled) Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Check on open that state.create_trid is correct Extend share->base.max_key_length in case of transactional table so that it can hold transid Removed 4.0 compatible fulltext key mode as this is not relevant for Maria Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block Initialize all new virtual function pointers Removed storing of state->unique, state->process and store state->create_trid instead storage/maria/ma_page.c: Added comment to describe key page structure Added functions to compact key page and log the compact operation storage/maria/ma_range.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search Added handling of pages with transid storage/maria/ma_recovery.c: Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal Added new arguments to _ma_update_state_lsns() storage/maria/ma_rename.c: Added new arguments to _ma_update_state_lsns() storage/maria/ma_rkey.c: Modified functions to use MARIA_KEY instead of key pointer and key length Don't use USE_WHOLE_KEY, use real length of key Use share->row_is_visible() to test if row is visible Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once Removed test if last_used_keyseg != 0 as this is always true storage/maria/ma_rnext.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rnext_same.c: Modified functions to use MARIA_KEY instead of key pointer and key length lastkey2 -> lastkey_buff2 storage/maria/ma_rprev.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rsame.c: Updated comment Simplify code by using local variable keyinfo instead if share->keyinfo[i] Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rsamepos.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_index.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use better variable names Removed not needed casts _ma_dpos() -> _ma_row_pos_from_key() Use info->last_rtree_keypos to save position to key instead of info->int_keypos Simplify err: condition Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function storage/maria/ma_rt_index.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_key.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify maria_rtree_add_key by combining idenitcal code and removing added_len storage/maria/ma_rt_key.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_mbr.c: Changed type of 'nextflag' to uint32 Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value storage/maria/ma_rt_mbr.h: Changed type of 'nextflag' to uint32 storage/maria/ma_rt_split.c: Modified functions to use MARIA_KEY instead of key pointer and key length key_length -> key_data_length to catch possible errors storage/maria/ma_rt_test.c: Fixed wrong comment Reset recinfo to avoid valgrind varnings Fixed wrong argument to create_record() that caused test to fail storage/maria/ma_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Added support of keys with optional trid Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads _ma_dpos() -> _ma_row_pos_from_key() If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search() Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data) Combine similar code at end of _ma_get_binary_pack_key() Removed not used function _ma_move_key() In _ma_search_next() don't call _ma_search() if we aren't on a nod page. Update info->cur_row.trid with trid for found key Removed some not needed casts Added _ma_trid_from_key() Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller storage/maria/ma_sort.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_sp_defs.h: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value storage/maria/ma_sp_key.c: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value Don't test sizeof(double), test against 8 as we are using float8store() Use mi_float8store() instead of doing swap of value (same thing but faster) storage/maria/ma_state.c: maria_versioning() now only calls _ma_block_get_status() if table supports versioning Added _ma_row_visible_xxx() functions for different occasions When emptying history, set info->state to point to the first history event. storage/maria/ma_state.h: Added _ma_row_visible_xxx() prototypes storage/maria/ma_static.c: Indentation changes storage/maria/ma_statrec.c: Fixed arguments to _ma_dpointer() and _ma_rec_pos() storage/maria/ma_test1.c: Call init_thr_lock() if we have versioning storage/maria/ma_test2.c: Call init_thr_lock() if we have versioning storage/maria/ma_unique.c: Modified functions to use MARIA_KEY storage/maria/ma_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_write.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] In _ma_enlarge_root(), mark in page_flag if new key has transid _ma_dpos() -> _ma_row_pos_from_key() Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not Moved 'reversed' to outside block as area was used later storage/maria/maria_chk.c: Added error if trying to sort with HA_BINARY_PACK_KEY Use new interface to get_key() and _ma_dpointer() _ma_dpos() -> _ma_row_pos_from_key() storage/maria/maria_def.h: Modified functions to use MARIA_KEY instead of key pointer and key length Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning Added create_trid to MARIA_SHARE Removed not used state variables 'process' and 'unique' Added defines for handling TRID's in index pages Changed to use MARIA_SHARE instead of MARIA_HA for some functions Added 'have_versioning' flag if table supports versioning Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF Changed last_key to be of type MARIA_KEY. Removed lastkey_length lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2 Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key Changed 'nextflag' and assocaited variables to uint32 storage/maria/maria_ftdump.c: lastkey -> lastkey_buff storage/maria/trnman.c: Fixed wrong initialization of min_read_from and max_commit_trid Added trnman_get_min_safe_trid() storage/maria/unittest/ma_test_all-t: Added --start-from storage/myisam/mi_check.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_delete.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_range.c: Updated comment storage/myisam/mi_write.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/rt_index.c: Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 07:18:28 +02:00
Notes
key_length is only the data part of the key
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
*/
Implementation of rows-in-block - Fixes some things missed in myisam->maria port - Moved variables that holds the state for the current row to 'cur_row' - Changed most uchar * to byte * to be able to remove a lot of casts - Removed RAID support - Added CHECK for rows-in-block - Added allocate_dynamic() for easier usage of dynamic rows when we know how many entries we will need - Reorder columns after CREATE for more optimal row storage (for rows-in-block) - Removed flag 'RRND_PRESERVER_LASTINX' (not needed) - Extended ma_test_all.sh to test more completely all row formats - New structs and variables to hold rows-in-block and bitmap information - Added org_data_file_type in header to allow easy restore of old record format when doing maria_pack / maria_chk -u - More virtual functions to handle different row types - Pointer to row is now MARIA_RECORD_POS instead of my_off_t - New header signature for MARIA index files - Fixed bugs in ma_test1.c and ma_test2.c - All key and row blocks are now of same size - We now only have one link chain for deleted key blocks include/m_string.h: Define bzero_if_purify include/maria.h: Implementation of rows-in-block include/my_base.h: Implementation of rows-in-block include/my_handler.h: Cleanup macros Added size_to_store_key_length() include/my_sys.h: Added 'allocate_dynamic()' include/myisamchk.h: Implementation of rows-in-block mysys/array.c: Added allocate_dynamic() mysys/mf_keycache.c: Moved DBUG_ENTER to it's right position mysys/my_pread.c: Ensure my_errno is always set sql/filesort.cc: Fixed some compiler warnings sql/gen_lex_hash.cc: Removed not needed 'inline' sql/ha_maria.cc: Implementation of rows-in-block Fixed compiler warnings sql/mysqld.cc: Fixed setting of wrong variable sql/uniques.cc: Fixed compiler warnings storage/maria/Makefile.am: Implementation of rows-in-block storage/maria/ma_check.c: Removed RAID functions Added support for CHECK of rows-in-blocks rows storage/maria/ma_checksum.c: Implementation of rows-in-block storage/maria/ma_close.c: Implementation of rows-in-block storage/maria/ma_create.c: Implementation of rows-in-block: - Reorder columns - All key blocks are now of same size - Removed old RAID support storage/maria/ma_dbug.c: Implementation of rows-in-block storage/maria/ma_delete.c: Implementation of rows-in-block storage/maria/ma_delete_all.c: Implementation of rows-in-block storage/maria/ma_dynrec.c: info->rec_buff is now allocated through _ma_alloc_buffer() Use new info->cur_row structure storage/maria/ma_extra.c: Implementation of rows-in-block storage/maria/ma_ft_boolean_search.c: Removed compiler warnings Indentation fixes storage/maria/ma_ft_nlq_search.c: Removed compiler warnings Indentation fixes storage/maria/ma_ft_update.c: Removed some casts storage/maria/ma_fulltext.h: Changed pointer type storage/maria/ma_info.c: Implementation of rows-in-block More general _ma_report_error() storage/maria/ma_init.c: Implementation of rows-in-block storage/maria/ma_key.c: Implementation of rows-in-block Removed some casts storage/maria/ma_keycache.c: Fixed DBUG entry storage/maria/ma_locking.c: Implementation of rows-in-block storage/maria/ma_open.c: Implementation of rows-in-block storage/maria/ma_packrec.c: Indentation fixes Changed uchar * to byte * to make it possible to remove some casts storage/maria/ma_page.c: Implementation of rows-in-block storage/maria/ma_range.c: Implementation of rows-in-block storage/maria/ma_rfirst.c: Implementation of rows-in-block storage/maria/ma_rkey.c: Implementation of rows-in-block Indentation fixes storage/maria/ma_rlast.c: Implementation of rows-in-block storage/maria/ma_rnext.c: Implementation of rows-in-block storage/maria/ma_rnext_same.c: Implementation of rows-in-block storage/maria/ma_rprev.c: Implementation of rows-in-block storage/maria/ma_rrnd.c: Implementation of rows-in-block Removed flag 'RRND_PRESERVER_LASTINX', by not resetting lastinx (This is reset by maria_scan_init()) storage/maria/ma_rsame.c: Implementation of rows-in-block storage/maria/ma_rsamepos.c: Implementation of rows-in-block storage/maria/ma_rt_index.c: Implementation of rows-in-block storage/maria/ma_rt_index.h: Implementation of rows-in-block storage/maria/ma_rt_key.c: Implementation of rows-in-block storage/maria/ma_rt_key.h: Implementation of rows-in-block storage/maria/ma_rt_mbr.c: Implementation of rows-in-block storage/maria/ma_rt_mbr.h: Implementation of rows-in-block storage/maria/ma_rt_split.c: Implementation of rows-in-block storage/maria/ma_rt_test.c: Indentation fix storage/maria/ma_scan.c: Implementation of rows-in-block Added 'maria_scan_end()' storage/maria/ma_search.c: Implementation of rows-in-block storage/maria/ma_sort.c: Indentation fixes uchar -> byte to be able to remove some casts storage/maria/ma_sp_defs.h: uchar * -> byte * storage/maria/ma_sp_key.c: uchar * -> byte * storage/maria/ma_sp_test.c: Indentation fixes storage/maria/ma_static.c: New header signature for MARIA storage/maria/ma_statrec.c: int -> my_bool functions my_off_t -> MARIA_RECORD_POS Fixed argument order for _ma_read_static_record() storage/maria/ma_test1.c: Implementation of rows-in-block Fixed some bugs in VARCHAR and BLOB testing storage/maria/ma_test2.c: Implementation of rows-in-block Fixed bug in BLOB testing storage/maria/ma_test3.c: Implementation of rows-in-block storage/maria/ma_test_all.sh: Run all tests with dynamic, static and block row formats (For the moment we skip REPAIR test of rows-in-block as this is not yet implemented) storage/maria/ma_unique.c: Implementation of rows-in-block storage/maria/ma_update.c: Implementation of rows-in-block storage/maria/ma_write.c: Implementation of rows-in-block Write of row is split into two parts, as rows-in-block format require us to do write of row before keys (to get row position) in contrast to all other row formats storage/maria/maria_chk.c: Implementation of rows-in-block storage/maria/maria_def.h: Implementation of rows-in-block - New structs and variables to hold rows-in-block and bitmap information - Added org_data_file_type in header to allow easy restore of old record format when doing maria_pack / maria_chk -u - More virtual functions to handle different row types - Pointer to row is now MARIA_RECORD_POS instead of my_off_t - uchar -> byte for many parameters to avoid casts storage/maria/maria_ftdump.c: Implementation of rows-in-block storage/maria/maria_pack.c: Implementation of rows-in-block storage/myisam/mi_check.c: Added new row types into switch to avoid compiler warnings Added some casts to avoid warnings after changing type of lastkey and buff storage/myisam/mi_create.c: Fix that 'pack_fields' is calculated correctly storage/myisam/mi_rsamepos.c: Implementation of rows-in-block storage/myisam/mi_test2.c: Fixed wrong printf storage/myisam/sort.c: uchar * -> byte * support-files/magic: Added support for Maria files Fided wrong entry's for MyISAM files storage/maria/ma_bitmap.c: New BitKeeper file ``storage/maria/ma_bitmap.c'' storage/maria/ma_blockrec.c: New BitKeeper file ``storage/maria/ma_blockrec.c'' storage/maria/ma_blockrec.h: New BitKeeper file ``storage/maria/ma_blockrec.h''
2007-01-18 20:38:14 +01:00
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
int maria_rtree_delete_key(MARIA_PAGE *page, uchar *key, uint key_length)
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
{
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
MARIA_HA *info= page->info;
Added MARIA_SHARE *share to a lot of places to make code simpler Changed info->s -> share to get more efficent code Updated arguments to page accessor functions to use MARIA_SHARE * instead of MARIA_HA *. Tested running tests in quick mode (no balance page on insert and only when critical on delete) Fixed bug in underflow handling in quick mode Fixed bug in log handler where it accessed not initialized variable Fixed bug in log handler where it didn't free mutex in unlikely error condition Removed double write of page in case of of some underflow conditions Added DBUG_PRINT in safemutex lock/unlock dbug/dbug.c: Compile without SAFE_MUTEX (to be able to use DBUG_PRINT in safe_mutex code) Use calls to get/set my_thread_var->dbug. (Make dbug independent of compile time options for mysys) include/my_pthread.h: Added prototypes for my_thread_var_get_dbug() & my_thread_var_set_dbug() mysql-test/lib/mtr_report.pl: Don't check warnings in log files if we are using --extern mysys/my_thr_init.c: Added my_thread_var_get_dbug() & my_thread_var_set_dbug() mysys/thr_mutex.c: Added DBUG printing of addresses to mutex for lock/unlock storage/maria/ma_blockrec.c: Fixed comment storage/maria/ma_check.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_close.c: Indentation fixes storage/maria/ma_create.c: Calculate min_key_length correctly storage/maria/ma_dbug.c: Indentation fixes storage/maria/ma_delete.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Removed some writing of key pages that underflow (will be written by caller) Fixed crashing bug in underflow handling when using quick mode storage/maria/ma_delete_all.c: Indentation fixes storage/maria/ma_dynrec.c: Indentation fixes storage/maria/ma_extra.c: Fixed indentation Removed old useless code Reset share->changed if we have written state storage/maria/ma_ft_update.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_info.c: Indentation fixes storage/maria/ma_key_recover.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_locking.c: Indentation fixes storage/maria/ma_loghandler.c: Removed wrapper functions translog_mutex_lock and translog_mutex_unlock (safemutex now does same kind of printing) Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free Fixed some DBUG_PRINT to ensure that convert-dbug-for-diff works Fixed bug in translog_flush() that caused log to stop syncing to disk Added missing mutex_unlock in case of error storage/maria/ma_loghandler.h: Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free storage/maria/ma_open.c: Indentation fixes storage/maria/ma_packrec.c: Indentation fixes storage/maria/ma_page.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Added check that we never write a key page without content (except in recovery where a key page may temporary be without content) storage/maria/ma_preload.c: Updated arguments to page accessor functions storage/maria/ma_range.c: Updated arguments to page accessor functions storage/maria/ma_rkey.c: Indentation fixes storage/maria/ma_rprev.c: Indentation fixes storage/maria/ma_rt_index.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_index.h: Updated arguments to page accessor functions storage/maria/ma_rt_key.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_mbr.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_split.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_search.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_sort.c: Indentation fixes storage/maria/ma_statrec.c: Indentation fixes storage/maria/ma_test1.c: Added extra undo test Flush also keys in -u1, to ensure that the full log is flushed storage/maria/ma_test2.c: Added extra undo test Flush also keys in -u1, to ensure that the full log is flushed storage/maria/ma_test_recovery.expected: Updated results storage/maria/ma_test_recovery: Added extra undo test storage/maria/ma_update.c: Indentation fixes storage/maria/ma_write.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Prepare for quick mode for insert (don't balance page) storage/maria/maria_chk.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/maria_def.h: Updated arguments to page accessor functions
2007-12-10 01:32:00 +01:00
MARIA_SHARE *share= info->s;
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
uint key_length_with_nod_flag;
uchar *key_start;
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
key_start= key - page->node;
if (!page->node)
Added MARIA_SHARE *share to a lot of places to make code simpler Changed info->s -> share to get more efficent code Updated arguments to page accessor functions to use MARIA_SHARE * instead of MARIA_HA *. Tested running tests in quick mode (no balance page on insert and only when critical on delete) Fixed bug in underflow handling in quick mode Fixed bug in log handler where it accessed not initialized variable Fixed bug in log handler where it didn't free mutex in unlikely error condition Removed double write of page in case of of some underflow conditions Added DBUG_PRINT in safemutex lock/unlock dbug/dbug.c: Compile without SAFE_MUTEX (to be able to use DBUG_PRINT in safe_mutex code) Use calls to get/set my_thread_var->dbug. (Make dbug independent of compile time options for mysys) include/my_pthread.h: Added prototypes for my_thread_var_get_dbug() & my_thread_var_set_dbug() mysql-test/lib/mtr_report.pl: Don't check warnings in log files if we are using --extern mysys/my_thr_init.c: Added my_thread_var_get_dbug() & my_thread_var_set_dbug() mysys/thr_mutex.c: Added DBUG printing of addresses to mutex for lock/unlock storage/maria/ma_blockrec.c: Fixed comment storage/maria/ma_check.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_close.c: Indentation fixes storage/maria/ma_create.c: Calculate min_key_length correctly storage/maria/ma_dbug.c: Indentation fixes storage/maria/ma_delete.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Removed some writing of key pages that underflow (will be written by caller) Fixed crashing bug in underflow handling when using quick mode storage/maria/ma_delete_all.c: Indentation fixes storage/maria/ma_dynrec.c: Indentation fixes storage/maria/ma_extra.c: Fixed indentation Removed old useless code Reset share->changed if we have written state storage/maria/ma_ft_update.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_info.c: Indentation fixes storage/maria/ma_key_recover.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_locking.c: Indentation fixes storage/maria/ma_loghandler.c: Removed wrapper functions translog_mutex_lock and translog_mutex_unlock (safemutex now does same kind of printing) Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free Fixed some DBUG_PRINT to ensure that convert-dbug-for-diff works Fixed bug in translog_flush() that caused log to stop syncing to disk Added missing mutex_unlock in case of error storage/maria/ma_loghandler.h: Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free storage/maria/ma_open.c: Indentation fixes storage/maria/ma_packrec.c: Indentation fixes storage/maria/ma_page.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Added check that we never write a key page without content (except in recovery where a key page may temporary be without content) storage/maria/ma_preload.c: Updated arguments to page accessor functions storage/maria/ma_range.c: Updated arguments to page accessor functions storage/maria/ma_rkey.c: Indentation fixes storage/maria/ma_rprev.c: Indentation fixes storage/maria/ma_rt_index.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_index.h: Updated arguments to page accessor functions storage/maria/ma_rt_key.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_mbr.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_rt_split.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_search.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/ma_sort.c: Indentation fixes storage/maria/ma_statrec.c: Indentation fixes storage/maria/ma_test1.c: Added extra undo test Flush also keys in -u1, to ensure that the full log is flushed storage/maria/ma_test2.c: Added extra undo test Flush also keys in -u1, to ensure that the full log is flushed storage/maria/ma_test_recovery.expected: Updated results storage/maria/ma_test_recovery: Added extra undo test storage/maria/ma_update.c: Indentation fixes storage/maria/ma_write.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions Prepare for quick mode for insert (don't balance page) storage/maria/maria_chk.c: Added MARIA_SHARE *share to a lot of places to make code simpler info->s -> share Updated arguments to page accessor functions storage/maria/maria_def.h: Updated arguments to page accessor functions
2007-12-10 01:32:00 +01:00
key_length+= share->base.rec_reflength;
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
memmove(key_start, key + key_length, page->size - key_length -
(key - page->buff));
key_length_with_nod_flag= key_length + page->node;
page->size-= key_length_with_nod_flag;
page_store_size(share, page);
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
if (share->now_transactional &&
Fixed bug that 'maria_read_log -a' didn't set max_trid when reparing tables. Fixed bug in Aria when replacing short keys with long keys and a key tree both overflow and underflow at same time. Fixed several bugs when generating recovery logs when using RGQ with replacing long keys with short keys and vice versa. Lots of new DBUG_ASSERT()'s Added more information to recovery log to make it easier to know from where log entry orginated. Introduced MARIA_PAGE->org_size that tells what the size of the page was in last log entry. This allows us to find out if all key changes for index page was logged. Small code cleanups: - Introduced _ma_log_key_changes() to log crc of key page changes - Added share->max_index_block_size as max size of data one can put in key block (block_size - KEYPAGE_CHECKSUM_SIZE) This will later simplify adding a directory to index pages. - Write page number instead of page postition to DBUG log mysql-test/lib/v1/mysql-test-run.pl: Use --general-log instead of --log to disable warning when using RQG sql/mysqld.cc: If we have already sent ok to client when we get an error, log this to stderr Don't disable option --log-output if CSV engine is not supported. storage/maria/ha_maria.cc: Log queries to recovery log also in LOCK TABLES storage/maria/ma_check.c: If param->max_trid is set, use this value instead of max_trid_in_system(). This is used by recovery to set max_trid to max seen trid so far. keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE -> max_index_block_size (Style optimization) storage/maria/ma_delete.c: Mark tables crashed early Write page number instead of page position to debug log. Added parameter to ma_log_delete() and ma_log_prefix() that is logged so that we can find where wrong log entries where generated. Fixed bug where a page was not proplerly written when same key tree had both an overflow and underflow when deleting a key. keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE => max_index_block_size (Style optimization) ma_log_delete() now has extra parameter of how many bytes from end of page should be appended to log for page (for page overflows) storage/maria/ma_key_recover.c: Added extra parameter to ma_log_prefix() to indicate what caused log entry. Update MARIA_PAGE->org_size when logging info about page. Much more DBUG_ASSERT()'s. Fix some bugs in maria_log_add() to handle page overflows. Added _ma_log_key_changes() to log crc of key page changes. If EXTRA_STORE_FULL_PAGE_IN_KEY_CHANGES is defines, log the resulting pages to log so one can trivally see how the resulting page should have looked like (for errors in CRC values) storage/maria/ma_key_recover.h: Added _ma_log_key_changes() which is only called if EXTRA_DEBUG_KEY_CHANGES is defined. Updated function prototypes. storage/maria/ma_loghandler.h: Added more values to en_key_debug, to get more exact location where things went wrong when logging to recovery log. storage/maria/ma_open.c: Initialize share->max_index_block_size storage/maria/ma_page.c: Added updating and testing of MARIA_PAGE->org_size Write page number instead of page postition to DBUG log Generate error if we read page with wrong data. Removed wrong assert: key_del_current != share->state.key_del. Simplify _ma_log_compact_keypage() storage/maria/ma_recovery.c: Set param.max_trid to max seen trid before running repair table (used for alter table to create index) storage/maria/ma_rt_key.c: Update call to _ma_log_delete() storage/maria/ma_rt_split.c: Use _ma_log_key_changes() Update MARIA_PAGE->org_size storage/maria/ma_unique.c: Remove casts storage/maria/ma_write.c: keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE => share->max_index_block_length. Updated calls to _ma_log_prefix() Changed code to use _ma_log_key_changes() Update ma_page->org_size Fixed bug in _ma_log_split() for pages that overflow Added KEY_OP_DEBUG logging to functions Log KEYPAGE_FLAG in all log entries storage/maria/maria_def.h: Added SHARE->max_index_block_size Added MARIA_PAGE->org_size storage/maria/trnman.c: Reset flags for new transaction.
2010-09-06 01:25:44 +02:00
_ma_log_delete(page, key_start, 0, key_length_with_nod_flag,
0, KEY_OP_DEBUG_LOG_DEL_CHANGE_RT))
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
return -1;
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
return 0;
}
/*
WL#3072 - Maria Recovery Recovery of R-tree and fulltext indices. Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method". Fix for bug (see ma_rt_index.c) where we could have a wrong page_link pointer causing wrong memory access during some R-tree index insert/delete. Making ma_rt_test work again (it had been neglected over time) and adding options (record type etc) to prepare it for integration into ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash) mysql-test/r/maria.result: correct result mysql-test/t/maria.test: now we get no error storage/maria/ma_blockrec.c: delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff. ma_get_length() does not change **packet, marking it with 'const' to remove some casts in callers of this function. The (const uchar**)&header casts will be removed when Monty changes 'header' to const uchar*. _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read() so its initialization was superfluous. storage/maria/ma_check.c: Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method" (see comment in code) storage/maria/ma_create.c: FULLTEXT and SPATIAL indices have logging now, they are recoverable. storage/maria/ma_delete.c: Logging done by _ma_ck_delete() is moved to a function (_ma_write_undo_key_delete()), for reusal by R-tree logging. _ma_log_delete() is made non-static for same reason, and some of its parameters are made pointers to const. Removed wrong comment ("Note that for delete key" etc, contradicted by code and comment "Log also position to row" a few lines above) storage/maria/ma_ft_update.c: unneeded cast, comment for future storage/maria/ma_key_recover.c: Comment about possible deadlock. Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC. Support operation KEY_OP_MULTI_COPY. When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call the proper key insertion|deletion depending on if this is R-tree or B-tree. Explanation of of _ma_[un]lock_key_del() work, maybe useful for mortals like me. storage/maria/ma_key_recover.h: change of prototypes storage/maria/ma_loghandler.h: New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY storage/maria/ma_page.c: Comments storage/maria/ma_pagecache.c: typo storage/maria/ma_rt_index.c: Fix for bug: the page_link pointer in maria_rtree_insert_req() could be wrong when we set its 'changed' member; for the solution see ma_key_recover.h. It is needed only in cases when we manipulate several pages. Logging of changes done to pages by key insert/delete. maria_rtree_delete()'s main work is moved to a new function maria_rtree_real_delete(), which is used by maria_rtree_delete() and by applying of UNDO_KEY_INSERT. storage/maria/ma_rt_index.h: new prototypes and macros for ma_rt_index.c storage/maria/ma_rt_key.c: Logging of maria_rtree_add_key() and maria_rtree_delete_key(). When inserting, split is necessary if there is not enough room for key: take checksum's occupied space in this calculation. storage/maria/ma_rt_key.h: new prototypes (those functions need to know the page's id because they do logging) storage/maria/ma_rt_mbr.c: Comments about what the functions change. storage/maria/ma_rt_split.c: maria_rtree_split_page() needs to know the page's id, because it does logging. Logging of what a split operation does to the split page (see comment of _ma_log_rt_split(): moves of keys inside the page, sometimes insertion of the new key, and shrinking of the page) and to the new page (receives some keys from split page, and sometimes the new key). storage/maria/ma_rt_test.c: ma_rt_test had been forgotten when maria_rkey() was changed some months ago (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR) were rewritten to maria_scan() calls (which implies maria_scan_init()). The 'max_i' change is to adapt to the fact that maria_scan() does not return deleted records for BLOCK_RECORD but does so for other formats; the initial code assumed a certain number of deleted records would be returned, we change it to rather count only non-deleted ones. We also add more features to this test, like ma_test1 (the plan is to run ma_rt_test in ma_test_all-t): options to choose records' format, table checksum, transactions, checkpoints, end at specific stages, abort without committing, and debug trace. storage/maria/ma_test1.c: MY_INIT() does my_init(). storage/maria/ma_write.c: Logging done by _ma_ck_write_btree_with_log() is moved to a function (_ma_write_undo_key_insert()), for reusal by R-tree logging. _ma_log_new() and _ma_log_change() are made non-static for same reason. Some parameters of logging functions are made pointers to const. If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too (better checks, bigger record). storage/maria/maria_read_log.c: Program takes no arguments, bail out if any, instead of silently discarding them storage/myisam/rt_test.c: rt_test had been forgotten when mi_rkey() was changed some months ago (0->HA_WHOLE_KEY change). The 'max_i' change is to make it symmetric with ma_rt_test.c mysql-test/r/maria-gis-rtree-dynamic.result: correct result mysql-test/r/maria-gis-rtree-trans.result: correct result mysql-test/r/maria-recovery-rtree-ft.result: almost correct result (hitting BUG# in the end) mysql-test/t/maria-gis-rtree-dynamic.test: test R-tree & dynamic row format mysql-test/t/maria-gis-rtree-trans.test: Test R-tree and page row format and transactional mysql-test/t/maria-recovery-rtree-ft-master.opt: usual options for recovery testing mysql-test/t/maria-recovery-rtree-ft.test: test of recovery of R-tree and fulltext indices.
2008-04-24 17:22:51 +02:00
Calculate and store key MBR into *key.
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
*/
Added versioning of Maria index Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey Renamed old info->lastkey to info->lastkey_buff Use exact key lenghts for keys, not USE_WHOLE_KEY For partial key searches, use SEARCH_PART_KEY When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid Changes done in a lot of files: - Modified functions to use MARIA_KEY instead of key pointer and key length - Use keyinfo->root_lock instead of share->key_root_lock[keynr] - Simplify code by using local variable keyinfo instead if share->keyinfo[i] - Added #fdef EXTERNAL_LOCKING around removed state elements - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid) - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it .bzrignore: Added missing temporary directory extra/Makefile.am: comp_err is now deleted on make distclean include/maria.h: Added structure MARIA_KEY, which is used for intern key objects in Maria. Changed functions to take MARIA_KEY as an argument instead of pointer to packed key. Changed some functions that always return true or false to my_bool. Added virtual function make_key() to avoid if in _ma_make_key() Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster include/my_base.h: Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check() Added SEARCH_INSERT to be used when inserting new keys Added SEARCH_PART_KEY for partial searches Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid include/my_handler.h: Make next_flag 32 bit to make sure we can handle all SEARCH_ bits mysql-test/include/maria_empty_logs.inc: Read and restore current database; Don't assume we are using mysqltest. Don't log use databasename to log. Using this include should not cause any result changes. mysql-test/r/maria-gis-rtree-dynamic.result: Updated results after adding some check table commands to help pinpoint errors mysql-test/r/maria-mvcc.result: New tests mysql-test/r/maria-purge.result: New result after adding removal of logs mysql-test/r/maria-recovery-big.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-bitmap.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery-rtree-ft.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria-recovery.result: maria_empty_logs doesn't log 'use mysqltest' anymore mysql-test/r/maria.result: New tests mysql-test/r/variables-big.result: Don't log id as it's not predictable mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result: Updated results to new binlog results. (Test has not been run in a long time as it requires --big) mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt: Moved file to ndb replication test directory mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: Fixed wrong path to included tests mysql-test/t/maria-gis-rtree-dynamic.test: Added some check table commands to help pinpoint errors mysql-test/t/maria-mvcc.test: New tests mysql-test/t/maria-purge.test: Remove logs to make test results predictable mysql-test/t/maria.test: New tests for some possible problems mysql-test/t/variables-big.test: Don't log id as it's not predictable mysys/my_handler.c: Updated function comment to reflect old code Changed nextflag to be uint32 to ensure we can have flags > 16 bit Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored. Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag mysys/my_lock.c: Fixed wrong test (Found by Guilhem) scripts/Makefile.am: Ensure that test programs are deleted by make clean sql/rpl_rli.cc: Moved assignment order to fix compiler warning storage/heap/hp_write.c: Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys storage/maria/Makefile.am: Remove also maria log files when doing make distclean storage/maria/ha_maria.cc: Use 'file->start_state' as default state for transactional tables without versioning At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows) In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event. Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave storage/maria/ma_blockrec.c: Updated comment storage/maria/ma_check.c: Compact key pages (removes transid) when doing --zerofill Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid Modified functions to use MARIA_KEY instead of key pointer and key length Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn() Removed not needed argument from get_record_for_key() Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL Remove some SPATIAL specific code where the virtual functions can handle this in a general manner Use info->lastkey_buff instead of info->lastkey _ma_dpos() -> _ma_row_pos_from_key() _ma_make_key() -> keyinfo->make_key() _ma_print_key() -> _ma_print_keydata() _ma_move_key() -> ma_copy_copy() Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Ensure that data on page doesn't overwrite page checksum position Use DBUG_DUMP_KEY instead of DBUG_DUMP Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp() Fixed check if rowid points outside of BLOCK_RECORD data file Use info->lastkey_buff instead of key on stack in some safe places Added #fdef EXTERNAL_LOCKING around removed state elements storage/maria/ma_close.c: Use keyinfo->root_lock instead of share->key_root_lock[keynr] storage/maria/ma_create.c: Removed assert that is already checked in maria_init() Force transactinal tables to be of type BLOCK_RECORD Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD) Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file. storage/maria/ma_dbug.c: Changed _ma_print_key() to use MARIA_KEY storage/maria/ma_delete.c: Modified functions to use MARIA_KEY instead of key pointer and key length info->lastkey2-> info->lastkey_buff2 Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys Use new interface for get_key(), _ma_get_last_key() and others _ma_dpos() -> ma_row_pos_from_key() Simplify setting of prev_key in del() Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid Treath key pages that may have a transid as if keys would be of variable length storage/maria/ma_delete_all.c: Reset history state if maria_delete_all_rows() are called Update parameters to _ma_update_state_lsns() call storage/maria/ma_extra.c: Store and restore info->lastkey storage/maria/ma_ft_boolean_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ft_nlq_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing) storage/maria/ma_ft_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_ftdefs.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_fulltext.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_init.c: Check if blocksize is legal (Moved test here from ma_open()) storage/maria/ma_key.c: Added functions for storing/reading of transid Modified functions to use MARIA_KEY instead of key pointer and key length Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys Add transid to keys if table is versioned Added _ma_copy_key() storage/maria/ma_key_recover.c: Add logging of page_flag (holds information if there are keys with transid on page) Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive Added lots of DBUG_PRINT() Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE storage/maria/ma_key_recover.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_locking.c: Added new arguments to _ma_update_state_lsns_sub() storage/maria/ma_loghandler.c: Fixed all logging of LSN to look similar in DBUG log Changed if (left != 0) to if (left) as the later is used also later in the code storage/maria/ma_loghandler.h: Added new index page operations storage/maria/ma_open.c: Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned This is needed to not get double increments of state.records (one in ma_write.c and on when log is written) Changed info->lastkey to MARIA_KEY type Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled) Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned. Check on open that state.create_trid is correct Extend share->base.max_key_length in case of transactional table so that it can hold transid Removed 4.0 compatible fulltext key mode as this is not relevant for Maria Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block Initialize all new virtual function pointers Removed storing of state->unique, state->process and store state->create_trid instead storage/maria/ma_page.c: Added comment to describe key page structure Added functions to compact key page and log the compact operation storage/maria/ma_range.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search Added handling of pages with transid storage/maria/ma_recovery.c: Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal Added new arguments to _ma_update_state_lsns() storage/maria/ma_rename.c: Added new arguments to _ma_update_state_lsns() storage/maria/ma_rkey.c: Modified functions to use MARIA_KEY instead of key pointer and key length Don't use USE_WHOLE_KEY, use real length of key Use share->row_is_visible() to test if row is visible Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once Removed test if last_used_keyseg != 0 as this is always true storage/maria/ma_rnext.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rnext_same.c: Modified functions to use MARIA_KEY instead of key pointer and key length lastkey2 -> lastkey_buff2 storage/maria/ma_rprev.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] Use share->row_is_visible() to test if row is visible storage/maria/ma_rsame.c: Updated comment Simplify code by using local variable keyinfo instead if share->keyinfo[i] Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rsamepos.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_index.c: Modified functions to use MARIA_KEY instead of key pointer and key length Use better variable names Removed not needed casts _ma_dpos() -> _ma_row_pos_from_key() Use info->last_rtree_keypos to save position to key instead of info->int_keypos Simplify err: condition Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function storage/maria/ma_rt_index.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_key.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify maria_rtree_add_key by combining idenitcal code and removing added_len storage/maria/ma_rt_key.h: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_rt_mbr.c: Changed type of 'nextflag' to uint32 Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value storage/maria/ma_rt_mbr.h: Changed type of 'nextflag' to uint32 storage/maria/ma_rt_split.c: Modified functions to use MARIA_KEY instead of key pointer and key length key_length -> key_data_length to catch possible errors storage/maria/ma_rt_test.c: Fixed wrong comment Reset recinfo to avoid valgrind varnings Fixed wrong argument to create_record() that caused test to fail storage/maria/ma_search.c: Modified functions to use MARIA_KEY instead of key pointer and key length Added support of keys with optional trid Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads _ma_dpos() -> _ma_row_pos_from_key() If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search() Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data) Combine similar code at end of _ma_get_binary_pack_key() Removed not used function _ma_move_key() In _ma_search_next() don't call _ma_search() if we aren't on a nod page. Update info->cur_row.trid with trid for found key Removed some not needed casts Added _ma_trid_from_key() Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller storage/maria/ma_sort.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_sp_defs.h: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value storage/maria/ma_sp_key.c: _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value Don't test sizeof(double), test against 8 as we are using float8store() Use mi_float8store() instead of doing swap of value (same thing but faster) storage/maria/ma_state.c: maria_versioning() now only calls _ma_block_get_status() if table supports versioning Added _ma_row_visible_xxx() functions for different occasions When emptying history, set info->state to point to the first history event. storage/maria/ma_state.h: Added _ma_row_visible_xxx() prototypes storage/maria/ma_static.c: Indentation changes storage/maria/ma_statrec.c: Fixed arguments to _ma_dpointer() and _ma_rec_pos() storage/maria/ma_test1.c: Call init_thr_lock() if we have versioning storage/maria/ma_test2.c: Call init_thr_lock() if we have versioning storage/maria/ma_unique.c: Modified functions to use MARIA_KEY storage/maria/ma_update.c: Modified functions to use MARIA_KEY instead of key pointer and key length storage/maria/ma_write.c: Modified functions to use MARIA_KEY instead of key pointer and key length Simplify code by using local variable keyinfo instead if share->keyinfo[i] In _ma_enlarge_root(), mark in page_flag if new key has transid _ma_dpos() -> _ma_row_pos_from_key() Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not Moved 'reversed' to outside block as area was used later storage/maria/maria_chk.c: Added error if trying to sort with HA_BINARY_PACK_KEY Use new interface to get_key() and _ma_dpointer() _ma_dpos() -> _ma_row_pos_from_key() storage/maria/maria_def.h: Modified functions to use MARIA_KEY instead of key pointer and key length Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning Added create_trid to MARIA_SHARE Removed not used state variables 'process' and 'unique' Added defines for handling TRID's in index pages Changed to use MARIA_SHARE instead of MARIA_HA for some functions Added 'have_versioning' flag if table supports versioning Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF Changed last_key to be of type MARIA_KEY. Removed lastkey_length lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2 Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key Changed 'nextflag' and assocaited variables to uint32 storage/maria/maria_ftdump.c: lastkey -> lastkey_buff storage/maria/trnman.c: Fixed wrong initialization of min_read_from and max_commit_trid Added trnman_get_min_safe_trid() storage/maria/unittest/ma_test_all-t: Added --start-from storage/myisam/mi_check.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_delete.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/mi_range.c: Updated comment storage/myisam/mi_write.c: Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order storage/myisam/rt_index.c: Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 07:18:28 +02:00
int maria_rtree_set_key_mbr(MARIA_HA *info, MARIA_KEY *key,
my_off_t child_page)
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
{
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
MARIA_PAGE page;
merging MyISAM changes into Maria (not done in 5.1->maria merge of Jul 7th). "maria.test" and "ps_maria.test" still fail; "ma_test_all" starts failing (MyISAM has the same issue see BUG#30094). include/maria.h: merging MyISAM changes into Maria mysys/mf_keycache.c: mi_test_all showed "floating point exception", this was already fixed in the latest 5.1, importing fix. sql/item_xmlfunc.cc: compiler warning (already fixed in latest 5.1) storage/maria/ha_maria.cc: merging MyISAM changes into Maria. See #ifdef ASK_MONTY. storage/maria/ha_maria.h: merging MyISAM changes into Maria storage/maria/ma_cache.c: merging MyISAM changes into Maria storage/maria/ma_check.c: merging MyISAM changes into Maria storage/maria/ma_create.c: merging MyISAM changes into Maria storage/maria/ma_dynrec.c: merging MyISAM changes into Maria storage/maria/ma_extra.c: merging MyISAM changes into Maria storage/maria/ma_ft_boolean_search.c: merging MyISAM changes into Maria storage/maria/ma_ft_nlq_search.c: merging MyISAM changes into Maria storage/maria/ma_info.c: merging MyISAM changes into Maria storage/maria/ma_key.c: merging MyISAM changes into Maria storage/maria/ma_loghandler.c: compiler warning (part->length is size_t) storage/maria/ma_open.c: merging MyISAM changes into Maria storage/maria/ma_preload.c: merging MyISAM changes into Maria storage/maria/ma_range.c: merging MyISAM changes into Maria storage/maria/ma_rkey.c: merging MyISAM changes into Maria storage/maria/ma_rt_index.c: merging MyISAM changes into Maria storage/maria/ma_rt_key.c: merging MyISAM changes into Maria storage/maria/ma_rt_split.c: merging MyISAM changes into Maria storage/maria/ma_search.c: merging MyISAM changes into Maria storage/maria/ma_sort.c: merging MyISAM changes into Maria storage/maria/maria_def.h: merging MyISAM changes into Maria
2007-07-27 12:06:39 +02:00
DBUG_ENTER("maria_rtree_set_key_mbr");
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
if (_ma_fetch_keypage(&page, info, key->keyinfo, child_page,
PAGECACHE_LOCK_LEFT_UNLOCKED,
DFLT_INIT_HITS, info->buff, 0))
merging MyISAM changes into Maria (not done in 5.1->maria merge of Jul 7th). "maria.test" and "ps_maria.test" still fail; "ma_test_all" starts failing (MyISAM has the same issue see BUG#30094). include/maria.h: merging MyISAM changes into Maria mysys/mf_keycache.c: mi_test_all showed "floating point exception", this was already fixed in the latest 5.1, importing fix. sql/item_xmlfunc.cc: compiler warning (already fixed in latest 5.1) storage/maria/ha_maria.cc: merging MyISAM changes into Maria. See #ifdef ASK_MONTY. storage/maria/ha_maria.h: merging MyISAM changes into Maria storage/maria/ma_cache.c: merging MyISAM changes into Maria storage/maria/ma_check.c: merging MyISAM changes into Maria storage/maria/ma_create.c: merging MyISAM changes into Maria storage/maria/ma_dynrec.c: merging MyISAM changes into Maria storage/maria/ma_extra.c: merging MyISAM changes into Maria storage/maria/ma_ft_boolean_search.c: merging MyISAM changes into Maria storage/maria/ma_ft_nlq_search.c: merging MyISAM changes into Maria storage/maria/ma_info.c: merging MyISAM changes into Maria storage/maria/ma_key.c: merging MyISAM changes into Maria storage/maria/ma_loghandler.c: compiler warning (part->length is size_t) storage/maria/ma_open.c: merging MyISAM changes into Maria storage/maria/ma_preload.c: merging MyISAM changes into Maria storage/maria/ma_range.c: merging MyISAM changes into Maria storage/maria/ma_rkey.c: merging MyISAM changes into Maria storage/maria/ma_rt_index.c: merging MyISAM changes into Maria storage/maria/ma_rt_key.c: merging MyISAM changes into Maria storage/maria/ma_rt_split.c: merging MyISAM changes into Maria storage/maria/ma_search.c: merging MyISAM changes into Maria storage/maria/ma_sort.c: merging MyISAM changes into Maria storage/maria/maria_def.h: merging MyISAM changes into Maria
2007-07-27 12:06:39 +02:00
DBUG_RETURN(-1);
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
Added MARIA_PAGE structure to keep all information about a maria key page. This allowed me to remove a lot of parameters to functions, local variables, duplicate code and identical constructs. It should also make the code easier to read. Changed all marking of page as changed to use offset instead of pointers; This removed one theoretical problem where dynamic_array may have been moved between two calls. In addition I changed some functions from return my_bool include/maria.h: Changes to use MARIA_PAGE storage/maria/ma_check.c: Changes to use MARIA_PAGE Folded lines longer > 79 characters storage/maria/ma_delete.c: Changes to use MARIA_PAGE Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error storage/maria/ma_ft_update.c: Fix needed as _ma_ck_delete() now returns my_bool New parameter for ma_write_keypage. storage/maria/ma_key_recover.c: Changes to use MARIA_PAGE storage/maria/ma_key_recover.h: Updated function prototypes storage/maria/ma_page.c: Changes to use MARIA_PAGE Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively storage/maria/ma_range.c: Changes to use MARIA_PAGE storage/maria/ma_rt_index.c: Changes to use MARIA_PAGE Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool Removed one 'if (node_flag) as this was always true Changed lable 'err1' to 'err' as there was no other error lables Moved allocation of page_buff outside of loop for fewer alloc/free calls Changed n_pages and m_pages to uint as 65000 pages is more than enough storage/maria/ma_rt_index.h: Updated function prototypes storage/maria/ma_rt_key.c: Changes to use MARIA_PAGE storage/maria/ma_rt_key.h: Updated function prototypes storage/maria/ma_rt_mbr.c: Changes to use MARIA_PAGE storage/maria/ma_rt_mbr.h: Updated function prototypes storage/maria/ma_rt_split.c: Changes to use MARIA_PAGE storage/maria/ma_search.c: Changes to use MARIA_PAGE storage/maria/ma_write.c: Changes to use MARIA_PAGE Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool Don't set *root to HA_OFFSET_ERROR in case of error Removed maria_print_error() calls as caller will do this Simplified logic in balance_page by introducing pointers to left and right pages storage/maria/maria_chk.c: Changes to use MARIA_PAGE storage/maria/maria_def.h: Changes to use MARIA_PAGE Removed some not used macros Added macros for MARIA_PAGE handling
2008-09-01 19:31:40 +02:00
DBUG_RETURN(maria_rtree_page_mbr(key->keyinfo->seg,
&page, key->data, key->data_length));
Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 15:45:10 +02:00
}
#endif /*HAVE_RTREE_KEYS*/