summaryrefslogtreecommitdiff
path: root/include/myisamchk.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\
| | * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-1/+1
|\ \ \ | |/ /
| * | Correct FSF addressiangilfillan2017-03-101-1/+1
| | |
* | | Fix many -Wconversion warnings.Marko Mäkelä2017-03-071-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
* | | MDEV-5800 MyISAM support for indexed vcolsSergei Golubchik2016-12-121-0/+3
| | | | | | | | | | | | | | | | | | | | | * don't issue an error for ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN * support keyread on vcols * callback into the server to compute vcol values from mi_check/mi_repair * DMLs just work. Automatically.
* | | cleanup: minor issues in MyISAMSergei Golubchik2016-12-121-8/+0
|/ /
* | Merge branch '5.5' into 10.0Sergei Golubchik2015-05-041-0/+1
|\ \ | |/
| * MDEV-6916 REPAIR VIEW / mysql migrationOleksandr Byelkin2015-04-121-0/+1
| | | | | | | | from: r4407
* | 5.5 mergeSergei Golubchik2014-02-011-42/+0
|\ \ | |/
| * MySQL-5.5.35 mergeSergei Golubchik2014-01-221-39/+0
| |
* | 5.5 mergeSergei Golubchik2013-06-061-10/+10
|\ \ | |/
| * Fixed MDEV-4291: Assertion `trid >= info->s->state.create_trid' failure or ↵Michael Widenius2013-05-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data corruption (key points to record outside datafile) on INSERT into an Aria table. The isssue was that the check if a table was moved between systems didn't take into account that create_trid could be bigger than the current max trid on the new system. This could only happen if one tried to move a table that one had just done a 'REPAIR TABLE' on. Tables that one had run 'aria_chk --zerofill' on worked. Fixed this by assuming that if create_trid is too big then the table has been moved from one system to another and we have to do an automatic zerofill. Other fixed: - Added a check to detect a wrong create_trid in 'check table'. - aria_chk -dvv will now write out also the create_trid (to make future error finding easier) - aria_chk --zerofill doesn't anymore require a aria_control_file - Removed some warnings from safemalloc when using aria_chk, ma_test1 and ma_test2. include/myisamchk.h: Removed wrong 'QQ' flags (the flags are used by myisamchk and aria_chk) storage/maria/ha_maria.cc: maria_chk_status() can now also return an error. storage/maria/ma_check.c: In maria_chk_status() check if create_trid value is too big. storage/maria/ma_open.c: Changed check if table is moved so that we can detect wrong create_trid values. Don't set STATE_NOT_MOVABLE flag if we are doing repair/check. This was done so that aria_chk can print out the movable flag. storage/maria/ma_test1.c: Added code to suppress memory leaks from safemalloc storage/maria/ma_test2.c: Added code to suppress memory leaks from safemalloc storage/maria/maria_chk.c: Added code to suppress memory leaks from safemalloc. Make help text a bit better for --HELP and --zerofill. Incresed version number. Don't require a control file if we are only doing --zerofill Print out 'create_trid' when doing --describe --verbose storage/maria/unittest/ma_test_recovery.expected: Updated result file
* | Added some fixes that should make MyISAM & Aria REPAIR work with more than ↵Michael Widenius2013-05-101-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4G records - If one specifies --force twice to myisamchk and aria_chk, then we will try to finnish the repair even if sort_buffer would be too small. This was done by dynamically allocate buffer handler objects as long as memory lasts. - New option for myisamchk and aria_chk: create-missing-keys - Changed default size of myisam_sort_buffer_size from 8M to 128M. - Changed default size of sort_buffer_size in aria_chk from 128M to 256M. - Increased information in error message about 'sort_buffer_size' beeing to small. - Print also to 'show warnings' if repair was retried. - Increased size of internal sort-buffer-readers from 16K to 128K - Changed printing of 'number of records' to use %ll instead of casting to long - Changed buffer sizes for myisam and aria to use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines. include/my_global.h: Added MY_ALIGN_DOWN() to get previous alignment (for big memory areas) include/myisam.h: Increased size of types to be able to handle more records include/myisamchk.h: Increased size of types to be able to handle more records Added T_FORCE_SORT_MEMORY to force repair to work even if sort_buffer would not be big enough mysql-test/r/myisam.result: Updated result mysql-test/r/mysqld--help.result: Updated result mysql-test/r/repair.result: Updated result mysql-test/suite/maria/maria.result: Added test cases for some fixed bugs in MyISAM to verify that Aria doesn't have them too. mysql-test/suite/maria/maria.test: Added test cases for some fixed bugs in MyISAM to verify that Aria doesn't have them too. mysql-test/suite/maria/maria3.result: Updated result after sort buffer size increase mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result: Updated result after sort buffer size increase mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result: Updated result after sort buffer size increase mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test: Updated result after sort buffer size increase mysql-test/t/myisam.test: Fixed error messages to not print system specific data mysql-test/t/repair.test: Fixed error messages to not print system specific data storage/maria/ha_maria.cc: Print also to 'show warnings' if repair was retried Changed default size of sort_buffer_size from 128M to 256M (same as in mysqld) storage/maria/ma_check.c: Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT storage/maria/ma_sort.c: Increased size of internal sort-buffer-readers from 16K to 128K Increased size of types to be able to handle more records Added support for T_FORCE_SORT_MEMORY Don't allocate too many extra BUFFPEK at a time (they are probably not needed) Improved error message for "sort_buffer_size is too small" Changed printing of 'number of records' to use %ll instead of casting to long Fixed bug where maria_update_key_parts() was called too early. Fixed bug in detecting result from read_to_buffer(). Added 'out of memory' checking when calling 'alloc_dynamic()'. storage/maria/maria_chk.c: Added --create-missing-keys If one specifies --force twice then we will try to finnish the repair even if sort_buffer would be too small. check_param.sort_buffer_length varialble was used with wrong type. storage/maria/maria_def.h: Increased size of types to be able to handle more records Use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT storage/maria/maria_ftdump.c: Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT storage/maria/maria_read_log.c: Use PAGE_BUFFER_INIT for page cache storage/myisam/ha_myisam.cc: Changed default size of myisam_sort_buffer_size from 8M to 128M storage/myisam/mi_check.c: Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/myisam_ftdump.c: Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/myisamchk.c: Added --create-missing-keys If one specifies --force twice then we will try to finnish the repair even if sort_buffer would be too small. check_param.sort_buffer_length varialble was used with wrong type. Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/myisamdef.h: Increased SORT_BUFFER_INIT to 64M (speeds up repair a lot and most machines have nowadays a lot of memory) Use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT storage/myisam/sort.c: Increased size of internal sort-buffer-readers from 16K to 128K Increased size of types to be able to handle more records Added support for T_FORCE_SORT_MEMORY Don't allocate too many extra BUFFPEK at a time (they are probably not needed) Improved error message for "sort_buffer_size is too small" Changed printing of 'number of records' to use %ll instead of casting to long Fixed bug in detecting result from read_to_buffer(). Added 'out of memory' checking when calling 'alloc_dynamic()'.
* | 5.5 mergeSergei Golubchik2013-03-271-2/+2
|\ \ | |/
| * MDEV-4186 Test case main.myisampack fails on ppc32 (only)Sergei Golubchik2013-03-081-2/+2
| | | | | | | | | | | | fix the declaration to use the correct type for st_handler_check_param::sort_buffer_length. remove redundant casts.
* | MDEV-4011 Added per thread memory counting and usageMichael Widenius2013-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Base code and idea from a patch from by plinux at Taobao. The idea is that we mark all memory that are thread specific with MY_THREAD_SPECIFIC. Memory counting is done per thread in the my_malloc_size_cb_func callback function from my_malloc(). There are plenty of new asserts to ensure that for a debug server the counting is correct. Information_schema.processlist gets two new columns: MEMORY_USED and EXAMINED_ROWS. - The later is there mainly to show how query is progressing. The following changes in interfaces was needed to get this to work: - init_alloc_root() amd init_sql_alloc() has extra option so that one can mark memory with MY_THREAD_SPECIFIC - One now have to use alloc_root_set_min_malloc() to set min memory to be allocated by alloc_root() - my_init_dynamic_array() has extra option so that one can mark memory with MY_THREAD_SPECIFIC - my_net_init() has extra option so that one can mark memory with MY_THREAD_SPECIFIC - Added flag for hash_init() so that one can mark hash table to be thread specific. - Added flags to init_tree() so that one can mark tree to be thread specific. - Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG. - Added flag to Warning_info::Warning_info() if the structure should be fully initialized. - String elements can now be marked as thread specific. - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC. - Changed type of myf from int to ulong, as this is always a set of bit flags. Other things: - Removed calls to net_end() and thd->cleanup() as these are now done in ~THD() - We now also show EXAMINED_ROWS in SHOW PROCESSLIST - Added new variable 'memory_used' - Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory. - Removed calls to the obsoleted function init_dynamic_array() - Use set_current_thd() instead of my_pthread_setspecific_ptr(THR_THD,...) client/completion_hash.cc: Updated call to init_alloc_root() client/mysql.cc: Updated call to init_alloc_root() client/mysqlbinlog.cc: init_dynamic_array() -> my_init_dynamic_array() Updated call to init_alloc_root() client/mysqlcheck.c: Updated call to my_init_dynamic_array() client/mysqldump.c: Updated call to init_alloc_root() client/mysqltest.cc: Updated call to init_alloc_root() Updated call to my_init_dynamic_array() Fixed compiler warnings extra/comp_err.c: Updated call to my_init_dynamic_array() extra/resolve_stack_dump.c: Updated call to my_init_dynamic_array() include/hash.h: Added HASH_THREAD_SPECIFIC include/heap.h: Added flag is internal temporary table. include/my_dir.h: Safety fix: Ensure that MY_DONT_SORT and MY_WANT_STAT don't interfer with other mysys flags include/my_global.h: Changed type of myf from int to ulong, as this is always a set of bit flags. include/my_sys.h: Added MY_THREAD_SPECIFIC and MY_THREAD_MOVE Added malloc_flags to DYNAMIC_ARRAY Added extra mysys flag argument to my_init_dynamic_array() Removed deprecated functions init_dynamic_array() and my_init_dynamic_array.._ci Updated paramaters for init_alloc_root() include/my_tree.h: Added my_flags to allow one to use MY_THREAD_SPECIFIC with hash tables. Removed with_delete. One should now instead use MY_TREE_WITH_DELETE_FLAG Updated parameters to init_tree() include/myisamchk.h: Added malloc_flags to allow one to use MY_THREAD_SPECIFIC for checks. include/mysql.h: Added MYSQL_THREAD_SPECIFIC_MALLOC Used 'unused1' to mark memory as thread specific. include/mysql.h.pp: Updated file include/mysql_com.h: Used 'unused1' to mark memory as thread specific. Updated parameters for my_net_init() libmysql/libmysql.c: Updated call to init_alloc_root() to mark memory thread specific. libmysqld/emb_qcache.cc: Updated call to init_alloc_root() libmysqld/lib_sql.cc: Updated call to init_alloc_root() mysql-test/r/create.result: Updated results mysql-test/r/user_var.result: Updated results mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Update to handle new format of SHOW PROCESSLIST mysql-test/suite/funcs_1/datadict/processlist_val.inc: Update to handle new format of SHOW PROCESSLIST mysql-test/suite/funcs_1/r/is_columns_is.result: Update to handle new format of SHOW PROCESSLIST mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Updated results mysql-test/t/show_explain.test: Fixed usage of debug variable so that one can run test with --debug mysql-test/t/user_var.test: Added test of memory_usage variable. mysys/array.c: Added extra my_flags option to init_dynamic_array() and init_dynamic_array2() so that one can mark memory with MY_THREAD_SPECIFIC All allocated memory is marked with the given my_flags. Removed obsolete function init_dynamic_array() mysys/default.c: Updated call to init_alloc_root() Updated call to my_init_dynamic_array() mysys/hash.c: Updated call to my_init_dynamic_array_ci(). Allocated memory is marked with MY_THREAD_SPECIFIC if HASH_THREAD_SPECIFIC is used. mysys/ma_dyncol.c: init_dynamic_array() -> my_init_dynamic_array() Added #if to get rid of compiler warnings mysys/mf_tempdir.c: Updated call to my_init_dynamic_array() mysys/my_alloc.c: Added extra parameter to init_alloc_root() so that one can mark memory with MY_THREAD_SPECIFIC Extend MEM_ROOT with a flag if memory is thread specific. This is stored in block_size, to keep the size of the MEM_ROOT object identical as before. Allocated memory is marked with MY_THREAD_SPECIFIC if used with init_alloc_root() mysys/my_chmod.c: Updated DBUG_PRINT because of change of myf type mysys/my_chsize.c: Updated DBUG_PRINT because of change of myf type mysys/my_copy.c: Updated DBUG_PRINT because of change of myf type mysys/my_create.c: Updated DBUG_PRINT because of change of myf type mysys/my_delete.c: Updated DBUG_PRINT because of change of myf type mysys/my_error.c: Updated DBUG_PRINT because of change of myf type mysys/my_fopen.c: Updated DBUG_PRINT because of change of myf type mysys/my_fstream.c: Updated DBUG_PRINT because of change of myf type mysys/my_getwd.c: Updated DBUG_PRINT because of change of myf type mysys/my_lib.c: Updated call to init_alloc_root() Updated call to my_init_dynamic_array() Updated DBUG_PRINT because of change of myf type mysys/my_lock.c: Updated DBUG_PRINT because of change of myf type mysys/my_malloc.c: Store at start of each allocated memory block the size of the block and if the block is thread specific. Call malloc_size_cb_func, if set, with the memory allocated/freed. Updated DBUG_PRINT because of change of myf type mysys/my_open.c: Updated DBUG_PRINT because of change of myf type mysys/my_pread.c: Updated DBUG_PRINT because of change of myf type mysys/my_read.c: Updated DBUG_PRINT because of change of myf type mysys/my_redel.c: Updated DBUG_PRINT because of change of myf type mysys/my_rename.c: Updated DBUG_PRINT because of change of myf type mysys/my_seek.c: Updated DBUG_PRINT because of change of myf type mysys/my_sync.c: Updated DBUG_PRINT because of change of myf type mysys/my_thr_init.c: Ensure that one can call my_thread_dbug_id() even if thread is not properly initialized. mysys/my_write.c: Updated DBUG_PRINT because of change of myf type mysys/mysys_priv.h: Updated parameters to sf_malloc and sf_realloc() mysys/safemalloc.c: Added checking that for memory marked with MY_THREAD_SPECIFIC that it's the same thread that is allocation and freeing the memory. Added sf_malloc_dbug_id() to allow MariaDB to specify which THD is handling the memory. Added my_flags arguments to sf_malloc() and sf_realloc() to be able to mark memory with MY_THREAD_SPECIFIC. Added sf_report_leaked_memory() to get list of memory not freed by a thread. mysys/tree.c: Added flags to init_tree() so that one can mark tree to be thread specific. Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG. Updated call to init_alloc_root() All allocated memory is marked with the given malloc flags mysys/waiting_threads.c: Updated call to my_init_dynamic_array() sql-common/client.c: Updated call to init_alloc_root() and my_net_init() to mark memory thread specific. Updated call to my_init_dynamic_array(). Added MYSQL_THREAD_SPECIFIC_MALLOC so that client can mark memory as MY_THREAD_SPECIFIC. sql-common/client_plugin.c: Updated call to init_alloc_root() sql/debug_sync.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/event_scheduler.cc: Removed calls to net_end() as this is now done in ~THD() Call set_current_thd() to ensure that memory is assigned to right thread. sql/events.cc: my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/filesort.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/filesort_utils.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/ha_ndbcluster.cc: Updated call to init_alloc_root() Updated call to my_net_init() Removed calls to net_end() and thd->cleanup() as these are now done in ~THD() sql/ha_ndbcluster_binlog.cc: Updated call to my_net_init() Updated call to init_sql_alloc() Removed calls to net_end() and thd->cleanup() as these are now done in ~THD() sql/ha_partition.cc: Updated call to init_alloc_root() sql/handler.cc: Added MY_THREAD_SPECIFIC to allocated memory. Added missing call to my_dir_end() sql/item_func.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/item_subselect.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/item_sum.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/log.cc: More DBUG Updated call to init_alloc_root() sql/mdl.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/mysqld.cc: Added total_memory_used Updated call to init_alloc_root() Move mysql_cond_broadcast() before my_thread_end() Added mariadb_dbug_id() to count memory per THD instead of per thread. Added my_malloc_size_cb_func() callback function for my_malloc() to count memory. Move initialization of mysqld_server_started and mysqld_server_initialized earlier. Updated call to my_init_dynamic_array(). Updated call to my_net_init(). Call my_pthread_setspecific_ptr(THR_THD,...) to ensure that memory is assigned to right thread. Added status variable 'memory_used'. Updated call to init_alloc_root() my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/mysqld.h: Added set_current_thd() sql/net_serv.cc: Added new parameter to my_net_init() so that one can mark memory with MY_THREAD_SPECIFIC. Store in net->thread_specific_malloc if memory is thread specific. Mark memory to be thread specific if requested. sql/opt_range.cc: Updated call to my_init_dynamic_array() Updated call to init_sql_alloc() Added MY_THREAD_SPECIFIC to allocated memory. sql/opt_subselect.cc: Updated call to init_sql_alloc() to mark memory thread specific. sql/protocol.cc: Fixed compiler warning sql/records.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/rpl_filter.cc: Updated call to my_init_dynamic_array() sql/rpl_handler.cc: Updated call to my_init_dynamic_array2() sql/rpl_handler.h: Updated call to init_sql_alloc() sql/rpl_mi.cc: Updated call to my_init_dynamic_array() sql/rpl_tblmap.cc: Updated call to init_alloc_root() sql/rpl_utility.cc: Updated call to my_init_dynamic_array() sql/slave.cc: Initialize things properly before calling functions that allocate memory. Removed calls to net_end() as this is now done in ~THD() sql/sp_head.cc: Updated call to init_sql_alloc() Updated call to my_init_dynamic_array() Added parameter to warning_info() that it should be fully initialized. sql/sp_pcontext.cc: Updated call to my_init_dynamic_array() sql/sql_acl.cc: Updated call to init_sql_alloc() Updated call to my_init_dynamic_array() my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_admin.cc: Added parameter to warning_info() that it should be fully initialized. sql/sql_analyse.h: Updated call to init_tree() to mark memory thread specific. sql/sql_array.h: Updated call to my_init_dynamic_array() to mark memory thread specific. sql/sql_audit.cc: Updated call to my_init_dynamic_array() sql/sql_base.cc: Updated call to init_sql_alloc() my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_cache.cc: Updated comment sql/sql_class.cc: Added parameter to warning_info() that not initialize it until THD is fully created. Updated call to init_sql_alloc() Mark THD::user_vars has to be thread specific. Updated call to my_init_dynamic_array() Ensure that memory allocated by THD is assigned to the THD. More DBUG Always acll net_end() in ~THD() Assert that all memory signed to this THD is really deleted at ~THD. Fixed set_status_var_init() to not reset memory_used. my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_class.h: Added MY_THREAD_SPECIFIC to allocated memory. Added malloc_size to THD to record allocated memory per THD. sql/sql_delete.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/sql_error.cc: Added 'initialize' parameter to Warning_info() to say if should allocate memory for it's structures. This is used by THD::THD() to not allocate memory until THD is ready. Added Warning_info::free_memory() sql/sql_error.h: Updated Warning_info() class. sql/sql_handler.cc: Updated call to init_alloc_root() to mark memory thread specific. sql/sql_insert.cc: More DBUG sql/sql_join_cache.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/sql_lex.cc: Updated call to my_init_dynamic_array() sql/sql_lex.h: Updated call to my_init_dynamic_array() sql/sql_load.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/sql_parse.cc: Removed calls to net_end() and thd->cleanup() as these are now done in ~THD() Ensure that examined_row_count() is reset before query. Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory. my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() Don't restore thd->status_var.memory_used when restoring thd->status_var sql/sql_plugin.cc: Updated call to init_alloc_root() Updated call to my_init_dynamic_array() Don't allocate THD on the stack, as this causes problems with valgrind when doing thd memory counting. my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_prepare.cc: Added parameter to warning_info() that it should be fully initialized. Updated call to init_sql_alloc() to mark memory thread specific. sql/sql_reload.cc: my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_select.cc: Updated call to my_init_dynamic_array() and init_sql_alloc() to mark memory thread specific. Added MY_THREAD_SPECIFIC to allocated memory. More DBUG sql/sql_servers.cc: Updated call to init_sql_alloc() to mark memory some memory thread specific. my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_show.cc: Updated call to my_init_dynamic_array() Mark my_dir() memory thread specific. Use my_pthread_setspecific_ptr(THR_THD,...) to mark that allocated memory should be allocated to calling thread. More DBUG. Added malloc_size and examined_row_count to SHOW PROCESSLIST. Added MY_THREAD_SPECIFIC to allocated memory. Updated call to init_sql_alloc() Added parameter to warning_info() that it should be fully initialized. sql/sql_statistics.cc: Fixed compiler warning sql/sql_string.cc: String elements can now be marked as thread specific. sql/sql_string.h: String elements can now be marked as thread specific. sql/sql_table.cc: Updated call to init_sql_alloc() and my_malloc() to mark memory thread specific my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() Fixed compiler warning sql/sql_test.cc: Updated call to my_init_dynamic_array() to mark memory thread specific. sql/sql_trigger.cc: Updated call to init_sql_alloc() sql/sql_udf.cc: Updated call to init_sql_alloc() my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/sql_update.cc: Added MY_THREAD_SPECIFIC to allocated memory. sql/table.cc: Updated call to init_sql_alloc(). Mark memory used by temporary tables, that are not for slave threads, as MY_THREAD_SPECIFIC Updated call to init_sql_alloc() sql/thr_malloc.cc: Added my_flags argument to init_sql_alloc() to be able to mark memory as MY_THREAD_SPECIFIC. sql/thr_malloc.h: Updated prototype for init_sql_alloc() sql/tztime.cc: Updated call to init_sql_alloc() Updated call to init_alloc_root() to mark memory thread specific. my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd() sql/uniques.cc: Updated calls to init_tree(), my_init_dynamic_array() and my_malloc() to mark memory thread specific. sql/unireg.cc: Added MY_THREAD_SPECIFIC to allocated memory. storage/csv/ha_tina.cc: Updated call to init_alloc_root() storage/federated/ha_federated.cc: Updated call to init_alloc_root() Updated call to my_init_dynamic_array() Ensure that memory allocated by fedarated is registered for the system, not for the thread. storage/federatedx/federatedx_io_mysql.cc: Updated call to my_init_dynamic_array() storage/federatedx/ha_federatedx.cc: Updated call to init_alloc_root() Updated call to my_init_dynamic_array() storage/heap/ha_heap.cc: Added MY_THREAD_SPECIFIC to allocated memory. storage/heap/heapdef.h: Added parameter to hp_get_new_block() to be able to do thread specific memory tagging. storage/heap/hp_block.c: Added parameter to hp_get_new_block() to be able to do thread specific memory tagging. storage/heap/hp_create.c: - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC. - Use MY_TREE_WITH_DELETE instead of removed option 'with_delete'. storage/heap/hp_open.c: Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC. storage/heap/hp_write.c: Added new parameter to hp_get_new_block() storage/maria/ma_bitmap.c: Updated call to my_init_dynamic_array() storage/maria/ma_blockrec.c: Updated call to my_init_dynamic_array() storage/maria/ma_check.c: Updated call to init_alloc_root() storage/maria/ma_ft_boolean_search.c: Updated calls to init_tree() and init_alloc_root() storage/maria/ma_ft_nlq_search.c: Updated call to init_tree() storage/maria/ma_ft_parser.c: Updated call to init_tree() Updated call to init_alloc_root() storage/maria/ma_loghandler.c: Updated call to my_init_dynamic_array() storage/maria/ma_open.c: Updated call to my_init_dynamic_array() storage/maria/ma_sort.c: Updated call to my_init_dynamic_array() storage/maria/ma_write.c: Updated calls to my_init_dynamic_array() and init_tree() storage/maria/maria_pack.c: Updated call to init_tree() storage/maria/unittest/sequence_storage.c: Updated call to my_init_dynamic_array() storage/myisam/ft_boolean_search.c: Updated call to init_tree() Updated call to init_alloc_root() storage/myisam/ft_nlq_search.c: Updated call to init_tree() storage/myisam/ft_parser.c: Updated call to init_tree() Updated call to init_alloc_root() storage/myisam/ft_stopwords.c: Updated call to init_tree() storage/myisam/mi_check.c: Updated call to init_alloc_root() storage/myisam/mi_write.c: Updated call to my_init_dynamic_array() Updated call to init_tree() storage/myisam/myisamlog.c: Updated call to init_tree() storage/myisam/myisampack.c: Updated call to init_tree() storage/myisam/sort.c: Updated call to my_init_dynamic_array() storage/myisammrg/ha_myisammrg.cc: Updated call to init_sql_alloc() storage/perfschema/pfs_check.cc: Rest current_thd storage/perfschema/pfs_instr.cc: Removed DBUG_ENTER/DBUG_VOID_RETURN as at this point my_thread_var is not allocated anymore, which can cause problems. support-files/compiler_warnings.supp: Disable compiler warning from offsetof macro.
* | The patch for the task mdev-539.Igor Babaev2012-12-201-0/+2
|/ | | | | | The patch lifts the limitation of the current implementation of ALTER TABLE that does not allow to build unique/primary indexes by sort for MyISAM and Aria engines.
* 5.3->5.5 mergeSergei Golubchik2011-11-221-1/+1
|\
| * Merge with 5.2Michael Widenius2011-09-101-1/+1
| |\
| | * Fixed that automatic killing of delayed insert thread (in flush, alter table ↵Michael Widenius2011-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | etc) will not abort auto-repair of MyISAM table. Give more information when finding an error in a MyISAM table. When killing system thread, use KILL_SYSTEM_THREAD instead of KILL_CONNECTION to make it easier to ignore the signal in sensitive context (like auto-repair) Added new kill level: KILL_SERVER that will in the future to be used to signal killed by shutdown. Add more warnings about killed connections when warning level > 3 include/myisamchk.h: Added counting of printed info/notes mysys/mf_iocache.c: Remove duplicate assignment sql/handler.cc: Added test of KILL_SERVER sql/log.cc: Ignore new 'kill' error ER_NEW_ABORTING_CONNECTION when requesting query error code. sql/mysqld.cc: Add more warnings for killed connections when warning level > 3 sql/scheduler.cc: Added checks for new kill signals sql/slave.cc: Ignore new kill signal ER_NEW_ABORTING_CONNECTION sql/sp_head.cc: Fixed assignment to bool Added testing of new kill signals sql/sql_base.cc: Use KILL_SYSTEM_THREAD to auto-kill system threads sql/sql_class.cc: Add more warnings for killed connections when warning level > 3 thd_killed() now ignores KILL_BAD_DATA and THD::KILL_SYSTEM_THREAD as these should not abort sensitive operations. sql/sql_class.h: Added KILL_SYSTEM_THREAD and KILL_SERVER sql/sql_connect.cc: Added handling of KILL_SERVER sql/sql_insert.cc: Use KILL_SYSTEM_THREAD to auto-kill system threads Added handling of KILL_SERVER sql/sql_parse.cc: Add more warnings for killed connections when warning level > 3 Added checking that thd->abort_on_warning is reset at end of query. sql/sql_show.cc: Update condition for when a query is 'killed' storage/myisam/ha_myisam.cc: Added counting of info/notes printed storage/myisam/mi_check.c: Always print an an error if we find data errors when checking/repairing a MyISAM table. When a repair was killed, don't retry repair. Added assert if sort_get_next_record() returned an error without an error message. Removed nonsence check "if (sort_param->read_cache.error < 0)" in repair. storage/myisam/myisamchk.c: Added counting of notes printed storage/pbxt/src/thread_xt.cc: Better error message.
* | | merge with 5.3Sergei Golubchik2011-10-191-1/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * | Added progress reporting for alter table, LOAD DATA INFILE and for aria ↵Michael Widenius2011-07-011-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables: check table, repair table, analyze table. - The client gets a progress report message that triggers a callback function if requested with mysql_options(MYSQL_PROGRESS_CALLBACK, function) - Added Progress field last to 'show processlist' - Stage, Max_stage and Progress field added to information_schema.progresslist - The 'mysql' client by defaults enables progress reports when the output is a tty. - Added progress_report_time time variable to configure how often progress reports is sent to client Added read only system variable 'in_transaction' which is 1 if we have executed a BEGIN statement. client/client_priv.h: Added OPT_REPORT_PROGRESS client/mysql.cc: Added option --progress-reports (on by default if not batch mode) Progress reports is written to stdout for long running commands include/Makefile.am: Added mysql/service_progress_report.h include/myisamchk.h: Added variables to be able to do progress reporting in Aria and later in MyISAM include/mysql.h: Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK include/mysql.h.pp: Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK include/mysql/plugin.h: Added functions for reporting progress. include/mysql/plugin_auth.h.pp: Added functions for reporting progress. include/mysql_com.h: Added CLIENT_PROGRESS mysql_real_connect() flag. include/sql_common.h: Added callback function for reporting progress mysql-test/r/old-mode.result: Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode. mysql-test/suite/funcs_1/datadict/datadict_priv.inc: Added new column mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Test all new PROCESSLIST columns mysql-test/suite/funcs_1/r/is_columns_is.result: Updated results mysql-test/suite/funcs_1/r/is_columns_is_embedded.result: Updated results mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result: Updated results mysql-test/suite/funcs_1/r/is_tables_is_embedded.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_ps.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_ps.result: Updated results mysql-test/suite/pbxt/r/pbxt_locking.result: Updated results mysql-test/suite/pbxt/r/skip_name_resolve.result: Updated results mysql-test/t/old-mode.test: Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode. plugin/handler_socket/handlersocket/Makefile.am: Added -lmysqlservices scripts/mytop.sh: Made 'State' field width dynamic. Added 'Progress' to process list display. sql-common/client.c: Added handling of progress messages. Removed check_license() function. sql/mysql_priv.h: Added opt_progress_report_time sql/mysqld.cc: Added progress_report_time time variable to configure how often progress reports is sent to client sql/protocol.cc: Added net_send_progress_packet() sql/protocol.h: New prototypes sql/set_var.cc: Added variables progress_report_time and in_transaction sql/sql_acl.cc: Safety fix: Made client_capabilities ulonglong sql/sql_class.cc: Added interface functions for progress reporting sql/sql_class.h: Added varibles in THD for progress reporting. Added CF_REPORT_PROGRESS sql/sql_load.cc: Added progress reporting for LOAD DATA INFILE sql/sql_parse.cc: Added CF_REPORT_PROGRESS for top level commands for which it's safe to send progress reports to client sql/sql_show.cc: Added Progress field last to 'show processlist' Stage, Max_stage and Progress field added to information_schema.progresslist sql/sql_table.cc: Added progress reporting for ALTER TABLE Added THD as argument to copy_data_between_tables() storage/maria/ha_maria.cc: Added progress reporting for check table, repair table, analyze table Fixed a bug in start_bulk_insert() that caused alter table to always run with all keys enabled. storage/maria/ma_check.c: Added progress reporting Remember old state before starting repair. This removes some warnings from optimize_table if create-with-sort fails. storage/maria/ma_check_standalone.h: Added dummy reporting function for standalone Aria programs. storage/maria/ma_sort.c: Added progress reporting storage/maria/maria_chk.c: Updated version storage/maria/maria_def.h: Added new prototypes tests/mysql_client_test.c: Added test case for progress reporting
| * Added option BACKUP_ALL to mysqld --myisam-recover to also get a backup of ↵Michael Widenius2010-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the index file before it's repaired. Removed wrong call to translog_buffer_unlock() that caused 'unlocking not locked mutex' failure in Aria log handler. extra/replace.c: Updated call to my_redel() include/maria.h: Updated prototype for maria_change_to_newfile include/my_sys.h: Updated prototypes Added my_create_backup_name include/myisam.h: Updated prototypes include/myisamchk.h: Added 'backup_time' to st_handler_check_param to be able to generate same name for backuped data and index file mysys/my_redel.c: Added time_t option to my_redel() to be able to generate same backup extensions for many files sql/handler.cc: Added start_time to st_ha_check_opt sql/handler.h: Added start_time to HA_CHECK_OPT sql/mysqld.cc: Added option BACKUP_ALL to --myisam-recover storage/maria/ha_maria.cc: Remember start time for repair storage/maria/ma_check.c: Use remembered start time for backup file names Removed some dead code storage/maria/ma_loghandler.c: Removed wrong call to translog_buffer_unlock() that caused 'unlocking not locked mutex' failure in log handler. storage/maria/maria_chk.c: Removed dead code (O_NEW_INDEX was never set) Report if table was 'crashed on repair' storage/maria/maria_pack.c: Updated parameters to my_redel() storage/myisam/ha_myisam.cc: Added recover option BACKUP_ALL to get a backup of the index file before it's repaired. Print information to log if we make a backup of data as part of repair. storage/myisam/ha_myisam.h: Added HA_RECOVER_FULL_BACKUP storage/myisam/mi_check.c: Use remembered start time for backup file names Added mi_make_backup_of_index() storage/myisam/myisamchk.c: Removed dead code (O_NEW_INDEX was never set) Report if table was 'crashed on repair' storage/myisam/myisampack.c: Updated call to my_redel()
* | 5.5-mergeSergei Golubchik2011-07-021-2/+0
| |
* | lots of post-merge changesSergei Golubchik2011-04-251-1/+1
| |
* | merge.Sergei Golubchik2010-11-251-1/+1
|/ | | | | | checkpoint. does not compile.
* Merge with MySQL 5.1, with following additions:unknown2009-11-161-0/+4
| | | | | | | | | | | | | | | - Moved some code from innodb_plugin to xtradb, to ensure that all tests runs - Did changes in pbxt and maria storage engines becasue of changes in thd->query - Reverted wrong code in sql_table.cc for how ROW_FORMAT is used. This is a re-commit of Monty's merge to eliminate an extra commit from MySQL-5.1.42 that was accidentally included in the merge. This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In case there are any extra changes done before final MySQL 5.1.41 release, these will need to be merged later before MariaDB 5.1.41 release.
* Merge MySQL->MariaDBSergey Petrunya2009-09-081-2/+2
| | | | | | | * Finished Monty and Jani's merge * Some InnoDB tests still fail (because it's old xtradb code run against newer testsuite). They are expected to go after mergning with the latest xtradb.
* Added versioning of row dataunknown2008-04-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will in future changeset (soon) av versioning of status variables (number of rows) and index Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings Removed some not needed variables (as noticed by Guilhem) include/maria.h: Added prototypes for maria_chk_init_for_check(), maria_versioning() and maria_ignore_trids() include/my_base.h: Add new error HA_ERR_ROW_NOT_VISIBLE include/myisamchk.h: Added variables for checking visibility of rows during maria_chk include/thr_lock.h: Changed argument type from int to my_bool for get_status Added variable allow_multiple_concurrent_insert, to signal if table supports multiple concurrent inserts mysql-test/r/maria-page-checksum.result: Added missing drop table mysql-test/t/maria-page-checksum.test: Added missing drop table mysys/my_handler.c: Added new error messages mysys/thr_lock.c: Added support for multiple concurrent inserts, if table handler supports it sql/sql_yacc.yy: Added LOCK TABLE table_name WRITE CONCURRENT This was added (temporarly?) to be able to check versioning with Maria storage/csv/ha_tina.cc: Updated parameter for get_status storage/maria/ha_maria.cc: Added calls to maria_chk_init_status() Fixed call to ma_control_file_open() storage/maria/ma_blockrec.c: Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings Changed back some 'header' parameters to const char* Removed some casts Added support for versioning: - If info->row_flag & ROW_FLAG_TRANSID is set, store transaction id together with the row - When reading rows, check if rows are visible. Give error if not - When scanning table, ignore not visible rows - Added function parameters to some functions, to be able to call _ma_compact_block_page() with different parameters depending of if the page is a HEAD or TAIL page - _ma_compact_block_page() deletes transaction id's that are visible by all running transactions - Added functions for thr_lock() to enable multiple concurrent inserts - Added helper function 'mysql_versioning()' to enable/disable versioning - Added helper function maria_ignore_trids(), used by maria_chk and maria_pack to see all rows. storage/maria/ma_blockrec.h: Updated parameters for some functions. Added new functions to read/store state with thr_lock storage/maria/ma_check.c: Enable handling of transaction id's in rows Give a readable error if a table contains a transation id that makes rows not visible storage/maria/ma_control_file.c: Added option to not give warning if control file doesn't exists. storage/maria/ma_control_file.h: Updated parameter lists for ma_control_file_open() storage/maria/ma_delete.c: Removed not used variable (suggestion by Guilhem) storage/maria/ma_locking.c: Changed type of argument from int -> my_bool storage/maria/ma_open.c: Removed not used variables 'key_write_undo_lsn' and 'key_delete_undo_lsn' Added new thr_lock interface functions for BLOCK_RECORD to enable multiple concurrent insert storage/maria/ma_test1.c: Added option --versioning (-C) to check versioning storage/maria/ma_test2.c: Added option -C to check versioning storage/maria/ma_test_recovery: Forward argumetns to ma_test_recovery.pl storage/maria/ma_write.c: Removed not used variable key_write_undo_lsn storage/maria/maria_chk.c: Always read control file (if exist) at start Initialize checking of tables by calling maria_chk_init_for_check() In verbose mode and in case of error, print max found transaction id storage/maria/maria_def.h: Added Trid to MARIA_ROW to be able to check transaction id for found row Moved 'base_length' from MARIA_ROW to MARIA_HA to be able to handle different base length (with and without TRANSID) without if's Added default row_flag to MARIA_HA for the same reason Changed LEX_STRING -> LEX_CUSTRING to avoid casts in ma_blockrec.c Removed not needed variables key_write_undo_lsn and key_delete_undo_lsn Added prototypes for new functions and fixed those that had changed storage/maria/maria_pack.c: Ensure we can read all rows from the file, independent of the used transaction id storage/maria/maria_read_log.c: Updated arguments to ma_control_file_open() storage/maria/trnman.c: If we have only one transaction, fixed that min_read_from contains current transaction Fixed that trnman_can_read_from() returns that row is readable if it was written by current transaction storage/maria/unittest/ma_control_file-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_all-t: Added test of versioning Removed printing of one extra space storage/maria/unittest/ma_test_loghandler-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_recovery.expected: Updated file with result from new tests storage/maria/unittest/ma_test_recovery.pl: Added options --abort-on-error and --verbose In case of --verbose, print all excuted shell commands Added test of versioning storage/myisam/mi_locking.c: Updated type of parameter storage/myisam/myisamdef.h: Updated type of parameter mysql-test/r/maria-mvcc.result: New BitKeeper file ``mysql-test/r/maria-mvcc.result'' mysql-test/t/maria-mvcc.test: New BitKeeper file ``mysql-test/t/maria-mvcc.test''
* A new option for maria_chk: --zerofill-keep-lsn. This will be usedunknown2008-02-111-0/+1
| | | | | | | | | | | | | | | | | by ma_test_recovery.pl when it happens that Recovery does not recreate pages exactly as they were at first run: this option will help us verify that the differences are in unimportant page pieces (those pieces will be zeroed by --zerofill-keep-lsn, but not the important LSNs). include/myisamchk.h: new zerofill flag for maria_chk storage/maria/ma_check.c: If T_ZEROFILL_KEEP_LSN, we don't zero out LSNs of data/index pages. Then the table is not movable. We still mark it zerofilled, it helps to know what was last done to the table. storage/maria/maria_chk.c: New option --zerofill-keep-lsn
* WL#3072 - Maria Recoveryunknown2008-01-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bulk insert: don't log REDO/UNDO for rows, log one UNDO which will truncate files; this is an optimization and a bugfix (table was left half-repaired by crash). Repair: mark table crashed-on-repair at start, bump skip_redo_lsn at start, this is easier for recovery (tells it to skip old REDOs or even UNDO phase) and user (tells it to repair) in case of crash, sync files in the end. Recovery skips missing or corrupted table and moves to next record (in REDO or UNDO phase) to be more robust; warns if happens in UNDO phase. Bugfix for UNDO_KEY_DELETE_WITH_ROOT (tested in ma_test_recovery) and maria_enable_indexes(). Create missing bitmaps when needed (there can be more than one to create, in rare cases), log a record for this. include/myisamchk.h: new flag: bulk insert repair mustn't bump create_rename_lsn mysql-test/lib/mtr_report.pl: skip normal warning in maria-recovery.test mysql-test/r/maria-recovery.result: result: crash before bulk insert is committed, causes proper rollback, and crash right after OPTIMIZE replaces index file with new index file leads to table marked corrupted and recovery not failing. mysql-test/t/maria-recovery.test: - can't check the table or it would commit the transaction, but check is made after recovery. - test of crash before bulk-insert-with-repair is committed (to see if it is rolled back), and of crash after OPTIMIZE has replaced index file but not finished all operations (to see if recovery fails - it used to assert when trying to execute an old REDO on the new index). storage/maria/CMakeLists.txt: new file storage/maria/Makefile.am: new file storage/maria/ha_maria.cc: - If bulk insert on a transactional table using an index repair: table is initially empty, so don't log REDO/UNDO for data rows (optimization), just log an UNDO_BULK_INSERT_WITH_REPAIR which will, if executed, empty the data and index file. Re-enable logging in end_bulk_insert(). - write log record for repair operation only after it's fully done, index sort including (maria_repair*() used to write the log record). - Adding back file->trn=NULL which was removed by mistake earlier. storage/maria/ha_maria.h: new member (see ha_maria.cc) storage/maria/ma_bitmap.c: Functions to create missing bitmaps: - one function which creates missing bitmaps in page cache, except the missing one with max offset which it does not put into page cache as it will be modified very soon. - one function which the one above calls, and creates bitmaps in page cache - one function to execute REDO_BITMAP_NEW_PAGE which uses the second one above. storage/maria/ma_blockrec.c: - when logging REDO_DELETE_ALL, not only 'records' and 'checksum' has to be reset under log's mutex. - execution of REDO_INSERT_ROW_BLOBS now checks the dirty pages' list - execution of UNDO_BULK_INSERT_WITH_REPAIR storage/maria/ma_blockrec.h: new functions storage/maria/ma_check.c: - table-flush-before-repair is moved to a separate function reused by maria_sort_index(); syncing is added - maria_repair() is allowed to re-enable logging only if it is the one which disabled it. - "_ma_flush_table_files_after_repair" was a bad name, it's not after repair now, and it should not sync as we do more changes to the files shortly after (sync is postponed to when writing the log record) - REDO_REPAIR record should be written only after all repair operations (in particular after sorting index in ha_mara::repair()) - close to the end of repair by sort, flushing of pages must happen also in the non-quick case, to prepare for the sync at end. - in parallel repair, some page flushes are not needed as done by initialize_variables_for_repair(). storage/maria/ma_create.c: Update skip_redo_lsn, create_rename_lsn optionally. storage/maria/ma_delete_all.c: Need to sync files at end of maria_delete_all_rows(), if transactional. storage/maria/ma_extra.c: During repair, we sometimes call _ma_flush_table_files() (via _ma_flush_table_files_before_swap()) while there is a WRITE_CACHE. storage/maria/ma_key_recover.c: - when we see CLR_END for UNDO_BULK_INSERT_WITH_REPAIR, re-enable indices. - fixing bug: _ma_apply_undo_key_delete() parsed UNDO_KEY_DELETE_WITH_ROOT wrongly, leading to recovery failure storage/maria/ma_key_recover.h: new prototype storage/maria/ma_locking.c: DBUG_VOID_RETURN missing storage/maria/ma_loghandler.c: UNDO for bulk insert with repair, and REDO for creating bitmaps. LOGREC_FIRST_FREE to not have to change the for() every time we add a new record type. storage/maria/ma_loghandler.h: new UNDO and REDO storage/maria/ma_open.c: Move share.kfile.file=kfile up a bit, so that _ma_update_state_lsns() can get its value, this fixes a bug where LSN_REPAIRED_BY_MARIA_CHK was not corrected on disk by maria_open(). Store skip_redo_lsn in index' header. maria_enable_indexes() had a bug for BLOCK_RECORD, where an empty file has one page, not 0 bytes. storage/maria/ma_recovery.c: - Skip a corrupted, missing, or repaired-with-maria_chk, table in recovery: don't fail, just go to next REDO or UNDO; but if an UNDO is skipped in UNDO phase we issue warnings. - Skip REDO|UNDO in REDO phase if <skip_redo_lsn. - If UNDO phase fails, delete transactions to not make trnman assert. - Update skip_redo_lsn when playing REDO_CREATE_TABLE - Don't record UNDOs for old transactions which we don't know (long_trid==0) - Bugfix for UNDO_KEY_DELETE_WITH_ROOT (see ma_key_recover.c) - Execution of UNDO_BULK_INSERT_WITH_REPAIR - Don't try to find a page number in REDO_DELETE_ALL - Pieces moved to ma_recovery_util.c storage/maria/ma_rename.c: name change storage/maria/ma_static.c: I modified layout of the index' header (inserted skip_redo_lsn in its middle) storage/maria/ma_test2.c: allow breaking the test towards the end, tests execution of UNDO_KEY_DELETE_WITH_ROOT storage/maria/ma_test_recovery.expected: 6 as testflag instead of 4 storage/maria/ma_test_recovery: Increase the amount of rollback work to do when testing recovery with ma_test2; this reproduces the UNDO_KEY_DELETE_WITH_ROOT bug. storage/maria/maria_chk.c: skip_redo_lsn should be updated too, for consistency. Write a REDO_REPAIR after all operations (including sort-records) have been done. No reason to flush blocks after maria_chk_data_link() and maria_sort_records(), there is maria_close() in the end. write_log_record() is a function, to not clutter maria_chk(). storage/maria/maria_def.h: New member skip_redo_lsn in the state, and comments storage/maria/maria_pack.c: skip_redo_lsn should be updated too, for consistency storage/maria/ma_recovery_util.c: _ma_redo_not_needed_for_page(), defined in ma_recovery.c, is needed by ma_blockrec.c; this causes link issues, resolved by putting _ma_redo_not_needed_for_page() into a new file (so that it is not in the same file as repair-related objects of ma_recovery.c). storage/maria/ma_recovery_util.h: new file
* Bugs fixed:unknown2008-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If not in autocommit mode, delete rows one by one so that we can roll back if necessary - bitmap->used_size was not correctly set, which caused bitmap pages to be overwritten - Fixed bug in bitmap handling when allocation tail pages - Ensure we reserve place for directory entry when calculation place for head and tail pages - Fixed wrong value in bitmap->size[0] - Fixed wrong assert in flush_log_for_bitmap - Fixed bug in _ma_bitmap_release_unused() where tail blocks could be wrongly reset - Mark new pages as changed (Required to get repair() to work) - Fixed problem with advancing log horizon pointer within one page bounds - Fixed DBUG_ASSERT() when enable_indexes failes for end_bulk_insert() - Fixed bug in logging of rows with more than one big blob - Fixed DBUG_ASSERTS() in pagecache to allow change of WRITE_LOCK to READ_LOCK in unlock() calls - Flush pagecache when we change from logging to not logging (if not, pagecache code breaks) - Ensure my_errno is set on return from write/delete/update - Fixed bug when using FIELD_SKIP_PRESPACE New features: - mysql_fix_privilege_tables now first uses binaries and scripts from source distribution, then in installed distribution - Fix that optimize works for Maria tables - maria_check --zerofill now also clear freed blob pages - maria_check -di now prints more information about record page utilization Optimizations: - Use pagecache_unlock_by_link() instead of pagecache_write() if possible. (Avoids a memory copy and a find_block) - Simplify code to abort when we found optimal bit pattern - Skip also full head page bit patterns when searching for tail - Increase default repair buffer to 128M for maria_chk and maria_read_log - Increase default sort buffer for maria_chk to 64M - Increase size of sortbuffer and pagecache for mysqld to 64M - VARCHAR/CHAR fields are stored in increasing length order for BLOCK_RECORD tables Better reporting: - Fixed test of error condition for flush (for better error code) - More error messages to mysqld if Maria recovery fails - Always print warning if rows are deleted in repair - Added global function _db_force_flush() that is usable when doing debugging in gdb - Added call to my_debug_put_break_here() in case of some errors (for debugging) - Remove used testfiles in unittest as these was written in different directories depending on from where the test was started This should fix the bugs found when importing a big table with many varchars and one/many blobs to Maria dbug/dbug.c: Added global function _db_force_flush() that is usable when doing debugging in gdbine extra/replace.c: Fixed memory leak include/my_dbug.h: Prototype for _db_force_flush() include/my_global.h: Added stdarg.h as my_sys.h now depends on it. include/my_sys.h: Make my_dbug_put_break_here() a NOP if not DBUG build Added my_printv_error() include/myisamchk.h: Added entry 'lost' to be able to count space that is lost forever mysql-test/r/maria.result: Updated results mysql-test/t/maria.test: Reset autocommit after test New test to check if delete_all_rows is used (verified with --debug) mysys/my_error.c: Added my_printv_error() scripts/mysql_fix_privilege_tables.sh: First use binaries and scripts from source distribution, then in installed distribution This ensures that a development branch doesn't pick up wrong scripts) sql/mysqld.cc: Fix that one can break maria recovery with ^C when debugging sql/sql_class.cc: Removed #ifdef that has no effect (The preceeding DBUG_ASSERT() ensures that the following code will not be exectued) storage/maria/ha_maria.cc: Increase size of sortbuffer and pagecache to 64M Fix that optimize works for Maria tables Fixed DBUG_ASSERT() when enable_indexes failes for end_bulk_insert() If not in autocommit mode, delete rows one by one so that we can roll back if necessary Fixed variable comments storage/maria/ma_bitmap.c: More ASSERTS to detect overwrite of bitmap pages bitmap->used_size was not correctly set, which caused bitmap pages to be overwritten Ensure we reserve place for directory entry when calculation place for head and tail pages bitmap->size[0] should not include space for directory entry Simplify code to abort when we found optimal bit pattern Skip also full head page bit patterns when searching for tail (should speed up some common cases) Fixed bug in allocate_tail() when block->used was not aligned on 6 bytes Fixed wrong assert in flush_log_for_bitmap Fixed bug in _ma_bitmap_release_unused() where tail blocks could be wrongly reset storage/maria/ma_blockrec.c: Ensure my_errno is set on return Fixed not optimal setting of row->min_length if we don't have variable length fields Use pagecache_unlock_by_link() instead of pagecache_write() if possible. (Avoids a memory copy and a find_block) Added DBUG_ASSERT() if we read or write wrong VARCHAR data Added DBUG_ASSERT() to find out if row sizes are calculated wrong Fixed bug in logging of rows with more than one big blob storage/maria/ma_check.c: Disable logging while normal repair is done to avoid logging of index changes Fixed bug that caused CHECKSUM part of key page to be used Fixed that deleted of wrong records also works for BLOCK_RECORD Clear unallocated pages: - BLOB pages are not automaticly cleared on delete, so we need to use the bitmap to know if page is used or not Better error reporting More information about record page utilization Change printing of file position to printing of pages to make output more readable Always print warning if rows are deleted storage/maria/ma_create.c: Calculate share.base_max_pack_length more accurately for BLOCK_RECORD pages (for future) Fixed that FIELD_SKIP_PRESPACE is recorded as FIELD_NORMAL; Fixed bug where fields could be used in wrong order Store FIELD_SKIP_ZERO fields before CHAR and VARCHAR fields (optimization) Store other fields in length order (to get better utilization of head block) storage/maria/ma_delete.c: Ensure my_errno is set on return storage/maria/ma_dynrec.c: Indentation fix storage/maria/ma_locking.c: Set changed if open_count is counted down. (To avoid getting error "client is using or hasn't closed the table properly" with transactional tables storage/maria/ma_loghandler.c: Fixed problem with advancing log horizon pointer within one page bounds (Patch from Sanja) Added more DBUG Indentation fixes storage/maria/ma_open.c: Removed wrong casts storage/maria/ma_page.c: Fixed usage of PAGECACHE_LOCK_WRITE_UNLOCK with _ma_new() Mark new pages as changed (Required to get repair() to work) storage/maria/ma_pagecache.c: Fixed test of error condition for flush Fixed problem when using PAGECACHE_LOCK_WRITE_TO_READ with unlock() Added call to my_debug_put_break_here() in case of errors (for debugging) storage/maria/ma_pagecrc.c: Ensure we get same crc for 32 and 64 bit systems by forcing argument to maria_page_crc to uint32 storage/maria/ma_recovery.c: Call my_printv_error() from eprint() to get critical errors to mysqld log Removed \n from error strings to eprint() to get nicer output in mysqld Added simple test in _ma_reenable_logging_for_table() to not do any work if not needed storage/maria/ma_update.c: Ensure my_errno is set on return storage/maria/ma_write.c: Ensure my_errno is set on return storage/maria/maria_chk.c: Use DEBUGGER_OFF if --debug is not use (to get slightly faster execution for debug binaries) Added option --skip-safemalloc Don't write exponents for rec/key storage/maria/maria_def.h: Increase default repair buffer to 128M for maria_chk and maria_read_log Increase default sort buffer for maria_chk to 64M storage/maria/unittest/Makefile.am: Don't update files automaticly from bitkeeper storage/maria/unittest/ma_pagecache_consist.c: Remove testfile at end storage/maria/unittest/ma_pagecache_single.c: Remove testfile at end storage/maria/unittest/ma_test_all-t: More tests Safer checking if test caused error
* Added maria_zerofill()unknown2007-12-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used to bzero all not used parts of the index pages and compact and bzero the not used parts of the data pages of block-record type Added --zerofill (-z) option to maria_chk (Mostly code from Jani) Added now table states ZEROFILLED and MOVEABLE Set state.changed with new states when things changes include/maria.h: Added maria_zerofill include/myisamchk.h: Added option for zerofill Extend testflag to be 64 to allow for more flags mysql-test/r/create.result: Updated results after merge mysql-test/r/maria.result: Updated results after merge mysys/my_getopt.c: Removed not used variable sql/sql_show.cc: Fixed wrong page type storage/maria/ma_blockrec.c: Renamed compact_page() to ma_compact_block_page() and made it global Always zerofill half filled blob pages Set share.state.changed on REDO storage/maria/ma_blockrec.h: Added _ma_compact_block_page() storage/maria/ma_check.c: Added maria_zerofill() This is used to bzero all not used parts of the index pages and compact and bzero the not used parts of the data pages of block-record type This gives the following benefits: - Table is smaller if compressed - All LSN are removed for transactinal tables and this makes them movable between systems Dont set table states of we are using --quick Changed log entry for repair to use 8 bytes for flag storage/maria/ma_delete.c: Simplify code Update state.changed storage/maria/ma_key_recover.c: Update state.changed storage/maria/ma_locking.c: Set uuid for file on first change if it's not set (table was cleared with zerofill) storage/maria/ma_loghandler.c: Updated log entry for REDO_REPAIR_TABLE storage/maria/ma_recovery.c: Updated log entry for REDO_REPAIR_TABLE (flag is now 8 bytes) Set new bits in state.changed storage/maria/ma_test_all.sh: Nicer output storage/maria/ma_test_recovery.expected: Updated results (now states flags are visible) storage/maria/ma_update.c: Update state.changed storage/maria/ma_write.c: Simplify code Set state.changed storage/maria/maria_chk.c: Added option --zerofill Added printing of states for MOVABLE and ZEROFILLED MYD -> MAD MYI -> MAI storage/maria/maria_def.h: Added states STATE_NOT_MOVABLE and STATE_NOT_ZEROFILLED Added prototype for new functions storage/maria/unittest/ma_test_all-t: More tests, including tests for zerofill Removed some not needed 'print' statements storage/maria/unittest/ma_test_loghandler_multithread-t.c: Smaller buffer to not trash devlopment machines totally
* Added error HA_ERR_FILE_TOO_SHORT to be used when files are shorter than ↵unknown2007-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expected (by my_read/my_pread) Added debugger hook _my_dbug_put_break_here() that is called if we get a CRC that matches --debug-crc-break (my_crc_dbug_break) Fixed REDO_REPAIR to use all repair modes (repair, repair_by_sort, repair_paralell REDO_REPAIR now also logs used key map Fixed some bugs in REDO logging of key pages Better error messages from maria_read_log Added my_readwrite_flags to init_pagecache() to be able to get better error messages and simplify code. Don't allow pagecaches with less than 8 blocks (Causes strange crashes) Added EXTRA_DEBUG_KEY_CHANGES. When this is defined some REDO_INDEX entries contains page checksums (these are calculated and checked in DBUG mode, ignored otherwise) Fixed bug in ma_pagecache unit tests that caused program to sometimes fail Added some missing calls to MY_INIT() that caused some unit tests to fail Fixed that TRUNCATE works properly on temporary MyISAM files Updates some result files to new table checksums results (checksum when NULL fields are ignored) perl test-insert can be replayed with maria_read_log! sql/share/Makefile.am: Change mode to -rw-rw-r-- BitKeeper/etc/ignore: added storage/maria/unittest/page_cache_test_file_1 storage/maria/unittest/pagecache_debug.log include/maria.h: Added maria_tmpdir include/my_base.h: Added error HA_ERR_FILE_TOO_SHORT include/my_sys.h: Added variable my_crc_dbug_check Added function my_dbug_put_break_here() include/myisamchk.h: Added org_key_map (Needed for writing REDO record for REPAIR) mysql-test/r/innodb.result: Updated to new checksum algorithm (NULL ignored) mysql-test/r/mix2_myisam.result: Updated to new checksum algorithm (NULL ignored) mysql-test/r/myisam.result: Updated to new checksum algorithm (NULL ignored) mysql-test/t/myisam.test: Added used table mysys/checksum.c: Added DBUG for checksum results Added debugger hook so that _my_dbug_put_break_here() is called if we get matching CRC mysys/lf_alloc-pin.c: Fixed compiler warning mysys/my_handler.c: Added new error message mysys/my_init.c: If my_progname is not given, use 'unknown' form my_progname_short Added debugger function my_debug_put_break_here() mysys/my_pread.c: In case of too short file when MY_NABP or MY_FNABP is specified, give error HA_ERR_FILE_TO_SHORT mysys/my_read.c: In case of too short file when MY_NABP or MY_FNABP is specified, give error HA_ERR_FILE_TO_SHORT sql/mysqld.cc: Added debug option --debug-crc-break sql/sql_parse.cc: Trivial optimization storage/maria/ha_maria.cc: Renamed variable to be more logical Ensure that param.testflag is correct when calling repair Added extra argument to init_pagecache Set default value for maria_tempdir storage/maria/ma_blockrec.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_cache.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_check.c: Set param->testflag to match how repair is run (needed for REDO logging) Simple optimization Moved flag if page is node from pagelength to keypage-flag byte Log used key map in REDO log. storage/maria/ma_delete.c: Remember previous UNDO entry when writing undo (for future CLR records) Moved flag if page is node from pagelength to keypage-flag byte Fixed some bugs in redo logging Added CRC for some translog REDO_INDEX entries storage/maria/ma_dynrec.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_ft_update.c: Fixed call to _ma_store_page_used() storage/maria/ma_key_recover.c: Added CRC for some translog REDO_INDEX entries Removed not needed pagecache_write() in _ma_apply_redo_index() storage/maria/ma_locking.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_loghandler.c: Added used key map to REDO_REPAIR_TABLE storage/maria/ma_loghandler.h: Added operation for checksum of key pages storage/maria/ma_open.c: Allocate storage for undo lsn pointers storage/maria/ma_pagecache.c: Remove not needed include file Change logging to use fd: for file descritors as other code Added my_readwrite_flags to init_pagecache() to be able to get better error messages for maria_chk/maria_read_log Don't allow pagecaches with less than 8 blocks Remove wrong DBUG_ASSERT() storage/maria/ma_pagecache.h: Added readwrite_flags storage/maria/ma_recovery.c: Better error messages for maria_read_log: - Added eprint() for printing error messages - Print extra \n before error message if we are printing %0 %10 ... Added used key_map to REDO_REPAIR log entry More DBUG Call same repair method that was used by mysqld storage/maria/ma_rt_index.c: Moved flag if page is node from pagelength to keypage-flag byte storage/maria/ma_rt_key.c: Fixed call to _ma_store_page_used() storage/maria/ma_rt_split.c: Moved flag if page is node from pagelength to keypage-flag byte storage/maria/ma_static.c: Added maria_tmpdir storage/maria/ma_test1.c: Updated call to init_pagecache() storage/maria/ma_test2.c: Updated call to init_pagecache() storage/maria/ma_test3.c: Updated call to init_pagecache() storage/maria/ma_write.c: Removed #ifdef NOT_YET Moved flag if page is node from pagelength to keypage-flag byte Fixed bug in _ma_log_del_prefix() storage/maria/maria_chk.c: Fixed wrong min limit for page_buffer_size Updated call to init_pagecache() storage/maria/maria_def.h: Added EXTRA_DEBUG_KEY_CHANGES. When this is defined some REDO_INDEX entries contains page checksums Moved flag if page is node from pagelength to keypage-flag byte storage/maria/maria_ftdump.c: Updated call to init_pagecache() storage/maria/maria_pack.c: Updated call to init_pagecache() Reset share->state.create_rename_lsn & share->state.is_of_horizon storage/maria/maria_read_log.c: Better error messages Added --tmpdir option (needed to set temporary directory for REDO_REPAIR) Added --start-from-lsn Changed option for --display-only to 'd' (wanted to use -o for 'offset') storage/maria/unittest/lockman2-t.c: Added missing call to MY_INIT() storage/maria/unittest/ma_pagecache_consist.c: Updated call to init_pagecache() storage/maria/unittest/ma_pagecache_single.c: Fixed bug that caused program to sometimes fail Added some DBUG_ASSERTS() Changed some calls to malloc()/free() to my_malloc()/my_free() Create extra file to expose original hard-to-find bug storage/maria/unittest/ma_test_loghandler-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated call to init_pagecache() storage/maria/unittest/test_file.c: Changed malloc()/free() to my_malloc()/my_free() Fixed memory leak Changd logic a bit while trying to find bug in reset_file() storage/maria/unittest/trnman-t.c: Added missing call to MY_INIT() storage/myisam/mi_cache.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/myisam/mi_create.c: Removed O_EXCL to get TRUNCATE to work for temporary files storage/myisam/mi_dynrec.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/myisam/mi_locking.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 mysql-test/r/old-mode.result: New BitKeeper file ``mysql-test/r/old-mode.result'' mysql-test/t/old-mode-master.opt: New BitKeeper file ``mysql-test/t/old-mode-master.opt'' mysql-test/t/old-mode.test: New BitKeeper file ``mysql-test/t/old-mode.test''
* Moved randomize and my_rnd under mysysunknown2007-10-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added my_uuid Added pre-support for PAGE_CHECKSUM Added syntax for CREATE ... PAGE_CHECKSUM=# TABLE_CHECKSUM=# Reserved place for page checksums on index, bitmap and block pages Added index number to header of index pages Added linked list for free directory entries (speeds up inserts with BLOCK format) Calculate checksums in original column order (fixes bug with checksum on rows with BLOCK format) Cleaned up all index handling to use 'info->s->keypage_header' (variable size) as the header for index pages (before this was '2') Added 0xffffffff to end of index and block data bases and 0xfffffffe at end of bitmap pages when page checksums are not enabled Added _ma_get_page_used() and _ma_get_used_and_node() to simplify index page header handling rec_per_key_part is now in double precision Reserved place in index file for my_guid and nulls_per_key_part Give error HA_ERR_NEW_FILE if trying to open a Maria file with new, not yet supported extensions Lots of renames to increase readability: randomize() -> my_rnd_init() st_maria_info -> st_maria_handler st_maria_info -> MARIA_HA st_maria_isaminfo -> st_maria_info rand_struct -> my_rand_struct rec_per_key_rows -> records_at_analyze client/mysqladmin.cc: rand_struct -> my_rrnd_struct include/maria.h: st_maria_info -> MARIA_HA st_maria_isaminfo -> st_maria_info Changed analyze statistics to be of double precission Changed offset to field to be 32bits instead of 64 (safe as a record without blobs can't be that big) include/my_base.h: Added HA_OPTION_PAGE_CHECKSUM & HA_CREATE_PAGE_CHECKSUM Fixed comments Added HA_ERR_NEW_FILE include/my_sys.h: Added prototypes and structures for my_uuid() and my_rnd() include/myisamchk.h: Changed some buffers to size_t Added possibility to have key statistics with double precission include/mysql_com.h: Move rand functions to mysys libmysql/Makefile.shared: Added my_rnd mysql-test/r/maria.result: Updated results mysql-test/t/maria.test: More tests for checksum mysys/Makefile.am: Added my_rnd.c and my_uuid.c server-tools/instance-manager/listener.cc: Fixed include order (my_global.h should always be first) server-tools/instance-manager/mysql_connection.cc: Fixed include order (my_global.h should always be first) Use my_rnd_init() server-tools/instance-manager/mysql_connection.h: rand_struct -> my_rand_struct sql/handler.h: Added flag for page checksums sql/item_func.cc: Use new my_rnd() interface sql/item_func.h: Use new my_rnd() interface sql/item_strfunc.cc: Use new my_rnd() interface sql/lex.h: Added PAGE_CHECKSUM and TABLE_CHECKSUM sql/mysql_priv.h: Use new my_rnd() interface sql/mysqld.cc: Use new my_rnd() interface sql/password.c: Move my_rnd() to mysys Use new my_rnd() interface sql/sql_class.cc: Use new my_rnd() interface sql/sql_class.h: Use new my_rnd() interface sql/sql_crypt.cc: Use new my_rnd() interface sql/sql_crypt.h: Use new my_rnd() interface sql/sql_show.cc: Simpler handling of ha_choice_values Added PAGE_CHECKSUM sql/sql_table.cc: Enable correct checksum handling (for now) if not running in compatible mode sql/sql_yacc.yy: Added table option PAGE_CHECKSUM Added future compatible table option TABLE_CHECKSUM (alias for CHECKSUM) Added 'choice' target to simplify code sql/table.cc: Store flag for PAGE_CHECKSUM sql/table.h: Added support for PAGE_CHECKSUM storage/maria/ha_maria.cc: Remove protection for incompatbile frm and MAI (Slow, not needed test) Rec_per_key is now in double Remember row type for table Give warning if one Maria uses another row type than requested Removed some old ASK_MONTY entries (added comments instead) Added handling of PAGE_CHECKSUM flags storage/maria/ma_bitmap.c: Added page checksums to bitmap pages Added special bitmap marker for bitmap pages (Used to find bugs when running without page checksums) storage/maria/ma_blockrec.c: Added a free-link list over directory entries. This makes insert of small rows faster as we don't have to scan the whole directory to find a not used entry. Moved SANITY_CHECKS to maria_def.h Simplify code by introducing dir_entry_pos() Added support for PAGE_CHECKSUM storage/maria/ma_blockrec.h: Added DIR_FREE_SIZE (linked list of free directory entries) Added PAGE_CHECKSUM Added 'dir_entry_pos()' storage/maria/ma_check.c: Check that index pages has correct index number Calculate rec_per_key with double precission Simplify code by using '_ma_get_used_and_node()' Check free directory list Remove wrong end \n from messages maria_data_on_page() -> _ma_get_page_used() maria_putint() -> _ma_store_page_used() rec_per_key_rows -> records_at_analyze storage/maria/ma_checksum.c: Calculate checksum in original column order storage/maria/ma_create.c: Store original column order in index file Reserve place for nulls_per_key_part (future) Added support for PAGE_CHECKSUM storage/maria/ma_dbug.c: Fixed wrong debug output of key of type 'ulong' storage/maria/ma_delete.c: maria_data_on_page() -> _ma_get_used_and_node() maria_data_on_page() -> _ma_get_page_used() maria_putint() -> _ma_store_page_used() Added page header (index key number) to all index pages Reserved page for checksum on index pages Use keypage_header storage/maria/ma_ft_update.c: maria_putint() -> _ma_store_page_used() Store key number at start of page storage/maria/ma_loghandler.h: st_maria_info -> MARIA_HA storage/maria/ma_open.c: rec_per_key is now in double precission Added 'nulls_per_key_part' Added 'extra_options' (flags for future) Added support for PAGE_CHECKSUM Give error HA_ERR_NEW_FILE when using unsupported maria extensions Added comments Add maria_uuid to index file Added functions to store and read column_nr map. Changed some functions to return my_bool instead of uint storage/maria/ma_page.c: Added checks that pages has correct key nr Store 0xffffffff in checksum position if page checksums are not enabled Moved key-page-delete link to take into account keypage header storage/maria/ma_preload.c: Remove old MyISAM dependent code When scanning pages, only add pages to page cache for the requested index storage/maria/ma_range.c: maria_data_on_page() -> _ma_get_used_and_node() Use keypage_header storage/maria/ma_rt_index.c: Fixed indentation storage/maria/ma_rt_index.h: Added support for dynamic index page header Reserved place for PAGE_CHECKSUM storage/maria/ma_rt_key.c: Fixed indentation maria_data_on_page() -> _ma_get_page_used() maria_putint() -> maria_store_page_used() storage/maria/ma_rt_mbr.c: Fixed indentation storage/maria/ma_rt_split.c: Fixed indentation maria_data_on_page () -> _ma_get_page_used() storage/maria/ma_rt_test.c: Fixed indentation storage/maria/ma_search.c: Remove support of using -1 as 'last used index' to _ma_check_index() maria_data_on_page() -> _ma_get_page_used() maria_data_on_page() -> _ma_get_used_and_node() Use keypage_header storage/maria/ma_sort.c: Changed some buffers to size_t Changed rec_per_key_part to double storage/maria/ma_static.c: Removed NEAR Added maria_uuid storage/maria/ma_test2.c: Moevd testflag == 2 to correct place Remove test of reading with index number -1 (not supported anymore) storage/maria/ma_test_recovery.expected: Updated results storage/maria/ma_test_recovery: Changed tmp table names so that one can run maria_chk on them storage/maria/ma_write.c: Fixed indentation Use keypage_header Store index number on index pages maria_putint() -> _ma_store_page_used() maria_data_on_page() -> ma_get_used_and_node() maria_data_on_page() -> _ma_get_page_used() Added PAGE_CHECKSUM Added Maria handler to some functions Removed some not needed casts storage/maria/maria_chk.c: Added error handling for HA_ERR_NEW_FILE Added information about page checksums rec_per_key_part changed to double maria_data_on_page() -> _ma_get_page_used() Use keypage_header storage/maria/maria_def.h: Added IDENTICAL_PAGES_AFTER_RECOVERY and SANITY_CHECKS Changed rec_per_key_part to double Added nulls_per_key_part rec_per_key_rows -> records_at_analyze st_maria_info -> MARIA_HA Reserve place for new statistics variables, uuid, checksums per page etc. Removed NEAR tags Changed some prototypes to use my_bool and size_t storage/maria/maria_pack.c: st_maria_info -> MARIA_HA Fixed indentation storage/myisam/mi_dbug.c: Fix wrong debug output for ULONG mysys/my_rnd.c: New BitKeeper file ``mysys/my_rnd.c'' mysys/my_uuid.c: New BitKeeper file ``mysys/my_uuid.c''
* Merged with mysql-5.1 main tree.unknown2007-07-021-5/+5
| | | | | | BUILD/compile-pentium-debug-max: Added definition after macro was removed from main tree. This will be fixed back in main tree later.
* Pagecache integration for review.unknown2007-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | storage/maria/unittest/ma_pagecache_single.c: Rename: storage/maria/unittest/mf_pagecache_single.c -> storage/maria/unittest/ma_pagecache_single.c include/maria.h: Pagecache integration. include/myisamchk.h: Pagecache integration. include/pagecache.h: removed WRITE_NOW mode Pagecache parameters management. mysys/Makefile.am: Safe hash procedures moved to the separate file. Pagecache moved to maria engine directory. mysys/mf_keycaches.c: Safe hash procedures moved to the separate file. sql/handler.cc: Pageccahe integration. sql/handler.h: Pagecache integration. sql/mysql_priv.h: pagecache integration sql/mysqld.cc: pagecache integration sql/set_var.cc: Pagecache integration. sql/set_var.h: Pagecache integration. storage/maria/Makefile.am: Pagecache integration and moving to maria engine directory. storage/maria/ha_maria.cc: File changed on PAGECCAHE_FILE. storage/maria/ma_bitmap.c: Pagecache integration. storage/maria/ma_blockrec.c: Pagecache integration. storage/maria/ma_check.c: File changed on PAGECCAHE_FILE. Pagecache integration. storage/maria/ma_close.c: File changed on PAGECCAHE_FILE. storage/maria/ma_delete_all.c: File changed on PAGECCAHE_FILE. storage/maria/ma_dynrec.c: File changed on PAGECCAHE_FILE. storage/maria/ma_extra.c: File changed on PAGECCAHE_FILE. storage/maria/ma_info.c: File changed on PAGECCAHE_FILE. storage/maria/ma_keycache.c: Pagecache integration. storage/maria/ma_locking.c: File changed on PAGECCAHE_FILE. storage/maria/ma_loghandler.c: Assert added. storage/maria/ma_loghandler.h: extern specifier added. storage/maria/ma_open.c: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/ma_packrec.c: File changed on PAGECCAHE_FILE. storage/maria/ma_page.c: Pagecache integration. storage/maria/ma_pagecache.c: Pagecache renamed and moved to the maria directory. BLOCK_* defines renamed to avoid conflict with BLOCK_ERROR defined in maria_def.h storage/maria/ma_panic.c: File changed on PAGECCAHE_FILE. storage/maria/ma_preload.c: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/ma_static.c: Pagecache integration. storage/maria/ma_test1.c: Pagecache integration. storage/maria/ma_test2.c: Pagecache integration. storage/maria/ma_test3.c: Pagecache integration. storage/maria/ma_write.c: File changed on PAGECCAHE_FILE. storage/maria/maria_chk.c: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/maria_def.h: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/maria_ftdump.c: Pagecache integration. storage/maria/maria_pack.c: File changed on PAGECCAHE_FILE. storage/maria/unittest/Makefile.am: Pagecache moved to the maria directory. storage/maria/unittest/ma_pagecache_consist.c: fixed using uninitialized variable storage/maria/ma_pagecaches.c: New BitKeeper file ``storage/maria/ma_pagecaches.c'' mysys/my_safehash.h: New BitKeeper file ``mysys/my_safehash.h''
* Implementation of rows-in-blockunknown2007-01-181-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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''
* Added storage/maria (based on MyISAM). WL#3245unknown2006-04-111-0/+160
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''