Commit graph

45 commits

Author SHA1 Message Date
Sergei Golubchik
50ffaf6d0f provide maria* aliases for aria* command-line options,
status and system variables
2010-09-14 23:06:54 +02:00
Sergei Golubchik
069a068c90 restore the unintentinally broken ABI 2010-07-23 22:37:21 +02:00
Michael Widenius
e2efd93385 Fixed some compiler warnings and errors in test suite found by buildbot
include/ft_global.h:
  Changed string size to 'size_t' (to avoid compiler warnings later)
include/maria.h:
  Changed string size to 'size_t' (to avoid compiler warnings later)
mysql-test/r/show_check.result:
  Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables'
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Use HIGH_PRIORITY inserts to avoid problem with concurrent inserts on the slave.
mysql-test/t/show_check-master.opt:
  Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables'
sql/item.cc:
  Fixed compiler warning
storage/maria/ft_maria.c:
  Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_boolean_search.c:
  Fixed compiler warnings
storage/myisam/ft_myisam.c:
  Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_nlq_search.c:
  Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_parser.c:
  Changed string size to 'size_t' (to avoid compiler warnings)
storage/myisam/ft_stopwords.c:
  Changed string size to 'size_t' (to avoid compiler warnings)
storage/myisam/ftdefs.h:
  Changed string size to 'size_t' (to avoid compiler warnings)
2010-01-27 23:53:08 +02:00
Michael Widenius
945fa0d913 Merge with mysql-maria tree
mysql-test/t/variables.test:
  Reset delay_key_write, otherwise maria.maria test may fail
sql/set_var.cc:
  Reset ha_open_options if one resets the delay_key_write variable.
  Before there was no way to reset it without restarting mysqld, which caused some tests to fail
2009-02-19 11:01:25 +02:00
Guilhem Bichot
998b4ae52d Merge of MyISAM changes done in 5.1-main, into Maria 2009-02-12 18:51:00 +01:00
Michael Widenius
37db97b0e2 Merge with mysql-maria
Changed _ma_ft_convert_to_ft2() to my_bool

storage/maria/ma_ft_update.c:
  Changed _ma_ft_convert_to_ft2() to my_bool
storage/maria/ma_fulltext.h:
  Changed _ma_ft_convert_to_ft2() to my_bool
storage/maria/ma_write.c:
  Manual merge
  Changed _ma_ft_convert_to_ft2() to my_bool
2009-01-30 23:55:42 +02:00
Sergei Golubchik
9c96fde120 post-review fixes
include/atomic/generic-msvc.h:
  prevent possible compiler warnings
include/lf.h:
  comments, better definition for LF_HASH_OVERHEAD
include/maria.h:
  define MARIA_CANNOT_ROLLBACK here
include/my_pthread.h:
  avoid possible name clash
include/waiting_threads.h:
  comments, const, move WT_RESOURCE to waiting_threads.c
mysql-test/suite/maria/r/maria_notembedded.result:
  new test
mysql-test/suite/maria/t/maria_notembedded.test:
  new test - 5-way deadlock
mysys/lf_hash.c:
  better definition for LF_HASH_OVERHEAD
mysys/my_static.c:
  comment
mysys/my_thr_init.c:
  casts
mysys/waiting_threads.c:
  comments, asserts, etc
server-tools/instance-manager/parse.cc:
  fix my_init_dynamic_array() to follow new calling conventions
sql/mysqld.cc:
  call wt_init after set_proper_floating_point_mode
sql/sql_class.h:
  comment
storage/maria/ha_maria.cc:
  move MARIA_CANNOT_ROLLBACK to a common header
storage/maria/ma_commit.c:
  comment
storage/maria/ma_write.c:
  comments, check for HA_ERR_FOUND_DUPP_KEY
storage/maria/trnman.c:
  comments, assert
storage/maria/trnman.h:
  comments
storage/maria/unittest/trnman-t.c:
  be paranoid
unittest/mysys/lf-t.c:
  comments
unittest/mysys/waiting_threads-t.c:
  comments, safety, memory leak
2009-01-15 22:27:36 +01:00
Michael Widenius
dd5b9fc6cd Merge with base MySQL-5.1-maria 2009-01-12 13:12:00 +02:00
Michael Widenius
3271841881 Merging of changes from myisam -> maria missing in last 5.1 - 5.1->maria merge
MARIA_MAX_MSG_BUF -> HA_MAX_MSG_BUF

include/maria.h:
  Remove MARIA_MAX_MSG_BUF; We are now using HA_MAX_MSG_BUF
  Added maria_test_invalid_symlink
storage/maria/ha_maria.cc:
  MARIA_MAX_MSG_BUF -> HA_MAX_MSG_BUF
storage/maria/ma_check.c:
  Removed tab in string constant
  Add extra argument to ma_open_datafile()
storage/maria/ma_create.c:
  Set error number if table is in use
storage/maria/ma_open.c:
  Added name argument to open functions for security check if filename is linked to another file in database directory
storage/maria/ma_static.c:
  Default functions for checking if wrong symlink
storage/maria/maria_chk.c:
  Add extra argument to _ma_open_datafile()
storage/maria/maria_def.h:
  Add extra argument to _ma_open_datafile()
2008-10-15 00:23:33 +03:00
Michael Widenius
d6bdf03375 Added MARIA_PAGE structure to keep all information about a maria key page.
This allowed me to remove a lot of parameters to functions, local variables,
duplicate code and identical constructs.  It should also make the code easier
to read.
Changed all marking of page as changed to use offset instead of pointers; This removed
one theoretical problem where dynamic_array may have been moved between two calls.
In addition I changed some functions from return my_bool


include/maria.h:
  Changes to use MARIA_PAGE
storage/maria/ma_check.c:
  Changes to use MARIA_PAGE
  Folded lines longer > 79 characters
storage/maria/ma_delete.c:
  Changes to use MARIA_PAGE
  Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool
  Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error
storage/maria/ma_ft_update.c:
  Fix needed as _ma_ck_delete() now returns my_bool
  New parameter for ma_write_keypage.
storage/maria/ma_key_recover.c:
  Changes to use MARIA_PAGE
storage/maria/ma_key_recover.h:
  Updated function prototypes
storage/maria/ma_page.c:
  Changes to use MARIA_PAGE
  Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively
storage/maria/ma_range.c:
  Changes to use MARIA_PAGE
storage/maria/ma_rt_index.c:
  Changes to use MARIA_PAGE
  Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool
  Removed one 'if (node_flag) as this was always true
  Changed lable 'err1' to 'err' as there was no other error lables
  Moved allocation of page_buff outside of loop for fewer alloc/free calls
  Changed n_pages and m_pages to uint as 65000 pages is more than enough
storage/maria/ma_rt_index.h:
  Updated function prototypes
storage/maria/ma_rt_key.c:
  Changes to use MARIA_PAGE
storage/maria/ma_rt_key.h:
  Updated function prototypes
storage/maria/ma_rt_mbr.c:
  Changes to use MARIA_PAGE
storage/maria/ma_rt_mbr.h:
  Updated function prototypes
storage/maria/ma_rt_split.c:
  Changes to use MARIA_PAGE
storage/maria/ma_search.c:
  Changes to use MARIA_PAGE
storage/maria/ma_write.c:
  Changes to use MARIA_PAGE
  Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool
  Don't set *root to HA_OFFSET_ERROR in case of error
  Removed maria_print_error() calls as caller will do this
  Simplified logic in balance_page by introducing pointers to left and right pages
storage/maria/maria_chk.c:
  Changes to use MARIA_PAGE
storage/maria/maria_def.h:
  Changes to use MARIA_PAGE
  Removed some not used macros
  Added macros for MARIA_PAGE handling
2008-09-01 20:31:40 +03:00
Michael Widenius
52cb0c24a6 Added versioning of Maria index
Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file.
Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned.
Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey
Renamed old info->lastkey to info->lastkey_buff
Use exact key lenghts for keys, not USE_WHOLE_KEY
For partial key searches, use SEARCH_PART_KEY
When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid

Changes done in a lot of files:
- Modified functions to use MARIA_KEY instead of key pointer and key length
- Use keyinfo->root_lock instead of share->key_root_lock[keynr]
- Simplify code by using local variable keyinfo instead if share->keyinfo[i]
- Added #fdef EXTERNAL_LOCKING around removed state elements
- HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid)
- Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it

.bzrignore:
  Added missing temporary directory
extra/Makefile.am:
  comp_err is now deleted on make distclean
include/maria.h:
  Added structure MARIA_KEY, which is used for intern key objects in Maria.
  Changed functions to take MARIA_KEY as an argument instead of pointer to packed key.
  Changed some functions that always return true or false to my_bool.
  Added virtual function make_key() to avoid if in _ma_make_key()
  Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster
include/my_base.h:
  Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check()
  Added SEARCH_INSERT to be used when inserting new keys
  Added SEARCH_PART_KEY for partial searches
  Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID
  Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid
include/my_handler.h:
  Make next_flag 32 bit to make sure we can handle all SEARCH_ bits
mysql-test/include/maria_empty_logs.inc:
  Read and restore current database; Don't assume we are using mysqltest.
  Don't log use databasename to log. Using this include should not cause any result changes.
mysql-test/r/maria-gis-rtree-dynamic.result:
  Updated results after adding some check table commands to help pinpoint errors
mysql-test/r/maria-mvcc.result:
  New tests
mysql-test/r/maria-purge.result:
  New result after adding removal of logs
mysql-test/r/maria-recovery-big.result:
  maria_empty_logs doesn't log 'use mysqltest' anymore
mysql-test/r/maria-recovery-bitmap.result:
  maria_empty_logs doesn't log 'use mysqltest' anymore
mysql-test/r/maria-recovery-rtree-ft.result:
  maria_empty_logs doesn't log 'use mysqltest' anymore
mysql-test/r/maria-recovery.result:
  maria_empty_logs doesn't log 'use mysqltest' anymore
mysql-test/r/maria.result:
  New tests
mysql-test/r/variables-big.result:
  Don't log id as it's not predictable
mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result:
  Updated results to new binlog results. (Test has not been run in a long time as it requires --big)
mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt:
  Moved file to ndb replication test directory
mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test:
  Fixed wrong path to included tests
mysql-test/t/maria-gis-rtree-dynamic.test:
  Added some check table commands to help pinpoint errors
mysql-test/t/maria-mvcc.test:
  New tests
mysql-test/t/maria-purge.test:
  Remove logs to make test results predictable
mysql-test/t/maria.test:
  New tests for some possible problems
mysql-test/t/variables-big.test:
  Don't log id as it's not predictable
mysys/my_handler.c:
  Updated function comment to reflect old code
  Changed nextflag to be uint32 to ensure we can have flags > 16 bit
  Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored.
  Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND
  Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag
mysys/my_lock.c:
  Fixed wrong test (Found by Guilhem)
scripts/Makefile.am:
  Ensure that test programs are deleted by make clean
sql/rpl_rli.cc:
  Moved assignment order to fix compiler warning
storage/heap/hp_write.c:
  Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys
storage/maria/Makefile.am:
  Remove also maria log files when doing make distclean
storage/maria/ha_maria.cc:
  Use 'file->start_state' as default state for transactional tables without versioning
  At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows)
  In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event.
  Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave
storage/maria/ma_blockrec.c:
  Updated comment
storage/maria/ma_check.c:
  Compact key pages (removes transid) when doing --zerofill
  Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn()
  Removed not needed argument from get_record_for_key()
  Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL
  Remove some SPATIAL specific code where the virtual functions can handle this in a general manner
  Use info->lastkey_buff instead of info->lastkey
  _ma_dpos() -> _ma_row_pos_from_key()
  _ma_make_key() -> keyinfo->make_key()
  _ma_print_key() -> _ma_print_keydata()
  _ma_move_key() -> ma_copy_copy()
  Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys
  Ensure that data on page doesn't overwrite page checksum position
  Use DBUG_DUMP_KEY instead of DBUG_DUMP
  Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp()
  Fixed check if rowid points outside of BLOCK_RECORD data file
  Use info->lastkey_buff instead of key on stack in some safe places
  Added #fdef EXTERNAL_LOCKING around removed state elements
storage/maria/ma_close.c:
  Use keyinfo->root_lock instead of share->key_root_lock[keynr]
storage/maria/ma_create.c:
  Removed assert that is already checked in maria_init()
  Force transactinal tables to be of type BLOCK_RECORD
  Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD)
  Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check
  Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file.
storage/maria/ma_dbug.c:
  Changed _ma_print_key() to use MARIA_KEY
storage/maria/ma_delete.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  info->lastkey2-> info->lastkey_buff2
  Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys
  Use new interface for get_key(), _ma_get_last_key() and others
  _ma_dpos() -> ma_row_pos_from_key()
  Simplify setting of prev_key in del()
  Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid
  Treath key pages that may have a transid as if keys would be of variable length
storage/maria/ma_delete_all.c:
  Reset history state if maria_delete_all_rows() are called
  Update parameters to _ma_update_state_lsns() call
storage/maria/ma_extra.c:
  Store and restore info->lastkey
storage/maria/ma_ft_boolean_search.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_ft_nlq_search.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing)
storage/maria/ma_ft_update.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_ftdefs.h:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_fulltext.h:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_init.c:
  Check if blocksize is legal
  (Moved test here from ma_open())
storage/maria/ma_key.c:
  Added functions for storing/reading of transid 
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys
  Add transid to keys if table is versioned
  Added _ma_copy_key()
storage/maria/ma_key_recover.c:
  Add logging of page_flag (holds information if there are keys with transid on page)
  Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive
  Added lots of DBUG_PRINT()
  Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE
storage/maria/ma_key_recover.h:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_locking.c:
  Added new arguments to _ma_update_state_lsns_sub()
storage/maria/ma_loghandler.c:
  Fixed all logging of LSN to look similar in DBUG log
  Changed if (left != 0) to if (left) as the later is used also later in the code
storage/maria/ma_loghandler.h:
  Added new index page operations
storage/maria/ma_open.c:
  Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned
  This is needed to not get double increments of state.records (one in ma_write.c and on when log is written)
  Changed info->lastkey to MARIA_KEY type
  Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled)
  Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned.
  Check on open that state.create_trid is correct
  Extend share->base.max_key_length in case of transactional table so that it can hold transid
  Removed 4.0 compatible fulltext key mode as this is not relevant for Maria
  Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block
  Initialize all new virtual function pointers
  Removed storing of state->unique, state->process and store state->create_trid instead
storage/maria/ma_page.c:
  Added comment to describe key page structure
  Added functions to compact key page and log the compact operation
storage/maria/ma_range.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search
  Added handling of pages with transid
storage/maria/ma_recovery.c:
  Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal
  Added new arguments to _ma_update_state_lsns()
storage/maria/ma_rename.c:
  Added new arguments to _ma_update_state_lsns()
storage/maria/ma_rkey.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Don't use USE_WHOLE_KEY, use real length of key
  Use share->row_is_visible() to test if row is visible
  Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once
  Removed test if last_used_keyseg != 0 as this is always true
storage/maria/ma_rnext.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Simplify code by using local variable keyinfo instead if share->keyinfo[i]
  Use share->row_is_visible() to test if row is visible
storage/maria/ma_rnext_same.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  lastkey2 -> lastkey_buff2
storage/maria/ma_rprev.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Simplify code by using local variable keyinfo instead if share->keyinfo[i]
  Use share->row_is_visible() to test if row is visible
storage/maria/ma_rsame.c:
  Updated comment
  Simplify code by using local variable keyinfo instead if share->keyinfo[i]
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_rsamepos.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_rt_index.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Use better variable names
  Removed not needed casts
  _ma_dpos() -> _ma_row_pos_from_key()
  Use info->last_rtree_keypos to save position to key instead of info->int_keypos
  Simplify err: condition
  Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function
storage/maria/ma_rt_index.h:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_rt_key.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Simplify maria_rtree_add_key by combining idenitcal code and removing added_len
storage/maria/ma_rt_key.h:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_rt_mbr.c:
  Changed type of 'nextflag' to uint32
  Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value
storage/maria/ma_rt_mbr.h:
  Changed type of 'nextflag' to uint32
storage/maria/ma_rt_split.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  key_length -> key_data_length to catch possible errors
storage/maria/ma_rt_test.c:
  Fixed wrong comment
  Reset recinfo to avoid valgrind varnings
  Fixed wrong argument to create_record() that caused test to fail
storage/maria/ma_search.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Added support of keys with optional trid
  Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads
  _ma_dpos() -> _ma_row_pos_from_key()
  If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search()
  Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data)
  Combine similar code at end of _ma_get_binary_pack_key()
  Removed not used function _ma_move_key()
  In _ma_search_next() don't call _ma_search() if we aren't on a nod page.
  Update info->cur_row.trid with trid for found key
  
  
  
  Removed some not needed casts
  Added _ma_trid_from_key()
  Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller
storage/maria/ma_sort.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_sp_defs.h:
  _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value
storage/maria/ma_sp_key.c:
  _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value
  Don't test sizeof(double), test against 8 as we are using float8store()
  Use mi_float8store() instead of doing swap of value (same thing but faster)
storage/maria/ma_state.c:
  maria_versioning() now only calls _ma_block_get_status() if table supports versioning
  Added _ma_row_visible_xxx() functions for different occasions
  When emptying history, set info->state to point to the first history event.
storage/maria/ma_state.h:
  Added _ma_row_visible_xxx() prototypes
storage/maria/ma_static.c:
  Indentation changes
storage/maria/ma_statrec.c:
  Fixed arguments to _ma_dpointer() and _ma_rec_pos()
storage/maria/ma_test1.c:
  Call init_thr_lock() if we have versioning
storage/maria/ma_test2.c:
  Call init_thr_lock() if we have versioning
storage/maria/ma_unique.c:
  Modified functions to use MARIA_KEY
storage/maria/ma_update.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
storage/maria/ma_write.c:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Simplify code by using local variable keyinfo instead if share->keyinfo[i]
  In _ma_enlarge_root(), mark in page_flag if new key has transid
  _ma_dpos() -> _ma_row_pos_from_key()
  Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not
  Moved 'reversed' to outside block as area was used later
storage/maria/maria_chk.c:
  Added error if trying to sort with HA_BINARY_PACK_KEY
  Use new interface to get_key() and _ma_dpointer()
  _ma_dpos() -> _ma_row_pos_from_key()
storage/maria/maria_def.h:
  Modified functions to use MARIA_KEY instead of key pointer and key length
  Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning
  Added create_trid to MARIA_SHARE
  Removed not used state variables 'process' and 'unique'
  Added defines for handling TRID's in index pages
  Changed to use MARIA_SHARE instead of MARIA_HA for some functions
  Added 'have_versioning' flag if table supports versioning
  Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF
  Changed last_key to be of type MARIA_KEY. Removed lastkey_length
  lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2
  Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read
  Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key
  Changed 'nextflag' and assocaited variables to uint32
storage/maria/maria_ftdump.c:
  lastkey -> lastkey_buff
storage/maria/trnman.c:
  Fixed wrong initialization of min_read_from and max_commit_trid
  Added trnman_get_min_safe_trid()
storage/maria/unittest/ma_test_all-t:
  Added --start-from
storage/myisam/mi_check.c:
  Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order
storage/myisam/mi_delete.c:
  Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order
storage/myisam/mi_range.c:
  Updated comment
storage/myisam/mi_write.c:
  Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order
storage/myisam/rt_index.c:
  Fixed wrong parameter to rtree_get_req() which could cause crash
2008-06-26 08:18:28 +03:00
unknown
5099033c26 WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t"
Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation
Fixed wrong call to strmake
Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert
Allow storing year 2155 in year field
When running with purify/valgrind avoid copying structures over themself
Added hook 'trnnam_end_trans_hook' that is called when transaction ends
Added trn->used_tables that is used to an entry for all tables used by transaction
Fixed that ndb doesn't crash on duplicate key error when start_bulk_insert/end_bulk_insert are not called


include/maria.h:
  Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation
include/my_tree.h:
  Added macro 'reset_free_element()' to be able to ignore calls to the external free function.
  Is used to optimize end-bulk-insert in case of failures, in which case we don't want write the remaining keys in the tree
mysql-test/install_test_db.sh:
  Upgrade to new mysql_install_db options
mysql-test/r/maria-mvcc.result:
  New tests
mysql-test/r/maria.result:
  New tests
mysql-test/suite/ndb/r/ndb_auto_increment.result:
  Fixed error message now when bulk insert is not always called
mysql-test/suite/ndb/t/ndb_auto_increment.test:
  Fixed error message now when bulk insert is not always called
mysql-test/t/maria-mvcc.test:
  Added testing of versioning of count(*)
mysql-test/t/maria-page-checksum.test:
  Added comment
mysql-test/t/maria.test:
  More tests
mysys/hash.c:
  Code style change
sql/field.cc:
  Allow storing year 2155 in year field
sql/ha_ndbcluster.cc:
  Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
sql/ha_ndbcluster.h:
  Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
sql/ha_partition.cc:
  Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
sql/ha_partition.h:
  Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
sql/handler.cc:
  Don't call get_dup_key() if there is no table object. This can happen if the handler generates a duplicate key error on commit
sql/handler.h:
  Added new argument to end_bulk_insert() to signal if the bulk insert should ignored (ie, the table will be deleted)
sql/item.cc:
  Style fix
  Removed compiler warning
sql/log_event.cc:
  Added new argument to ha_end_bulk_insert()
sql/log_event_old.cc:
  Added new argument to ha_end_bulk_insert()
sql/mysqld.cc:
  Removed compiler warning
sql/protocol.cc:
  Added DBUG
sql/sql_class.cc:
  Added DBUG
  Fixed wrong call to strmake
sql/sql_insert.cc:
  Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert involves a lot of if's)
  Added new argument to ha_end_bulk_insert()
sql/sql_load.cc:
  Added new argument to ha_end_bulk_insert()
sql/sql_parse.cc:
  Style fixes
  Avoid goto in common senario
sql/sql_select.cc:
  When running with purify/valgrind avoid copying structures over themself.  This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings
sql/sql_select.h:
  Avoid copying structures over themself.  This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings
sql/sql_table.cc:
  Call HA_EXTRA_PREPARE_FOR_DROP if table created by ALTER TABLE is going to be dropped
  Added new argument to ha_end_bulk_insert()
storage/archive/ha_archive.cc:
  Added new argument to end_bulk_insert()
storage/archive/ha_archive.h:
  Added new argument to end_bulk_insert()
storage/federated/ha_federated.cc:
  Added new argument to end_bulk_insert()
storage/federated/ha_federated.h:
  Added new argument to end_bulk_insert()
storage/maria/Makefile.am:
  Added ma_state.c and ma_state.h
storage/maria/ha_maria.cc:
  Versioning of count(*) and checksum
  - share->state.state is now assumed to be correct, not handler->state
  - Call _ma_setup_live_state() in external lock to get count(*)/checksum versioning. In case of
    not versioned and not concurrent insertable table, file->s->state.state contains the correct state information
  
  Other things:
  - file->s -> share
  - Added DBUG_ASSERT() for unlikely case
  - Optimized end_bulk_insert() to not write anything if table is going to be deleted (as in failed alter table)
  - Indentation changes in external_lock becasue of removed 'goto' caused a big conflict even if very little was changed
storage/maria/ha_maria.h:
  New argument to end_bulk_insert()
storage/maria/ma_blockrec.c:
  Update for versioning of count(*) and checksum
  Keep share->state.state.data_file_length up to date (not info->state->data_file_length)
  Moved _ma_block_xxxx_status() and maria_versioning() functions to ma_state.c
storage/maria/ma_check.c:
  Update and use share->state.state instead of info->state
  info->s to share
  Update info->state at end of repair
  Call _ma_reset_state() to update share->state_history at end of repair
storage/maria/ma_checkpoint.c:
  Call _ma_remove_not_visible_states() on checkpoint to clean up not visible state history from tables
storage/maria/ma_close.c:
  Remember state history for running transaction even if table is closed
storage/maria/ma_commit.c:
  Ensure we always call trnman_commit_trn() even if other calls fails. If we don't do that, the translog and state structures will not be freed
storage/maria/ma_delete.c:
  Versioning of count(*) and checksum:
  - Always update info->state->checksum and info->state->records
storage/maria/ma_delete_all.c:
  Versioning of count(*) and checksum:
  - Ensure that share->state.state is updated, as here is where we store the primary information
storage/maria/ma_dynrec.c:
  Use lock_key_trees instead of concurrent_insert to check if trees should be locked.
  This allows us to lock trees both for concurrent_insert and for index versioning.
storage/maria/ma_extra.c:
  Versioning of count(*) and checksum:
  - Use share->state.state instead of info->state
  - share->concurrent_insert -> share->non_transactional_concurrent_insert
  - Don't update share->state.state from info->state if transactional table
  
  Optimization:
  - Don't flush io_cache or bitmap if we are using FLUSH_IGNORE_CHANGED
storage/maria/ma_info.c:
  Get most state information from current state
storage/maria/ma_init.c:
  Add hash table and free function to store states for closed tables
  Install hook for transaction commit/rollback to update history state
storage/maria/ma_key_recover.c:
  Versioning of count(*) and checksum:
  - Use share->state.state instead of info->state
storage/maria/ma_locking.c:
  Versioning of count(*) and checksum:
  - Call virtual functions (if exists) to restore/update status
  - Move _ma_xxx_status() functions to ma_state.c
  
  info->s -> share
storage/maria/ma_open.c:
  Versioning of count(*) and checksum:
  - For not transactional tables, set info->state to point to new allocated state structure.
  - Initialize new info->state_start variable that points to state at start of transaction
  - Copy old history states from hash table (maria_stored_states) first time the table is opened
  - Split flag share->concurrent_insert to non_transactional_concurrent_insert & lock_key_tree
  - For now, only enable versioning of tables without keys (to be fixed in soon!)
  - Added new virtual function to restore status in maria_lock_database)
  
  More DBUG
storage/maria/ma_page.c:
  Versioning of count(*) and checksum:
  - Use share->state.state instead of info->state
  - Modify share->state.state.key_file_length under share->intern_lock
storage/maria/ma_range.c:
  Versioning of count(*) and checksum:
  - Lock trees based on share->lock_key_trees
  
  info->s -> share
storage/maria/ma_recovery.c:
  Versioning of count(*) and checksum:
  - Use share->state.state instead of info->state
  - Update state information on close and when reenabling logging
storage/maria/ma_rkey.c:
  Versioning of count(*) and checksum:
  - Lock trees based on share->lock_key_trees
storage/maria/ma_rnext.c:
  Versioning of count(*) and checksum:
  - Lock trees based on share->lock_key_trees
storage/maria/ma_rnext_same.c:
  Versioning of count(*) and checksum:
  - Lock trees based on share->lock_key_trees
  - Only skip rows based on file length if non_transactional_concurrent_insert is set
storage/maria/ma_rprev.c:
  Versioning of count(*) and checksum:
  - Lock trees based on share->lock_key_trees
storage/maria/ma_rsame.c:
  Versioning of count(*) and checksum:
  - Lock trees based on share->lock_key_trees
storage/maria/ma_sort.c:
  Use share->state.state instead of info->state
  Fixed indentation
storage/maria/ma_static.c:
  Added maria_stored_state
storage/maria/ma_update.c:
  Versioning of count(*) and checksum:
  - Always update info->state->checksum and info->state->records
  - Remove optimization for index file update as it doesn't work for transactional tables
storage/maria/ma_write.c:
  Versioning of count(*) and checksum:
  - Always update info->state->checksum and info->state->records
storage/maria/maria_def.h:
  Move MARIA_STATUS_INFO to ma_state.h
  
  Changes to MARIA_SHARE:
  - Added state_history to store count(*)/checksum states
  - Added in_trans as counter if table is used by running transactions
  - Split concurrent_insert into lock_key_trees and on_transactional_concurrent_insert.
  - Added virtual function lock_restore_status
  
  Changes to MARIA_HA:
  - save_state -> state_save
  - Added state_start to store state at start of transaction
storage/maria/maria_pack.c:
  Versioning of count(*) and checksum:
  - Use share->state.state instead of info->state
  
  Indentation fixes
storage/maria/trnman.c:
  Added hook 'trnnam_end_trans_hook' that is called when transaction ends
  Added trn->used_tables that is used to an entry for all tables used by transaction
  More DBUG
  Changed return type of trnman_end_trn() to my_bool
  Added trnman_get_min_trid() to get minimum trid in use.
  Added trnman_exists_active_transactions() to check if there exist a running transaction started between two commit id
storage/maria/trnman.h:
  Added 'used_tables'
  Moved all pointers into same groups to get better memory alignment
storage/maria/trnman_public.h:
  Added prototypes for new functions and variables
  Chagned return type of trnman_end_trn() to my_bool
storage/myisam/ha_myisam.cc:
  Added argument to end_bulk_insert() if operation should be aborted
storage/myisam/ha_myisam.h:
  Added argument to end_bulk_insert() if operation should be aborted
storage/maria/ma_state.c:
  Functions to handle state of count(*) and checksum
storage/maria/ma_state.h:
  Structures and declarations to handle state of count(*) and checksum
2008-05-29 18:33:33 +03:00
unknown
126c1228f5 Added versioning of row data
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''
2008-04-10 05:26:36 +03:00
unknown
311d8e898f Mac compiler warnings fixed.
include/maria.h:
  mac compiler warnings fixed.
storage/maria/ma_bitmap.c:
  mac compiler warnings fixed.
storage/maria/ma_blockrec.c:
  mac compiler warnings fixed.
storage/maria/ma_check.c:
  mac compiler warnings fixed.
storage/maria/ma_control_file.c:
  mac compiler warnings fixed.
storage/maria/ma_create.c:
  mac compiler warnings fixed.
storage/maria/ma_delete.c:
  mac compiler warnings fixed.
storage/maria/ma_ft_boolean_search.c:
  mac compiler warnings fixed.
storage/maria/ma_page.c:
  mac compiler warnings fixed.
storage/maria/ma_pagecache.c:
  mac compiler warnings fixed.
storage/maria/ma_recovery.c:
  mac compiler warning fixed.
storage/maria/ma_rt_test.c:
  mac compiler warnings fixed.
storage/maria/ma_search.c:
  mac compiler warning fixed.
storage/maria/ma_write.c:
  mac compiler warnings fixed.
storage/maria/unittest/ma_control_file-t.c:
  mac compiler warnings fixed.
storage/maria/unittest/ma_pagecache_consist.c:
  mac compiler warnings fixed.
storage/maria/unittest/ma_pagecache_single.c:
  mac compiler warnings fixed.
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  mac compiler warning fixed.
storage/maria/unittest/test_file.c:
  mac compiler warning fixed.
2008-02-07 22:46:32 +02:00
unknown
5ad477f6cb Added --with-maria-tmp-tables (default one) to allow on to configure if Maria should be used for internal temporary tables
Abort mysqld if Maria engine didn't start and we are using Maria for temporary tables
Fixed bug that caused update of big blobs to crash
Use pagecache_page_no_t as type for pages (to get rid of compiler warnings)
Added cast to get rid of compiler warning
Fixed wrong types of variables and arguments that caused lost information
Fixed wrong DBUG_ASSERT() that caused REDO of big blobs to fail
Removed some historical ifdefs that caused problem with windows compilations


BUILD/SETUP.sh:
  Added --with-maria-tmp-tables
include/maria.h:
  Use pagecache_page_no_t as type for pages
  Use my_bool as parameter for 'rep_quick' option
include/my_base.h:
  Added comment
mysql-test/r/maria-big.result:
  Added test that uses big blobs
mysql-test/t/maria-big.test:
  Added test that uses big blobs
sql/mysqld.cc:
  Abort mysqld if Maria engine didn't start and we are using Maria for temporary tables
sql/sql_class.h:
  Don't use Maria for temporary tables if --with-maria-tmp-tables is not defined
sql/sql_select.cc:
  Don't use Maria for temporary tables if --with-maria-tmp-tables is not defined
storage/maria/ha_maria.cc:
  Fixed compiler warnings reported by MCC
  - Fixed usage of wrong types that caused data loss
  - Changed parameter for rep_quick to my_bool
  - Added safe casts
  
  Fixed indentation
storage/maria/ma_bitmap.c:
  Use pagecache_page_no_t as type for pages
  Fixed compiler warnings
  Fixed bug that caused update of big blobs to crash
storage/maria/ma_blockrec.c:
  Use pagecache_page_no_t as type for pages
  Use my_bool as parameter for 'rep_quick' option
  Fixed compiler warnings
  Fixed wrong DBUG_ASSERT()
storage/maria/ma_blockrec.h:
  Use pagecache_page_no_t as type for pages
storage/maria/ma_check.c:
  Fixed some wrong parameters where we didn't get all bits for test_flag
  Changed rep_quick to be of type my_bool
  Use pagecache_page_no_t as type for pages
  Added cast's to get rid of compiler warnings
  Changed type of record_pos to get rid of compiler warning
storage/maria/ma_create.c:
  Added safe cast's to get rid of compiler warnings
storage/maria/ma_dynrec.c:
  Fixed usage of wrong type
storage/maria/ma_key.c:
  Fixed compiler warning
storage/maria/ma_key_recover.c:
  Use pagecache_page_no_t as type for pages
storage/maria/ma_loghandler_lsn.h:
  Added cast's to get rid of compiler warnings
storage/maria/ma_page.c:
  Changed variable name from 'page' to 'pos' as it was an offset and not a page address
  Moved page_size inside block to get rid of compiler warning
storage/maria/ma_pagecache.c:
  Fixed compiler warnings
  Replaced compile time assert with TODO
storage/maria/ma_pagecache.h:
  Use pagecache_page_no_t as type for pages
storage/maria/ma_pagecrc.c:
  Allow bitmap pages that is all zero
storage/maria/ma_preload.c:
  Added cast to get rid of compiler warning
storage/maria/ma_recovery.c:
  Changed types to get rid of compiler warnings
  Use bool for quick_repair to get rid of compiler warning
  Fixed some variables that was wrongly declared (not enough precission)
  Added cast to get rid of compiler warning
storage/maria/ma_test2.c:
  Remove historical undefs
storage/maria/maria_chk.c:
  Changed rep_quick to bool
  Fixed wrong parameter to maria_chk_data_link()
storage/maria/maria_def.h:
  Use pagecache_page_no_t as type for pages
storage/maria/maria_pack.c:
  Renamed isam -> maria
storage/maria/plug.in:
  Added option --with-maria-tmp-tables
storage/maria/trnman.c:
  Added cast to get rid of compiler warning
storage/myisam/mi_test2.c:
  Remove historical undefs
2008-01-10 21:21:36 +02:00
unknown
6cad020440 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
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
2007-12-31 11:55:46 +02:00
unknown
488cf72078 maria_page_checksum variable 2007-12-17 20:33:27 +01:00
unknown
ebf7ab7bce Added error HA_ERR_FILE_TOO_SHORT to be used when files are shorter than 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''
2007-12-04 23:23:42 +02:00
unknown
4e0964cb04 Fixed repair_by_sort to work with BLOCK_RECORD
Fixed bugs in undo logging
Fixed bug where head block was split before min_row_length (caused Maria to believe row was crashed on read)
Reserved place for reference-transid on key pages (for packing of transids)
ALTER TABLE and INSERT ... SELECT now uses fast creation of index
    
Known bugs:
ma_test_recovery fails because of a bug in redo handling when log is cut directly after a redo (Guilhem knows how to fix)
ma_test_recovery.excepted is not totally correct, because of the above bug
mysqld sometimes fails to restart; Fails with error "end_of_redo_phase: Assertion `long_trid != 0' failed"; Guilhem to investigate


include/maria.h:
  Prototype changes
  Added current_filepos to st_maria_sort_info
mysql-test/r/maria.result:
  Updated results that changes as alter table and insert ... select now uses fast creation of index
mysys/mf_iocache.c:
  Reset variable to gurard against double invocation
storage/maria/ma_bitmap.c:
  Added _ma_bitmap_reset_cache() (needed for repair)
storage/maria/ma_blockrec.c:
  Simplify code
  More initial allocations
  Fixed bug where head block was split before min_row_length (caused Maria to believe row was crashed on read)
storage/maria/ma_blockrec.h:
  Moved TRANSID_SIZE to maria_def.h
  Added prototype for new functions
storage/maria/ma_check.c:
  Simplicy code
  Fixed repair_by_sort to work with BLOCK_RECORD
  - When using BLOCK_RECORD or UNPACK create new Maria handle
  - Use common initializer function
  - Align code with maria_repair()
  
  Made some changes to maria_repair_parallel() to use common initializer function
  Removed ASK_MONTY section by fixing noted problem
storage/maria/ma_close.c:
  Moved check for readonly to _ma_state_info_write()
storage/maria/ma_key_recover.c:
  Use different log entries if key root changes or not.
  This fixed some bugs when tree grows
storage/maria/ma_key_recover.h:
  Added keynr to st_msg_to_write_hook_for_undo_key
storage/maria/ma_loghandler.c:
  Added INIT_LOGREC_UNDO_KEY_INSERT_WITH_ROOT
storage/maria/ma_loghandler.h:
  Added INIT_LOGREC_UNDO_KEY_INSERT_WITH_ROOT
storage/maria/ma_open.c:
  Added TRANSID to all key pages (for future compressing of trans id's)
  For compressed records, alloc a bit bigger buffer to avoid valgrind warnings
  If table is opened readonly, don't update state
storage/maria/ma_packrec.c:
  Allocate bigger array for bit unpacking to avoid valgrind errors
storage/maria/ma_recovery.c:
  Added UNDO_KEY_INSERT_WITH_ROOT & UNDO_KEY_DELETE_WITH_ROOT
storage/maria/ma_sort.c:
  More logging
storage/maria/ma_test_all.sh:
  More tests
storage/maria/ma_test_recovery.expected:
  Update results
  Note that this is not complete becasue of a bug in recovery
storage/maria/ma_test_recovery:
  Removed recreation of index (not needed when we have redo for index pages)
storage/maria/maria_chk.c:
  When using flag --read-only, don't update status for files
  When using --unpack, don't use REPAIR_BY_SORT if other repair option is given
  Enable repair_by_sort for BLOCK records
  Removed not needed newline at start of --describe
storage/maria/maria_def.h:
  Support for TRANSID_SIZE to key pages
storage/maria/maria_read_log.c:
  renamed --only-display to --display-only
2007-11-28 21:38:30 +02:00
unknown
6b3743f0aa Fixes for redo/undo logging of key pages
New extendable format for maria_log_control file
Fixed some compiler warnings


include/maria.h:
  Added maria_disable_logging() and maria_enable_logging()
mysql-test/include/maria_verify_recovery.inc:
  Updated tests now when key redo/undo works
mysql-test/r/maria-recovery.result:
  Updated tests now when key redo/undo works
storage/maria/ma_blockrec.c:
  Use unified CLR code
  Added rec_lsn for full pages
  Moved clr write hook to ma_key_recover.c
  Changed REDO code to keep pages pinned until undo
  Mark page_link's as changed
storage/maria/ma_blockrec.h:
  Moved write_hook_for_clr_end() to ma_key_recover.c
storage/maria/ma_check.c:
  Changed key check code to use PAGECACHE_READ_UNKNOWN_PAGE
  Fixed wrong warning when checking files after maria_pack
  When unpacking files, we have to use new keypos_to_recpos method
  When doing repair, we can disregard index key file pages in page cache
storage/maria/ma_commit.c:
  Added simple enable/disable logging functions
  (Needed for recovery)
storage/maria/ma_control_file.c:
  Make maria control file extendable without having to make it incompatible for older versions
storage/maria/ma_control_file.h:
  New error messages
  Added CONTROL_FILE_VERSION
storage/maria/ma_delete.c:
  Added redo/undo for key pages
  change_length -> changed_length to make things similar
  More comments & more DBUG
storage/maria/ma_key_recover.c:
  Unified CLR method
  Moved here write_hook_for_clr_end() and common keypage log functions
  Changed REDO to keep pages pinned until undo
  Changed UNDO code to change key_root under log mutex
storage/maria/ma_key_recover.h:
  New structures and functions
storage/maria/ma_loghandler.c:
  Include needed files
storage/maria/ma_open.c:
  Change maria_open() to use pread() instead of read()
storage/maria/ma_page.c:
  Fixed bug in key_del handling
  Clear pages if IDENTICAL_PAGES_AFTER_RECOVERY is defined
storage/maria/ma_pagecache.c:
  Indentation and spelling fixes
  More DBUG
  Added helper function: pagecache_block_link_to_buffer()
storage/maria/ma_pagecache.h:
  Added pagecache_block_link_to_buffer()
storage/maria/ma_recovery.c:
  Fixed state.changed
  Fixed that REDO keeps pages pinned until UNDO
  Some bug fixes from previous commit
  Fixes for UNDO/REDO of key pages
storage/maria/ma_search.c:
  Fixed packing and storing of keys to provide more information to caller so
  that we can do efficent REDO logging of the changes.
storage/maria/ma_test1.c:
  Fixed bug with not initialized variable
storage/maria/ma_test2.c:
  Removed not used code
storage/maria/ma_test_all.res:
  Updated results
storage/maria/ma_test_all.sh:
  Changed one test to test more
  Removed timing tests as not relevant here
storage/maria/ma_test_recovery.expected:
  Updated test result after redo/undo if key pages works
storage/maria/ma_test_recovery:
  Updated test after redo/undo if key pages works
storage/maria/ma_write.c:
  Moved some general log functions to ma_key_recover.c
  Fixed some bugs in undo
  Moved ma_log_split() to _ma_split_page()
  Small changes in some function arguments to be able to do redo logging
storage/maria/maria_chk.c:
  disable logging while doing repair table
storage/maria/maria_def.h:
  New function prototypes
  Move some structs and functions to ma_key_recover.c
storage/maria/unittest/ma_control_file-t.c:
  Updated with patch from Sanja
  NOTE: This is not complete and need to be updated to new control file format
storage/maria/unittest/ma_test_loghandler-t.c:
  Fixed compiler warning
2007-11-20 17:42:16 +02:00
unknown
21fd2a5a36 First part of redo/undo for key pages
Added key_nr to st_maria_keydef for faster keyinfo->keynr conversion
For transactional tables, shift record number in keys up with 1 bit to have place to indicate if transid follows
Checksum for MyISAM now ignores NULL and not used part of VARCHAR
Renamed some variables that caused shadow compiler warnings
Moved extra() call when waiting for tables to not be used to after tables are removed from cache.
Fixed crashing bugs when using Maria TEMPORARY tables with TRUNCATE. Removed 'hack' code in sql directory to go around this bug.
pagecache_unlock_by_ulink() now has extra argument to say if page was changed.
Give error message if we fail to open control file
Mark page cache variables as not flushable


include/maria.h:
  Made min page cache larger (needed for pinning key page)
  Added key_nr to st_maria_keydef for faster keyinfo->keynr conversion
  Added write_comp_flag to move some runtime code to maria_open()
include/my_base.h:
  Added new error message to be used when handler initialization failed
include/my_global.h:
  Renamed dummy to swap_dummy to avoid conflicts with local 'dummy' variables
include/my_handler.h:
  Added const to some parameters
mysys/array.c:
  More DBUG
mysys/my_error.c:
  Fixed indentation
mysys/my_handler.c:
  Added const to some parameters
  Added missing error messages
sql/field.h:
  Renamed variables to avoid variable shadowing
sql/handler.h:
  Renamed parameter to avoid variable name conflict
sql/item.h:
  Renamed variables to avoid variable shadowing
sql/log_event_old.h:
  Renamed variables to avoid variable shadowing
sql/set_var.h:
  Renamed variables to avoid variable shadowing
sql/sql_delete.cc:
  Removed maria hack for temporary tables
  Fixed indentation
sql/sql_table.cc:
  Moved extra() call when waiting for tables to not be used to after tables are removed from cache.
  This was needed to ensure we don't do a PREPARE_FOR_DROP or similar call while the table is still in use.
sql/table.cc:
  Copy page_checksum from share
  Removed Maria hack
storage/maria/Makefile.am:
  Added new files
storage/maria/ha_maria.cc:
  Renamed records -> record_count and info -> create_info to avoid variable name conflicts
  Mark page cache variables as not flushable
storage/maria/ma_blockrec.c:
  Moved _ma_unpin_all_pages() to ma_key_recover.c
  Moved init of info->pinned_pages to ma_open.c
  Moved _ma_finalize_row() to maria_key_recover.h
  Renamed some variables to avoid variable name conflicts
  Mark page_link.changed for blocks we change directly
  Simplify handling of undo link when writing LOGREC_UNDO_ROW_INSERT (old code crashed when having redo for index)
storage/maria/ma_blockrec.h:
  Removed extra empty line
storage/maria/ma_checkpoint.c:
  Remove not needed trnman.h
storage/maria/ma_close.c:
  Free pinned pages (which are now always allocated)
storage/maria/ma_control_file.c:
  Give error message if we fail to open control file
storage/maria/ma_delete.c:
  Changes for redo logging (first part, logging of underflow not yet done)
  - Log undo-key-delete
  - Log delete of key
  - Updated arguments to _ma_fetch_keypage(), _ma_dispose(), _ma_write_keypage(), _ma_insert()
  - Added new arguments to some functions to be able to write redo information
  - Mark key pages as changed when we write with PAGECACHE_LOCK_LEFT_WRITELOCKED
  
  Remove one not needed _ma_write_keypage() in d_search() when upper level will do the write anyway
  Changed 2 bmove_upp() to bmove() as this made code easer to understand
  More function comments
  Indentation fixes
storage/maria/ma_ft_update.c:
  New arguments to _ma_write_keypage()
storage/maria/ma_loghandler.c:
  Fixed some DBUG_PRINT messages
  Simplify code
  Added new log entrys for key page redo
  Renamed some variables to avoid variable name shadowing
storage/maria/ma_loghandler.h:
  Moved some defines here
  Added define for storing key number on key pages
  Added new translog record types
  Added enum for type of operations in LOGREC_REDO_INDEX
storage/maria/ma_open.c:
  Always allocate info.pinned_pages (we need now also for normal key page usage)
  Update keyinfo->key_nr
  Added virtual functions to convert record position o number to be stored on key pages
  Update keyinfo->write_comp_flag to value of search flag to be used when writing key
storage/maria/ma_page.c:
  Added redo for key pages
  - Extended _ma_fetch_keypage() with type of lock to put on page and address to used MARIA_PINNED_PAGE
  - _ma_fetch_keypage() now pin's pages if needed
  - Extended _ma_write_keypage() with type of locks to be used
  - ma_dispose() now locks info->s->state.key_del from other threads
  - ma_dispose() writes redo log record
  - ma_new() locks info->s->state.key_del from other threads if it was used
  - ma_new() now pins read page
  
  Other things:
  - Removed some not needed arguments from _ma_new() and _ma_dispose)
  - Added some new variables to simplify code
  - If EXTRA_DEBUG is used, do crc on full page to catch not unitialized bytes
storage/maria/ma_pagecache.h:
  Applied patch from Sanja to add extra argument to pagecache_unlock_by_ulink() to mark if page was changed
  Added some defines for pagecache priority levels that one can use
storage/maria/ma_range.c:
  Added new arguments for call to _ma_fetch_keypage()
storage/maria/ma_recovery.c:
  - Added hooks for new translog types:
    REDO_INDEX, REDO_INDEX_NEW_PAGE, REDO_INDEX_FREE_PAGE, UNDO_KEY_INSERT, UNDO_KEY_DELETE and
    UNDO_KEY_DELETE_WITH_ROOT.
  - Moved variable declarations to start of function (portability fixes)
  - Removed some not needed initializations
  - Set only relevant state changes for each redo/undo entry
storage/maria/lockman.c:
  Removed end space
storage/maria/ma_check.c:
  Removed end space
storage/maria/ma_create.c:
  Removed end space
storage/maria/ma_locking.c:
  Removed end space
storage/maria/ma_packrec.c:
  Removed end space
storage/maria/ma_pagecache.c:
  Removed end space
storage/maria/ma_panic.c:
  Removed end space
storage/maria/ma_rt_index.c:
  Added new arguments for call to _ma_fetch_keypage(), _ma_write_keypage(), _ma_dispose() and _ma_new()
  Fixed indentation
storage/maria/ma_rt_key.c:
  Added new arguments for call to _ma_fetch_keypage()
storage/maria/ma_rt_split.c:
  Added new arguments for call to _ma_new()
  Use new keypage header
  Added new arguments for call to _ma_write_keypage()
storage/maria/ma_search.c:
  Updated comments & indentation
  Added new arguments for call to _ma_fetch_keypage()
  Made some variables and arguments const
  Added virtual functions for converting row position to number to be stored in key
  use MARIA_RECORD_POS of record position instead of my_off_t
  Record in MARIA_KEY_PARAM how page was changed one key insert (needed for REDO)
storage/maria/ma_sort.c:
  Removed end space
storage/maria/ma_statrec.c:
  Updated arguments for call to _ma_rec_pos()
storage/maria/ma_test1.c:
  Fixed too small buffer to init_pagecache()
  Fixed bug when using insert_count and test_flag
storage/maria/ma_test2.c:
  Use more resonable pagecache size
  Remove not used code
  Reset blob_length to fix wrong output message
storage/maria/ma_test_all.sh:
  Fixed wrong test
storage/maria/ma_write.c:
  Lots of new code to handle REDO of key pages
  No logic changes because of REDO code, mostly adding new arguments and adding new code for logging 
  
  Added new arguments for calls to _ma_fetch_keypage(), _ma_write_keypage() and similar functions
  Move setting of comp_flag in ma_ck_wrte_btree() from runtime to maria_open()
  Zerofill new used pages for:
  - To remove possible sensitive data left in buffer
  - To get idenitical data on pages after running redo
  - Better compression of pages if archived
storage/maria/maria_chk.c:
  Added information if table is crash safe
storage/maria/maria_def.h:
  New virtual function to convert between record position on key and normal record position
  Aded mutex and extra variables to handle locking of share->state.key_del
  Moved some structure variables to get things more aligned
  Added extra arguments to MARIA_KEY_PARAM to be able to remember what was changed on key page on key insert
  Added argument to MARIA_PINNED_PAGE to indicate if page was changed
  Updated prototypes for functions
  Added some structures for signaling changes in REDO handling
storage/maria/unittest/ma_pagecache_single.c:
  Updated arguments for changed function calls
storage/myisam/mi_check.c:
  Made calc_check_checksum virtual
storage/myisam/mi_checksum.c:
  Update checksums to ignore null columns
storage/myisam/mi_create.c:
  Mark if table has null column (to know when we have to use mi_checksum())
storage/myisam/mi_open.c:
  Added virtual function for calculating checksum to be able to easily ignore NULL fields
storage/myisam/mi_test2.c:
  Fixed bug
storage/myisam/myisamdef.h:
  Added virtual function for calculating checksum during check table
  Removed ha_key_cmp() as this is in handler.h
storage/maria/ma_key_recover.c:
  New BitKeeper file ``storage/maria/ma_key_recover.c''
storage/maria/ma_key_recover.h:
  New BitKeeper file ``storage/maria/ma_key_recover.h''
storage/maria/ma_key_redo.c:
  New BitKeeper file ``storage/maria/ma_key_redo.c''
2007-11-14 19:08:06 +02:00
unknown
df30832d11 Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  mysql.com:/home/my/mysql-maria


client/mysqladmin.cc:
  Auto merged
include/maria.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/r/maria.result:
  Auto merged
server-tools/instance-manager/listener.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/maria/ma_bitmap.c:
  Auto merged
storage/maria/ma_blockrec.c:
  Auto merged
storage/maria/ma_blockrec.h:
  Auto merged
storage/maria/ma_check.c:
  Auto merged
storage/maria/ma_create.c:
  Auto merged
storage/maria/ma_delete.c:
  Auto merged
storage/maria/ma_loghandler.h:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_search.c:
  Auto merged
storage/maria/ma_sort.c:
  Auto merged
storage/maria/ma_test2.c:
  Auto merged
storage/maria/ma_test_recovery.expected:
  Auto merged
storage/maria/ma_write.c:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/maria_pack.c:
  Auto merged
include/my_base.h:
  Trivial manual merge
libmysql/Makefile.shared:
  Trivial manual merge
sql/sql_yacc.yy:
  Manual merge
storage/maria/ha_maria.cc:
  Trivial manual merge
storage/maria/ma_page.c:
  Trivial manual merge
storage/maria/maria_def.h:
  Trivial manual merge
2007-10-10 08:21:06 +03:00
unknown
496741d576 Moved randomize and my_rnd under mysys
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''
2007-10-09 21:09:50 +03:00
unknown
791b0aa081 WL#3071 - Maria checkpoint
* Preparation for having a background checkpoint thread:
frequency of checkpoint taken by that thread is now configurable
by the user: global variable maria_checkpoint_frequency, in seconds,
default 30 (checkpoint every 30th second); 0 means no checkpoints
(and thus no background thread, thus no background flushing, that
will probably only be used for testing).
* Don't take checkpoints in Recovery if it didn't do anything
significant; thus no checkpoint after a clean shutdown/restart. The
only checkpoint which is never skipped is the one at shutdown.
* fix for a test failure (after-merge fix)


include/maria.h:
  new variable
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
  result update
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
  position update (=after merge fix, as this position was already changed
  into 5.1 and not merged here, causing test to fail)
storage/maria/ha_maria.cc:
  Checkpoint's frequency is now configurable by the user:
  global variable maria_checkpoint_frequency. Changing it on the fly
  requires us to shutdown/restart the background checkpoint thread,
  as the loop done in that thread assumes a constant checkpoint
  interval. Default value is 30: a checkpoint every 30 seconds (yes, I
  know, physicists will remind that it should be named "period" then).
  ha_maria now asks for a background checkpoint thread when it starts,
  but this is still overruled (disabled) in ma_checkpoint_init().
storage/maria/ma_checkpoint.c:
  Checkpoint's frequency is now configurable by the user: background thread
  takes a checkpoint every maria_checkpoint_interval-th second.
  If that variable is 0, no checkpoints are taken.
  Note, I will enable the background thread only in a later changeset.
storage/maria/ma_recovery.c:
  Don't take checkpoints at the end of the REDO phase and at the end of
  Recovery if Recovery didn't make anything significant (didn't open
  any tables, didn't rollback any transactions).
  With this, after a clean shutdown, Recovery shouldn't take any
  checkpoint, which makes starting faster (we save a few fsync()s of
  the log and control file).
2007-10-09 10:38:31 +02:00
unknown
4eb383e06c After merge fixes. Applied changes made in myisam manually to maria.
storage/maria/ma_test1.c:
  After merge fixes. Applied changes made in myisam manually to maria.
  
  Fixed memory leak.
storage/maria/ma_test2.c:
  After merge fixes. Applied changes made in myisam manually to maria.
  
  Fixed memory leak.
2007-10-04 20:33:42 +03:00
unknown
f7b766c029 Added maria_commit() and maria_begin() to be used with external tests
Now ma_test1 -M -T and ma_test2 -M -T produces readable, applyable logs

Note: The .MAD file is not binary identical after applying redo compare to a an original file.
(This is becasue we don't have full information which function called PURGE_REDO_BLOCKS).
To verify if a file was correctly applied, we now instead compare row checksums


BitKeeper/etc/ignore:
  added storage/maria/tmp/*
include/maria.h:
  Added maria_commit() and maria_begin() to be used with external tests
storage/maria/ha_maria.cc:
  Ensure maria_def. is read in C mode
storage/maria/ma_blockrec.c:
  Fixed redo handling.
  _ma_apply_redo_purge_blocks() updated to handle any number of purged blocks
  Removed code to make data file idenitcal after redo (can't easily be done). See changeset comments
  
  Now ma_test1 -M -T and ma_test2 -M -T produces readable, applyable logs
storage/maria/ma_commit.c:
  More DBUG statements
  Moved variable declaration to start of function (portability fix)
  Added helper functions 'maria_commit()' and 'maria_begin()'
storage/maria/ma_loghandler.c:
  Fixed wrong REDO_PURGE_BLOCKS initialization
storage/maria/ma_recovery.c:
  Added UNDO_ROW_UPDATE
  Removed wrong setting of lsn (there was no lsn at the used position)
  Fixed REDO_PURGE_BLOCKS to handle any number of blocks
storage/maria/ma_test1.c:
  Added transaction support (via maria_begin() & maria_commit()) to get a log that can be applied with maria_read_log
storage/maria/ma_test2.c:
  Added transaction support (via maria_begin() & maria_commit()) to get a log that can be applied with maria_read_log
storage/maria/ma_test_recovery:
  Create temporary files in maria/tmp
  Verify files with checksums instead of byte comparisons
storage/maria/maria_chk.c:
  When using with -dss we only get  filename, records and checksum.
  This is useful to do a quick comparision if a files is identical to another one.
storage/maria/maria_def.h:
  Added ma_commit()
storage/maria/maria_read_log.c:
  Added --help
2007-08-29 09:03:10 +03:00
unknown
a3d2ae4648 merging MyISAM changes into Maria (not done in 5.1->maria merge of
Jul 7th). "maria.test" and "ps_maria.test" still fail;
"ma_test_all" starts failing (MyISAM has the same issue see BUG#30094).


include/maria.h:
  merging MyISAM changes into Maria
mysys/mf_keycache.c:
  mi_test_all showed "floating point exception", this was already
  fixed in the latest 5.1, importing fix.
sql/item_xmlfunc.cc:
  compiler warning (already fixed in latest 5.1)
storage/maria/ha_maria.cc:
  merging MyISAM changes into Maria. See #ifdef ASK_MONTY.
storage/maria/ha_maria.h:
  merging MyISAM changes into Maria
storage/maria/ma_cache.c:
  merging MyISAM changes into Maria
storage/maria/ma_check.c:
  merging MyISAM changes into Maria
storage/maria/ma_create.c:
  merging MyISAM changes into Maria
storage/maria/ma_dynrec.c:
  merging MyISAM changes into Maria
storage/maria/ma_extra.c:
  merging MyISAM changes into Maria
storage/maria/ma_ft_boolean_search.c:
  merging MyISAM changes into Maria
storage/maria/ma_ft_nlq_search.c:
  merging MyISAM changes into Maria
storage/maria/ma_info.c:
  merging MyISAM changes into Maria
storage/maria/ma_key.c:
  merging MyISAM changes into Maria
storage/maria/ma_loghandler.c:
  compiler warning (part->length is size_t)
storage/maria/ma_open.c:
  merging MyISAM changes into Maria
storage/maria/ma_preload.c:
  merging MyISAM changes into Maria
storage/maria/ma_range.c:
  merging MyISAM changes into Maria
storage/maria/ma_rkey.c:
  merging MyISAM changes into Maria
storage/maria/ma_rt_index.c:
  merging MyISAM changes into Maria
storage/maria/ma_rt_key.c:
  merging MyISAM changes into Maria
storage/maria/ma_rt_split.c:
  merging MyISAM changes into Maria
storage/maria/ma_search.c:
  merging MyISAM changes into Maria
storage/maria/ma_sort.c:
  merging MyISAM changes into Maria
storage/maria/maria_def.h:
  merging MyISAM changes into Maria
2007-07-27 12:06:39 +02:00
unknown
8ba21c616e Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.prod


BitKeeper/etc/ignore:
  auto-union
include/maria.h:
  Auto merged
include/my_base.h:
  Auto merged
mysql-test/include/ps_conv.inc:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/mf_iocache.c:
  Auto merged
mysys/mf_tempfile.c:
  Auto merged
mysys/my_error.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_open.c:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/lex.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ha_maria.h:
  Auto merged
storage/maria/ma_bitmap.c:
  Auto merged
storage/maria/ma_blockrec.h:
  Auto merged
storage/maria/ma_create.c:
  Auto merged
storage/maria/ma_dynrec.c:
  Auto merged
storage/maria/ma_loghandler.h:
  Auto merged
storage/maria/ma_loghandler_lsn.h:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_pagecache.c:
  Auto merged
storage/maria/ma_pagecache.h:
  Auto merged
storage/maria/ma_test1.c:
  Auto merged
storage/maria/ma_test2.c:
  Auto merged
storage/maria/ma_update.c:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Auto merged
storage/myisam/ft_stopwords.c:
  Auto merged
storage/myisam/mi_close.c:
  Auto merged
support-files/compiler_warnings.supp:
  Auto merged
mysys/mf_keycache.c:
  Pulled from mysql-maria tree, manual merge.
mysys/my_handler.c:
  Pulled from mysql-maria tree, manual merge.
mysys/my_symlink2.c:
  Pulled from mysql-maria tree, manual merge.
sql/mysqld.cc:
  Pulled from mysql-maria tree, manual merge.
sql/sql_table.cc:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_blockrec.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_check.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_close.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_loghandler.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/maria_def.h:
  Pulled from mysql-maria tree, manual merge.
2007-07-04 12:20:53 +03:00
unknown
631ecaabea Merged with mysql-5.1 main tree.
BUILD/compile-pentium-debug-max:
  Added definition after macro was removed from main tree. This will
  be fixed back in main tree later.
2007-07-02 20:45:15 +03:00
unknown
e2904e77f1 Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  mysql.com:/home/my/mysql-maria


include/maria.h:
  Auto merged
sql/handler.h:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ma_close.c:
  Auto merged
storage/maria/ma_loghandler.c:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_pagecache.c:
  Auto merged
storage/maria/ma_pagecache.h:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/ma_blockrec.c:
  Manual merge (No changes)
storage/maria/ma_check.c:
  Manual merge
storage/maria/ma_create.c:
  Manual merge
storage/maria/ma_delete_all.c:
  Manual merge
storage/maria/ma_init.c:
  Manual merge (no changes)
storage/maria/ma_test_all.sh:
  Manual merge
storage/maria/maria_def.h:
  Manual merge
2007-07-01 16:48:57 +03:00
unknown
d6f2fda680 Fixed REPAIR/CHECK/ANALYZE TABLE for tables with new BLOCK-ROW format.
Fixed maria_chk to repair BLOCK-ROW tables.
Added CREATE options ROW_FORMAT=PAGE & TRANSACTIONAL= 0|1
More DBUG information in a lot of functions
Some minor code cleanups
Enable handler errors earlier for better clear text error messages at handler startup / standalone usage.
Don't print NULL strings in my_create_with_symlink();  Fixes core dump when used with --debug


include/maria.h:
  Added extra variables needed for REPAIR with BLOCK records
include/my_base.h:
  Added argument for opening copy of maria table without a shared object
include/my_handler.h:
  Prototypes for my_handler_error_register() & my_handler_error_unregister()
include/pagecache.h:
  Added PAGECACHE_READ_UNKNOWN_PAGE
mysql-test/include/ps_conv.inc:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/maria.result:
  Moved some things to maria-connect.test
  Updared results as REPAIR now works
  Added tests for creation option TRANSACTIONAL
mysql-test/r/ps_2myisam.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_3innodb.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_4heap.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_5merge.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_7ndb.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_maria.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/t/maria.test:
  Moved some things to maria-connect.test
  Updared results as REPAIR now works
  Added tests for creation option TRANSACTIONAL
mysys/mf_iocache.c:
  More debugging
mysys/mf_tempfile.c:
  Added missing close()
mysys/my_error.c:
  init_glob_errs() is now done in my_init()
mysys/my_handler.c:
  Added functions to initialize handler error messages
mysys/my_init.c:
  Moevd init_glob_errs() here.
mysys/my_open.c:
  More comments
  More debugging
  Code cleanup (join multiple code paths) and indentation fixes. No change in logic.
mysys/my_symlink2.c:
  Don't print NULL strings
sql/handler.cc:
  Added printing of PAGE row type
  Moved out initializing of handler errors to allow handler to give better error messages at startup
sql/handler.h:
  ROW_TYPE_PAGES -> ROW_TYPE_PAGE
sql/lex.h:
  Added 'PAGE' and 'TRANSACTIONAL'
sql/mysqld.cc:
  Initialize handler error messages early to get better error messages from handler startup
sql/sql_show.cc:
  ROW_TYPE_PAGES -> ROW_TYPE_PAGE
sql/sql_table.cc:
  Removed not needed initializer
sql/sql_yacc.yy:
  Added CREATE options ROW_FORMAT=PAGE and TRANSACTIONAL=[0|1]
sql/table.cc:
  Store transactional flag in .frm
  More comments
sql-bench/example:
  Better example
sql/table.h:
  Added transactional table option
storage/maria/ha_maria.cc:
  More debug information
  Enable REPAIR
  Detect usage of TRANSACTIONAL table option
storage/maria/ma_bitmap.c:
  More comments (from Guilhem)
storage/maria/ma_blockrec.c:
  SANITY_CHECK -> SANITY_CHECKS (fixed typo)
  Write out pages on delete even if there is no rows. (Fixed problem with REPAIR)
  Removed some ASSERTS to runtime checks (for better REPAIR)
  Fixed bug when scanning rows
  More DBUG information
storage/maria/ma_check.c:
  Partial rewrite to allow REPAIR of BLOCK/PAGE format.
  Repair of BLOCK format rows is for now only done with 'maria_repair()' (= repair through key cache)
  The new logic to repair rows with BLOCK format is:
  
  - Create new, unrelated MARIA_HA of the table
  - Create new datafile and associate it with new handler
  - Reset all statistic information in new handler
  - Copy all data to new handler with normal write operations
  - Move state of new handler to old handler
  - Close new handler
  - Close data file in old handler
  - Rename old data file to new data file.
  - Reopen data file in old handler
storage/maria/ma_close.c:
  REmoved not needed block
storage/maria/ma_create.c:
  Swap arguments to _ma_initialize_data_file()
storage/maria/ma_delete_all.c:
  Split maria_delete_all_rows() to two functions to allow REPAIR to easily reset all status information.
storage/maria/ma_dynrec.c:
  Added checksum argument to _ma_rec_check (multi-thread fix)
storage/maria/ma_info.c:
  Indentation fix
storage/maria/ma_init.c:
  Register error message to get better error message on init and when using as standalone module.
storage/maria/ma_loghandler.c:
  Fixed typo that disabled some error detection by valgrind
storage/maria/ma_open.c:
  Added 'calc_check_checksum()'
  Don't log things during repair
  Added option HA_OPEN_COPY to allow one to open a Maria table with an independent share (required by REPAIR)
storage/maria/ma_pagecache.c:
  Fixed some compiler warnings
  Added support for PAGECACHE_READ_UNKNOWN_PAGE (used for scanning file without knowing page types)
storage/maria/ma_test_all.sh:
  More test of REPAIR
storage/maria/ma_update.c:
  Optimized checksum code
storage/maria/maria_chk.c:
  Use DBUG_SET_INITIAL() to get DBUG to work with --parallel-repair
  Ensure we always use maria_repair() for BLOCK format (for now)
  More DBUG information
storage/maria/maria_def.h:
  For now, always run with more checkings (SANITY_CHECKS)
  Added share->calc_check_checksum to be used with REPAIR / CHECK table.
  Swaped arguments to _ma_initialize_data_file()
storage/myisam/ft_stopwords.c:
  Added DBUG information
mysql-test/r/maria-connect.result:
  New BitKeeper file ``mysql-test/r/maria-connect.result''
mysql-test/t/maria-connect.test:
  New BitKeeper file ``mysql-test/t/maria-connect.test''
2007-07-01 16:20:57 +03:00
unknown
704b39a158 - moving pagecache.h from include/ to storage/maria as it is Maria-
specific
- adding TRN::first_undo_lsn, needed to know when a log can be deleted;
this variable must be set under log's mutex and that leads to setting
TRN::rec_lsn, TRN::undo_lsn and TRN::first_undo_lsn in a
inwrite_rec_hook; adding implementation of one hook for REDOs and one
for UNDOs. Thus translog_write_record() always uses TRN and so does
not need a short_id argument, can find it from TRN.
- Monty's patch for the last Valgrind error in the tree.
- Log handler's unit tests fail but Sanja says it's known


include/Makefile.am:
  pagecache.h moved and renamed
include/maria.h:
  pagecache.h moved and renamed
sql/handler.h:
  pagecache.h moved and renamed
storage/maria/Makefile.am:
  pagecache.h moved and renamed
storage/maria/ha_maria.cc:
  adding an assertion which sounds logical
storage/maria/ma_blockrec.c:
  trn->rec_lsn and trn->undo_lsn are now set via hooks inside the log
  record's writing; this allows to also set trn->first_undo_lsn
  needed to compute the log's low-water mark.
  The PAGERANGE_STORE_SIZE -> PAGE_STORE_SIZE is Monty's fix to a
  Valgrind error.
storage/maria/ma_loghandler.c:
  "tcb" renamed to "trn". Log handler now knows what is a transaction,
  and finds short_id from trn. trn's rec_lsn, undo_lsn, first_undo_lsn
  are now set by some inwrite_rec_hookS (one for REDOs, one for UNDOs).
  The HAVE_purify blocks are Monty's fix to a Valgrind error.
storage/maria/ma_loghandler.h:
  Log handler functions use TRN, that needs a forward declaration
storage/maria/ma_pagecache.c:
  pagecache.h was moved and renamed
storage/maria/ma_pagecache.h:
  pagecache.h was moved and renamed
storage/maria/ma_pagecaches.c:
  pagecache.h was moved and renamed
storage/maria/trnman.c:
  initializing some members of TRN.
storage/maria/trnman.h:
  TRN::first_undo_lsn needed for log's low-water mark calculation
  (which will serve to know which logs can be deleted)
storage/maria/unittest/ma_test_loghandler-t.c:
  translog_write_record() now needs a valid TRN
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  translog_write_record() now needs a valid TRN
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  translog_write_record() now needs a valid TRN
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  translog_write_record() now needs a valid TRN
storage/maria/unittest/test_file.h:
  pagecache.h was moved and renamed
2007-06-11 16:29:53 +02:00
unknown
42cde8a7b2 rec_lsn (first REDO LSN( is now given to the page cache on unpinning
Added maria_clone(), needed by future REPAIR code


storage/maria/unittest/ma_pagecache_consist.c:
  Change mode to -rw-rw-r--
storage/maria/unittest/lockman-t.c:
  Change mode to -rw-rw-r--
storage/maria/unittest/lockman1-t.c:
  Change mode to -rw-rw-r--
storage/maria/unittest/lockman2-t.c:
  Change mode to -rw-rw-r--
storage/maria/unittest/trnman-t.c:
  Change mode to -rw-rw-r--
include/maria.h:
  Added prototype for maria_clone (for future)
storage/maria/ha_maria.cc:
  Move filename to share structure
storage/maria/ma_blockrec.c:
  rec_lsn (first REDO LSN( is now given to the page cache on unpinning
  Removed impossible lock handling in get_head_or_tail_page()
  Changed calls ot translog_write_record() to remember rec_lsn
  Removed some logging in csse of not transactions
storage/maria/ma_delete.c:
  info->filename -> info->s->open_file_name
storage/maria/ma_loghandler.c:
  Indentation fixes
storage/maria/ma_open.c:
  Added maria_clone(), needed by future REPAIR code
storage/maria/ma_packrec.c:
  Fixed typo in comment
storage/maria/ma_pagecache.c:
  Added comment.
  Allow setting REC_LSN in case of read lock
storage/maria/ma_update.c:
  info->filename -> info->s->open_file_name
storage/maria/ma_write.c:
  info->filename -> info->s->open_file_name
storage/maria/maria_def.h:
  info->filename -> info->s->open_file_name
  Added have_rtree to simplify test in ma_clone()
storage/maria/maria_ftdump.c:
  info->filename -> info->s->open_file_name
storage/maria/maria_pack.c:
  info->filename -> info->s->open_file_name
storage/maria/trnman.h:
  Added rec_lsn
2007-06-07 01:01:43 +03:00
unknown
6686a3ee53 After merge fixes
Read blocks through page cache in check_block_record()
Don't read first bitmap on ma_open()
Don't require that a files block_size is equal to maria_block_size, if page cache is not setup yet.
Changed ma_test1, ma_test2, maria_chk and maria_pack to always create a page cache.
The above fixes so that ma_test_all now works again



BitKeeper/etc/ignore:
  added storage/maria/unittest/ma_pagecache_consist_1k-t-big storage/maria/unittest/ma_pagecache_consist_1kHC-t-big storage/maria/unittest/ma_pagecache_consist_1kRD-t-big storage/maria/unittest/ma_pagecache_consist_1kWR-t-big storage/maria/unittest/ma_pagecache_consist_64k-t-big storage/maria/unittest/ma_pagecache_consist_64kHC-t-big storage/maria/unittest/ma_pagecache_consist_64kRD-t-big storage/maria/unittest/ma_pagecache_consist_64kWR-t-big storage/maria/unittest/ma_pagecache_single_64k-t-big
include/maria.h:
  Added MARIA_MIN_PAGE_CACHE_SIZE
include/pagecache.h:
  Filedescriptors should be of type File
storage/maria/ma_bitmap.c:
  After merge fixes
  Create dummy bitmap on startup (can't read first bitmap becasue page cache may not be set up yet)
storage/maria/ma_blockrec.c:
  After merge fixes
storage/maria/ma_check.c:
  Use page cache to read rows-in-block rows.
  Don't initialize page cache; It's now done in maria_chk
storage/maria/ma_dynrec.c:
  Trivial code reorganization
storage/maria/ma_open.c:
  Don't give error for conflicting block size if page cache is not initalized.
  (Needed for maria_chk to be able to work on tables with different page sizes)
  After merge fixes
storage/maria/ma_page.c:
  Fix compiler warning
  Remove net needed asserts (Guranteed by ma_create())
storage/maria/ma_pagecache.c:
  Allow one to create a page cache with just one block
  (For trivail scan of table)
  Trivial code simplication
storage/maria/ma_test1.c:
  Always create a page cache (Maria now requires a page cache to work)
storage/maria/ma_test2.c:
  Always create a page cache (Maria now requires a page cache to work)
storage/maria/maria_chk.c:
  Remove command line options --maria_block_size and --pagecache_block_size.
  Set the global maria_block_size from the data file. This allows maria_chk to work with tables of different block sizes.
  Simply DESCRIPT handling; Allows us to remove one indentation level in maria_chk().
  Always initialize page cache if we are doing check/repair.
  (Most of the patch is reindentation of the code)
storage/maria/maria_def.h:
  After merge fix
storage/maria/maria_pack.c:
  Set maria_block_size based on the files block_size.
  Initalize page cache (needed for getting rows-in-blocks to works)
2007-04-19 18:48:36 +03:00
unknown
ac0f98dd5e Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  mysql.com:/home/my/mysql-maria


include/maria.h:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ma_bitmap.c:
  Auto merged
storage/maria/ma_check.c:
  Auto merged
storage/maria/ma_dynrec.c:
  Auto merged
storage/maria/ma_info.c:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_packrec.c:
  Auto merged
storage/maria/ma_page.c:
  Auto merged
storage/maria/ma_test1.c:
  Auto merged
storage/maria/ma_test2.c:
  Auto merged
storage/maria/ma_write.c:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/maria_pack.c:
  Auto merged
storage/maria/ma_blockrec.c:
  Manual merge
storage/maria/ma_close.c:
  Manual merge
storage/maria/maria_def.h:
  Manual merge
2007-04-19 16:22:58 +03:00
unknown
eb7d9500a9 Fixes after review of guilhem of block record patch
Short overview:
Changed a lot of variable, functions, defines and struct elements to use more readable names
More comments (mostly function and structure slot comments)

Other things:
Changed 'USE_WHOLE_KEY' to a big number to not interfer with long keys
Ensure that tail block are at least of size 'MIN_TAIL_SIZE'
Allow longer keys and key parts than before (don't limit Maria interface by HA_MAX_KEY_LENGTH)
Use ma_chsize() to write initial bitmap page
Added checking if using file with wrong block_size
Added issing types to type_names[] (for maria_chk -d)
Added maria_max_key_length()


include/maria.h:
  Changed maria_portable_size_char_ptr to portable_size_char_ptr and moved it to my_handler.h
  Removed not used variable maria_delay_rec_write.
  More comments
include/my_handler.h:
  Added portable_sizeof_char_ptr
include/myisam.h:
  Changed mi_portable_size_char_ptr to portable_size_char_ptr and moved it to my_handler.h
mysql-test/r/maria.result:
  Fix results when we now have a longer key length
mysql-test/t/maria.test:
  More tests
mysys/my_pread.c:
  Code cleanup
sql/net_serv.cc:
  Changed warning to note (as in main 5.1 tree) to avoid not critical failing tests
sql/sql_select.cc:
  Use portable_sizeof_char_ptr
storage/maria/ha_maria.cc:
  Added max_supported_key_length(), as this is not a trival function anymore
storage/maria/ha_maria.h:
  Moved max_supported_key_length(), as this is not a trival function anymore
storage/maria/ma_bitmap.c:
  Lots of new comments
  Added maria_bitmap_marker[] to mark 2 last bytes of each bitmap (for corruption detection)
  Trivial code changes (based on review comments)
storage/maria/ma_blockrec.c:
  More code comments
  Renamed _block_row() functions to _block_record()
  Trivial code changes, based on review comments
  Moved Code from maria_close() to _ma_end_block_record()
  Some function renames to make things more understandable
  DIR_ENTRY_OFFSET -> DIR_COUNT_OFFSET
  keybuff_used -> keyread_buff_used
  ma_recordpos_to_offset -> ma_recordpos_to_dir_entry
  Changed some 'rec' named variables to 'column'.
  Ensure that tail block are at least of size 'MIN_TAIL_SIZE'
storage/maria/ma_blockrec.h:
  More comments
  DIRCOUNT_SIZE -> DIR_COUNT_SIZE
  Added define for maira_bitmap_marker[]
  ma_recordpos_to_offset -> ma_recordpos_to_dir_entry
  xxx_block_row() -> xxx_block_record()
  Made _ma_read_bitmap_page() static
storage/maria/ma_check.c:
  More comments
  ma_recordpos_to_offset() -> ma_recordpos_to_dir_entry()
  DIR_ENTRY_OFFSET -> DIR_COUNT_OFFSET
  rec variables -> column variables
  recdef -> columndef
storage/maria/ma_checksum.c:
  rec -> column
  Avoid an 'if' in _ma_checksum() for the common case
storage/maria/ma_close.c:
  Moved resetting of info->dfile to ma_end_once_block_record()
storage/maria/ma_create.c:
  Some variable changes to make things more readable:
  recinfo -> columndef
  rec -> column
  rec_end -> end_column
  record_type -> datafile_type
  ma_recinfo_write() -> ma_columndef_write()
  Fixed wrong setting of 'data_file_length'; Now max_rows should be calculated correctly
  New check if too long key.
  Use ma_chsize() to write bitmap page.
storage/maria/ma_delete.c:
  keybuff_used -> keyread_buff_used
storage/maria/ma_dynrec.c:
  rec -> columndef
  rec_length -> column_length
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
  Better comment for _ma_read_rnd_dynamic_record()
storage/maria/ma_ft_eval.c:
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/maria/ma_ft_test1.c:
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/maria/ma_ft_update.c:
  keybuff_used -> keyread_buff_used
storage/maria/ma_info.c:
  More comments
storage/maria/ma_open.c:
  Added checking if using file with wrong block_size
  New checking of max_key_length
  rec -> columndef
  _ma_recinfo_write -> _ma_columndef_write
  Don't change block_size (as this is checked in ma_create())
  More comments
storage/maria/ma_packrec.c:
  Trivial code changes
  rec -> columndef
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/maria/ma_page.c:
  keybuff_used -> keyread_buff_used
storage/maria/ma_rkey.c:
  Removed not needded empty line
storage/maria/ma_rrnd.c:
  Removed not used variable
storage/maria/ma_rt_index.c:
  keybuff_used -> keyread_buff_used
storage/maria/ma_search.c:
  keybuff_used -> keyread_buff_used
  Trivial code changes
storage/maria/ma_sp_test.c:
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/maria/ma_test1.c:
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/maria/ma_test2.c:
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/maria/ma_update.c:
  Updated comment
storage/maria/ma_write.c:
  keybuff_used -> keyread_buff_used
storage/maria/maria_chk.c:
  Added missing types to type_names[]
  Removed not used variable
  rec -> columndef
  Replaced some numbers with define flags
storage/maria/maria_def.h:
  More comments
  Added 'MARIA_INDEX_MIN_OVERHEAD_SIZE'
  rec -> columndef
  keybuff_used -> keyread_buff_used
  _ma_recinfo_write -> _ma_culumndef_write
  _ma_recinfo_read -> _ma_columndef_read
  Changed 'USE_WHOLE_KEY' to a big number to not interfer with long keys
  Added maria_max_key_length()
storage/maria/maria_pack.c:
  Updated message strings
  rec -> columndef
  maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
  More comments
storage/myisam/ft_eval.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/ft_test1.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_checksum.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_create.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_dynrec.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_open.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_packrec.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_rkey.c:
  Unlock mutex also in case of error
storage/myisam/mi_test1.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_test2.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/myisampack.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/sp_test.c:
  mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
support-files/magic:
  Fixed typo
2007-04-19 13:18:56 +03:00
unknown
e10fe77b0a Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria.bak
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-test


include/maria.h:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/mf_keycaches.c:
  Auto merged
sql/handler.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
storage/maria/Makefile.am:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ma_bitmap.c:
  Auto merged
storage/maria/ma_check.c:
  Auto merged
storage/maria/ma_close.c:
  Auto merged
storage/maria/ma_dynrec.c:
  Auto merged
storage/maria/ma_extra.c:
  Auto merged
storage/maria/ma_info.c:
  Auto merged
storage/maria/ma_keycache.c:
  Auto merged
storage/maria/ma_locking.c:
  Auto merged
storage/maria/ma_loghandler.c:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_packrec.c:
  Auto merged
storage/maria/ma_page.c:
  Auto merged
storage/maria/ma_pagecache.c:
  Auto merged
storage/maria/ma_panic.c:
  Auto merged
storage/maria/ma_preload.c:
  Auto merged
storage/maria/ma_static.c:
  Auto merged
storage/maria/ma_test1.c:
  Auto merged
storage/maria/ma_test2.c:
  Auto merged
storage/maria/ma_test3.c:
  Auto merged
storage/maria/ma_write.c:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/maria_def.h:
  Auto merged
storage/maria/maria_ftdump.c:
  Auto merged
storage/maria/maria_pack.c:
  Auto merged
sql/handler.cc:
  merge
storage/maria/ma_blockrec.c:
  merge
storage/maria/ma_delete_all.c:
  merge
2007-04-16 13:19:43 +03:00
unknown
0abffa05a6 Fixed that maria.test works
BUILD/SETUP.sh:
  Update from 5.1
include/maria.h:
  Moved structs into size order
mysql-test/include/varchar.inc:
  Fixed error numbers (as in 5.1)
mysql-test/mysql-test-run.pl:
  Updated from 5.1
  Create a dummy mysql.err file if using --valgrind --debug
mysql-test/lib/init_db.sql:
  Update from 5.1
mysql-test/lib/mtr_cases.pl:
  Update from 5.1
mysql-test/lib/mtr_diff.pl:
  Update from 5.1
mysql-test/lib/mtr_gcov.pl:
  Update from 5.1
mysql-test/lib/mtr_gprof.pl:
  Update from 5.1
mysql-test/lib/mtr_im.pl:
  Update from 5.1
mysql-test/lib/mtr_io.pl:
  Update from 5.1
mysql-test/lib/mtr_match.pl:
  Update from 5.1
mysql-test/lib/mtr_misc.pl:
  Update from 5.1
mysql-test/lib/mtr_process.pl:
  Update from 5.1
mysql-test/lib/mtr_report.pl:
  Update from 5.1
mysql-test/lib/mtr_stress.pl:
  Update from 5.1
mysql-test/lib/mtr_timer.pl:
  Update from 5.1
mysql-test/lib/mtr_unique.pl:
  Update from 5.1
mysql-test/r/maria.result:
  Updated results. The reason for the new results are:
  
  - Maria doesn't support REPAIR TABLE or OPTIMIZE table yet
  - Some statistics information is different, so MySQL prefers index reads instead of table scans
  - No support for concurrent writes in the default BLOCK_RECORD mode
  - No support for different KEY_BLOCK sizes (will not be fixed)
mysql-test/t/disabled.def:
  Enable maria test
mysql-test/t/maria.test:
  No support for concurrent writes in the default BLOCK_RECORD mode
  No support for different KEY_BLOCK sizes (will not be fixed)
mysql-test/t/myisam.test:
  Fix to be able to run with --extern
mysql-test/t/query_cache_notembedded.test:
  Fix to be able to run with --extern
sql/filesort.cc:
  Fixed compiler warning
sql/handler.cc:
  Use new error message (as in 5.1)
sql/share/errmsg.txt:
  Update error messages (as in 5.1)
sql/slave.cc:
  Fixed compiler warning
sql/slave.h:
  Fixed compiler warning
sql/sql_table.cc:
  Fixed compiler warning
storage/maria/ha_maria.cc:
  Added better scan_time()
  Disble REPAIR on BLOCK_RECORD tables
  Added rnd_end() to free memory after scan
  Don't pack numerical primary keys
  Don't allow fast alter table if row type changes
storage/maria/ha_maria.h:
  Added get_row_type(), scan_time() and rnd_end()
BitKeeper/etc/ignore:
  Added storage/maria/unittest/mf_pagecache_consist_1k-t-big storage/maria/unittest/mf_pagecache_consist_1kHC-t-big storage/maria/unittest/mf_pagecache_consist_1kRD-t-big storage/maria/unittest/mf_pagecache_consist_1kWR-t-big storage/maria/unittest/mf_pagecache_consist_64k-t-big storage/maria/unittest/mf_pagecache_consist_64kHC-t-big storage/maria/unittest/mf_pagecache_consist_64kRD-t-big storage/maria/unittest/mf_pagecache_consist_64kWR-t-big storage/maria/unittest/mf_pagecache_single_64k-t-big to the ignore list
storage/maria/ma_bitmap.c:
  Fixed some bugs found with maria.test
  Added more DBUG_PRINT and some more comments
storage/maria/ma_blockrec.c:
  Fixed some bugs found with maria.test
  Simplified code
  More comments
storage/maria/ma_blockrec.h:
  Added DBUG_ASSERT()
storage/maria/ma_check.c:
  Don't check record data links with block_records
  Update state.changed properly
storage/maria/ma_checksum.c:
  Fixed bug in checksum handling (only first field was calculated)
storage/maria/ma_create.c:
  Set rec->fill_length properly
  Added extra testing needed for BLOCK_RECORD
  Fixed bug in unlock of not locked mutex
  Fixed memory leak
storage/maria/ma_delete.c:
  Update state.changed
storage/maria/ma_delete_all.c:
  Update state.changed
storage/maria/ma_extra.c:
  Disable caching of rows if we are using BLOCK_RECORD
  (scan_init will enable caching of rows when using BLOCK_RECORD)
storage/maria/ma_info.c:
  Added data_file_type
storage/maria/ma_search.c:
  Fixed bug with signed bytes
storage/maria/ma_test2.c:
  Fixed wrong pointer handling (caused crash on 64 bit machines)
storage/maria/ma_write.c:
  Added DBUG_ statements
storage/maria/maria_def.h:
  Added STATE_NOT_OPTIMIZED_ROWS
storage/myisam/mi_create.c:
  Fixed bug with unlocking of not locked mutex (in case of error condition)
storage/myisam/mi_test2.c:
  Fixed wrong pointer handling (caused crash on 64 bit machines)
2007-04-05 14:38:05 +03:00
unknown
39d64a1d25 Pagecache integration for review.
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''
2007-04-04 23:37:09 +03:00
unknown
ca42b36cc9 Merge with new version
storage/myisam/mi_rsamepos.c:
  Auto merged
include/m_string.h:
  Automatic merge
include/maria.h:
  manual merge
include/my_base.h:
  Automatic merge
include/my_sys.h:
  Automatic merge
mysys/mf_keycache.c:
  Automatic merge
mysys/my_pread.c:
  Automatic merge
sql/filesort.cc:
  Automatic merge
sql/gen_lex_hash.cc:
  Automatic merge
sql/mysqld.cc:
  Automatic merge
sql/uniques.cc:
  Automatic merge
storage/maria/Makefile.am:
  manual_merge
storage/maria/ha_maria.cc:
  Automatic merge
storage/maria/ma_check.c:
  manual merge
storage/maria/ma_close.c:
  manual merge
storage/maria/ma_create.c:
  manual merge
storage/maria/ma_delete.c:
  manual merge
storage/maria/ma_delete_all.c:
  Automatic merge
storage/maria/ma_dynrec.c:
  manual merge
storage/maria/ma_extra.c:
  Automatic merge
storage/maria/ma_ft_boolean_search.c:
  manual merge
storage/maria/ma_init.c:
  Automatic merge
storage/maria/ma_key.c:
  manual merge
storage/maria/ma_keycache.c:
  manual merge
storage/maria/ma_locking.c:
  Automatic merge
storage/maria/ma_open.c:
  manual merge
storage/maria/ma_packrec.c:
  manual merge
storage/maria/ma_page.c:
  Automatic merge
storage/maria/ma_range.c:
  Automatic merge
storage/maria/ma_rkey.c:
  manual merge
storage/maria/ma_rsamepos.c:
  manual merge
storage/maria/ma_sort.c:
  manual merge
storage/maria/ma_statrec.c:
  Automatic merge
storage/maria/ma_test2.c:
  Automatic merge
storage/maria/ma_test3.c:
  Automatic merge
storage/maria/ma_test_all.sh:
  Use new version
storage/maria/ma_unique.c:
  Automatic merge
storage/maria/ma_update.c:
  Automatic merge
storage/maria/ma_write.c:
  manual merge
storage/maria/maria_chk.c:
  manual merge
storage/maria/maria_def.h:
  manual merge
  Added length pointer to _ma_page_get_block_info()
storage/maria/maria_ftdump.c:
  Automatic merge
storage/maria/maria_pack.c:
  manual merge
storage/myisam/mi_check.c:
  Automatic merge
storage/myisam/mi_create.c:
  Automatic merge
storage/myisam/mi_test2.c:
  Automatic merge
storage/myisam/sort.c:
  Automatic merge
2007-01-23 21:13:26 +02:00
unknown
345959c660 Implementation of rows-in-block
- Fixes some things missed in myisam->maria port
- Moved variables that holds the state for the current row to 'cur_row'
- Changed most uchar * to byte * to be able to remove a lot of casts
- Removed RAID support
- Added CHECK for rows-in-block
- Added allocate_dynamic() for easier usage of dynamic rows when we know how many entries we will need
- Reorder columns after CREATE for more optimal row storage (for rows-in-block)
- Removed flag 'RRND_PRESERVER_LASTINX' (not needed)
- Extended ma_test_all.sh to test more completely all row formats
- New structs and variables to hold rows-in-block and bitmap information
- Added org_data_file_type in header to allow easy restore of old record format when doing maria_pack / maria_chk -u
- More virtual functions to handle different row types
- Pointer to row is now MARIA_RECORD_POS instead of my_off_t
- New header signature for MARIA index files
- Fixed bugs in ma_test1.c and ma_test2.c
- All key and row blocks are now of same size
- We now only have one link chain for deleted key blocks


include/m_string.h:
  Define bzero_if_purify
include/maria.h:
  Implementation of rows-in-block
include/my_base.h:
  Implementation of rows-in-block
include/my_handler.h:
  Cleanup macros
  Added size_to_store_key_length()
include/my_sys.h:
  Added 'allocate_dynamic()'
include/myisamchk.h:
  Implementation of rows-in-block
mysys/array.c:
  Added allocate_dynamic()
mysys/mf_keycache.c:
  Moved DBUG_ENTER to it's right position
mysys/my_pread.c:
  Ensure my_errno is always set
sql/filesort.cc:
  Fixed some compiler warnings
sql/gen_lex_hash.cc:
  Removed not needed 'inline'
sql/ha_maria.cc:
  Implementation of rows-in-block
  Fixed compiler warnings
sql/mysqld.cc:
  Fixed setting of wrong variable
sql/uniques.cc:
  Fixed compiler warnings
storage/maria/Makefile.am:
  Implementation of rows-in-block
storage/maria/ma_check.c:
  Removed RAID functions
  Added support for CHECK of rows-in-blocks rows
storage/maria/ma_checksum.c:
  Implementation of rows-in-block
storage/maria/ma_close.c:
  Implementation of rows-in-block
storage/maria/ma_create.c:
  Implementation of rows-in-block:
  - Reorder columns
  - All key blocks are now of same size
  - Removed old RAID support
storage/maria/ma_dbug.c:
  Implementation of rows-in-block
storage/maria/ma_delete.c:
  Implementation of rows-in-block
storage/maria/ma_delete_all.c:
  Implementation of rows-in-block
storage/maria/ma_dynrec.c:
  info->rec_buff is now allocated through _ma_alloc_buffer()
  Use new info->cur_row structure
storage/maria/ma_extra.c:
  Implementation of rows-in-block
storage/maria/ma_ft_boolean_search.c:
  Removed compiler warnings
  Indentation fixes
storage/maria/ma_ft_nlq_search.c:
  Removed compiler warnings
  Indentation fixes
storage/maria/ma_ft_update.c:
  Removed some casts
storage/maria/ma_fulltext.h:
  Changed pointer type
storage/maria/ma_info.c:
  Implementation of rows-in-block
  More general _ma_report_error()
storage/maria/ma_init.c:
  Implementation of rows-in-block
storage/maria/ma_key.c:
  Implementation of rows-in-block
  Removed some casts
storage/maria/ma_keycache.c:
  Fixed DBUG entry
storage/maria/ma_locking.c:
  Implementation of rows-in-block
storage/maria/ma_open.c:
  Implementation of rows-in-block
storage/maria/ma_packrec.c:
  Indentation fixes
  Changed uchar * to byte * to make it possible to remove some casts
storage/maria/ma_page.c:
  Implementation of rows-in-block
storage/maria/ma_range.c:
  Implementation of rows-in-block
storage/maria/ma_rfirst.c:
  Implementation of rows-in-block
storage/maria/ma_rkey.c:
  Implementation of rows-in-block
  Indentation fixes
storage/maria/ma_rlast.c:
  Implementation of rows-in-block
storage/maria/ma_rnext.c:
  Implementation of rows-in-block
storage/maria/ma_rnext_same.c:
  Implementation of rows-in-block
storage/maria/ma_rprev.c:
  Implementation of rows-in-block
storage/maria/ma_rrnd.c:
  Implementation of rows-in-block
  Removed flag 'RRND_PRESERVER_LASTINX', by not resetting lastinx (This is reset by maria_scan_init())
storage/maria/ma_rsame.c:
  Implementation of rows-in-block
storage/maria/ma_rsamepos.c:
  Implementation of rows-in-block
storage/maria/ma_rt_index.c:
  Implementation of rows-in-block
storage/maria/ma_rt_index.h:
  Implementation of rows-in-block
storage/maria/ma_rt_key.c:
  Implementation of rows-in-block
storage/maria/ma_rt_key.h:
  Implementation of rows-in-block
storage/maria/ma_rt_mbr.c:
  Implementation of rows-in-block
storage/maria/ma_rt_mbr.h:
  Implementation of rows-in-block
storage/maria/ma_rt_split.c:
  Implementation of rows-in-block
storage/maria/ma_rt_test.c:
  Indentation fix
storage/maria/ma_scan.c:
  Implementation of rows-in-block
  Added 'maria_scan_end()'
storage/maria/ma_search.c:
  Implementation of rows-in-block
storage/maria/ma_sort.c:
  Indentation fixes
  uchar -> byte to be able to remove some casts
storage/maria/ma_sp_defs.h:
  uchar * -> byte *
storage/maria/ma_sp_key.c:
  uchar * -> byte *
storage/maria/ma_sp_test.c:
  Indentation fixes
storage/maria/ma_static.c:
  New header signature for MARIA
storage/maria/ma_statrec.c:
  int -> my_bool functions
  my_off_t -> MARIA_RECORD_POS
  Fixed argument order for _ma_read_static_record()
storage/maria/ma_test1.c:
  Implementation of rows-in-block
  Fixed some bugs in VARCHAR and BLOB testing
storage/maria/ma_test2.c:
  Implementation of rows-in-block
  Fixed bug in BLOB testing
storage/maria/ma_test3.c:
  Implementation of rows-in-block
storage/maria/ma_test_all.sh:
  Run all tests with dynamic, static and block row formats
  (For the moment we skip REPAIR test of rows-in-block as this is not yet implemented)
storage/maria/ma_unique.c:
  Implementation of rows-in-block
storage/maria/ma_update.c:
  Implementation of rows-in-block
storage/maria/ma_write.c:
  Implementation of rows-in-block
  Write of row is split into two parts, as rows-in-block format require us to do write of row before keys (to get row position) in contrast to all other row formats
storage/maria/maria_chk.c:
  Implementation of rows-in-block
storage/maria/maria_def.h:
  Implementation of rows-in-block
  - New structs and variables to hold rows-in-block and bitmap information
  - Added org_data_file_type in header to allow easy restore of old record format when doing maria_pack / maria_chk -u
  - More virtual functions to handle different row types
  - Pointer to row is now MARIA_RECORD_POS instead of my_off_t
  - uchar -> byte for many parameters to avoid casts
storage/maria/maria_ftdump.c:
  Implementation of rows-in-block
storage/maria/maria_pack.c:
  Implementation of rows-in-block
storage/myisam/mi_check.c:
  Added new row types into switch to avoid compiler warnings
  Added some casts to avoid warnings after changing type of lastkey and buff
storage/myisam/mi_create.c:
  Fix that 'pack_fields' is calculated correctly
storage/myisam/mi_rsamepos.c:
  Implementation of rows-in-block
storage/myisam/mi_test2.c:
  Fixed wrong printf
storage/myisam/sort.c:
  uchar * -> byte *
support-files/magic:
  Added support for Maria files
  Fided wrong entry's for MyISAM files
storage/maria/ma_bitmap.c:
  New BitKeeper file ``storage/maria/ma_bitmap.c''
storage/maria/ma_blockrec.c:
  New BitKeeper file ``storage/maria/ma_blockrec.c''
storage/maria/ma_blockrec.h:
  New BitKeeper file ``storage/maria/ma_blockrec.h''
2007-01-18 21:38:14 +02:00
unknown
c2f2a41ed3 Maria - merging recent changes done to MyISAM into Maria.
Plus compiler warnings, and a fix to the pagecache unit tests for IA64


include/maria.h:
  merging MyISAM into Maria
include/myisam.h:
  post-merge fixes
mysql-test/r/maria.result:
  merging MyISAM into Maria
mysql-test/t/maria.test:
  merging MyISAM into Maria
sql/mysqld.cc:
  post-merge fixes
storage/maria/ha_maria.cc:
  merging MyISAM into Maria
storage/maria/ha_maria.h:
  merging MyISAM into Maria
storage/maria/ma_check.c:
  merging MyISAM into Maria
storage/maria/ma_open.c:
  merging MyISAM into Maria
storage/maria/ma_packrec.c:
  merging MyISAM into Maria
storage/maria/ma_range.c:
  merging MyISAM into Maria
storage/maria/ma_sort.c:
  merging MyISAM into Maria
storage/maria/maria_def.h:
  merging MyISAM into Maria
storage/maria/maria_pack.c:
  merging MyISAM into Maria
storage/maria/plug.in:
  merging MyISAM into Maria
storage/myisam/myisamdef.h:
  merging MyISAM into Maria
storage/myisam/myisampack.c:
  fix for compiler warnings
unittest/mysys/mf_pagecache_consist.c:
  this sets the stack size lower than the minimum on IA64, we remove it
  (it made the test fail)
unittest/mysys/mf_pagecache_single.c:
  this sets the stack size lower than the minimum on IA64, we remove it
  (it made the test fail)
2006-12-19 19:15:53 +01:00
unknown
99c431db92 Completion of merge of mysql-5.1 into mysql-maria.
Manually imported changes done to MyISAM (include/myisam.h,
storage/myisam/*, sql/ha_myisam.*, mysql-test/t/myisam.test,
mysql-test/t/ps_2myisam.test) the last
months into Maria (tedious, should do it more frequently in the
future), including those not done at the previous 5.1->Maria merge
(please in the future don't forget to apply MyISAM changes to Maria
when you merge 5.1 into Maria).
Note: I didn't try to import anything which could be MyISAM-related
in other tests of mysql-test (I didn't want to dig in all csets),
but as QA is working to make most tests re-usable for other engines
(Falcon), it is likely that we'll benefit from this and just have
to set engine=Maria somewhere to run those tests on Maria.
func_group and partition tests fail but they already do in main 5.1
on my machine. No Valgrind error in t/*maria*.test.
Monty: please see the commit comment of maria.result and check.


BitKeeper/deleted/.del-ha_maria.m4:
  Delete: config/ac-macros/ha_maria.m4
configure.in:
  fix for the new way of enabling engines
include/maria.h:
  importing changes done to MyISAM the last months into Maria
include/my_handler.h:
  importing changes done to MyISAM the last months into Maria
include/myisam.h:
  importing changes done to MyISAM the last months into Maria
mysql-test/r/maria.result:
  identical to myisam.result, except the engine name in some places
  AND in the line testing key_block_size=1000000000000000000:
  Maria gives a key block size of 8192 while MyISAM gives 4096;
  is it explainable by the difference between MARIA_KEY_BLOCK_LENGTH
  and the same constant in MyISAM? Monty?
mysql-test/r/ps_maria.result:
  identical to ps_2myisam.result (except the engine name in some places)
mysql-test/t/maria.test:
  instead of engine=maria everywhere, I use @@storage_engine (reduces
  the diff with myisam.test).
  importing changes done to MyISAM the last months into Maria
mysys/my_handler.c:
  importing changes done to MyISAM the last months into Maria
sql/ha_maria.cc:
  importing changes done to MyISAM the last months into Maria
sql/ha_maria.h:
  importing changes done to MyISAM the last months into Maria
sql/mysqld.cc:
  unneeded
storage/maria/Makefile.am:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_check.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_create.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_delete_table.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_dynrec.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_extra.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ft_boolean_search.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ft_eval.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ft_nlq_search.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ft_parser.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ft_test1.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ft_update.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_ftdefs.h:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_key.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_open.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_page.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_rkey.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_rsamepos.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_rt_index.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_rt_mbr.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_search.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_sort.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_test1.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_test2.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_test3.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_update.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/ma_write.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/maria_chk.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/maria_def.h:
  importing changes done to MyISAM the last months into Maria
storage/maria/maria_ftdump.c:
  importing changes done to MyISAM the last months into Maria
storage/maria/maria_pack.c:
  importing changes done to MyISAM the last months into Maria
2006-08-10 16:36:54 +02:00
unknown
157002b12f WL#3270 "Maria - cleanups of inherited MyISAM functionality"
Removing the "external lock" functionality from Maria (as two separate processes wanting to share a table
should not only my_lock() the data and index files but also the log files, and share memory
(as the latest data is in the page cache), it sounds useless to feature this).
Removing the MyISAM logging from Maria (as REDO logging will be done differently).


BitKeeper/deleted/.del-maria_log.c~1fb295a18c3f5d4c:
  Delete: storage/maria/maria_log.c
BitKeeper/deleted/.del-ma_log.c~4a44ec11d547772f:
  Delete: storage/maria/ma_log.c
include/maria.h:
  unneeded
storage/maria/Makefile.am:
  log removed
storage/maria/ma_check.c:
  external locking removed
storage/maria/ma_close.c:
  log removed
storage/maria/ma_delete.c:
  log removed
storage/maria/ma_delete_all.c:
  log removed. Unused var.
storage/maria/ma_dynrec.c:
  external locking removed
storage/maria/ma_extra.c:
  log removed
storage/maria/ma_init.c:
  log removed
storage/maria/ma_locking.c:
  external locking removed, log removed
storage/maria/ma_open.c:
  external locking removed, log removed
storage/maria/ma_static.c:
  log removed
storage/maria/ma_statrec.c:
  external locking removed
storage/maria/ma_test2.c:
  log removed
storage/maria/ma_test3.c:
  log removed
storage/maria/ma_update.c:
  log removed
storage/maria/ma_write.c:
  external locking removed, log removed
storage/maria/maria_chk.c:
  external locking removed
storage/maria/maria_def.h:
  log removed, maria_pid unused.
storage/maria/maria_pack.c:
  fixes for warnings (where pointers are like ulong and so %u is not enough).
2006-05-05 20:32:02 +02:00
unknown
d2b8d744d9 Added storage/maria (based on MyISAM). WL#3245
Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines
Rename of not properly renamed functions in MyISAM and my_handler.c
Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share
Added maria variables to mysqld.cc and set_var.cc
Fixed compiler warnings



BitKeeper/etc/ignore:
  added storage/maria/*.MAI
BUILD/SETUP.sh:
  Compile maria by default
BitKeeper/triggers/post-commit:
  No public maria emails.
  Mark changesets emails with 'maria'
configure.in:
  Add maria
include/ft_global.h:
  Move defines needed by maria and MyISAM here
include/keycache.h:
  Add support for default key_cache if cache not found
include/my_base.h:
  Add invalidator_by_filename
include/my_handler.h:
  Remove duplicate header files
  Add defines that are typical for handlers (MyISAM and Maria)
include/myisam.h:
  Move things to my_handler.h to allow Maria and MyISAM to share things
  (Some things needed to be shared to allow sharing of HA_CHECK structure)
libmysqld/Makefile.am:
  Added ha_maria.cc
mysys/mf_keycaches.c:
  Added default value for multi_key_cache_search
mysys/my_handler.c:
  mi_compare_text -> ha_compare_text
  Removed compiler warnings
sql/ha_myisam.cc:
  MI_CHECK -> HA_CHECK
  MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH
sql/ha_myisam.h:
  MI_CHECK -> HA_CHECK
  MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH
sql/ha_myisammrg.h:
  MI_CHECK -> HA_CHECK
  MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH
sql/handler.h:
  Added MARIA
  Added inclusion of my_handler.h
sql/item_func.h:
  Remove duplicate include
sql/mysql_priv.h:
  Added maria variables
sql/mysqld.cc:
  Added maria
sql/set_var.cc:
  Added maria status variables
sql/set_var.h:
  Added maria
sql/sql_class.h:
  Added maria status variables
sql/sql_sort.h:
  Remove duplicate BUFFPEK struct
storage/Makefile.am:
  Added maria
storage/csv/ha_tina.cc:
  Removed compiler warning
storage/myisam/Makefile.am:
  Added ft_myisam.c
storage/myisam/ft_boolean_search.c:
  mi_compare_text -> ha_compare_text
  MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF
  Remove compiler warnings
storage/myisam/ft_nlq_search.c:
  mi_compare_text -> ha_compare_text
storage/myisam/ft_parser.c:
  mi_compare_text -> ha_compare_text
storage/myisam/ft_static.c:
  Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM
storage/myisam/ft_stopwords.c:
  mi_compare_text -> ha_compare_text
storage/myisam/ft_update.c:
  mi_compare_text -> ha_compare_text
storage/myisam/fulltext.h:
  Move things to ft_global.h to allow to share more things between MyISAM and Maria
storage/myisam/mi_check.c:
  MI_CHECK -> HA_CHECK
storage/myisam/mi_create.c:
  MI_MAX_POSSIBLE_KEY ->   HA_MAX_POSSIBLE_KEY
  MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE
  MI_MAX_KEY_SEG ->  HA_MAX_KEY_SEG
  MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF
storage/myisam/mi_delete.c:
  MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF
storage/myisam/mi_delete_all.c:
  Remove not used variable
storage/myisam/mi_dynrec.c:
  _my_calc_total_blob_length -> _mi_calc_total_blob_length
storage/myisam/mi_key.c:
  _my_store_blob_length -> _mi_store_blob_length
storage/myisam/mi_log.c:
  _my_calc_total_blob_length -> _mi_calc_total_blob_length
storage/myisam/mi_open.c:
  MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
  MI_MAX_KEY_SEG ->      HA_MAX_KEY_SEG
  MI_MAX_KEY_BUFF ->     HA_MAX_KEY_BUFF
  my_n_base_info_read -> mi_n_base_info_read
storage/myisam/mi_packrec.c:
  Made read_pack_length static
  _my_store_blob_length -> _mi_store_blob_length
  Remove not used variable
storage/myisam/mi_range.c:
  MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF
storage/myisam/mi_search.c:
  MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF
storage/myisam/mi_test1.c:
  MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH
storage/myisam/mi_test2.c:
  Fixed compiler warning
storage/myisam/mi_unique.c:
  Fixed compiler warning
  mi_compare_text -> ha_compare_text
storage/myisam/mi_update.c:
  MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF
storage/myisam/mi_write.c:
  Rename of defines and functions
storage/myisam/myisamchk.c:
  Rename of defines and functions
storage/myisam/myisamdef.h:
  Remove tabs
  Indentation fixes (Large changes as I did run indent-ex on the file)
  Move some things to myisamchk.h
  Added missing functions that gave compiler warnings
storage/myisam/myisamlog.c:
  Rename of defines and functions
storage/myisam/myisampack.c:
  Remove compiler warning
storage/myisam/rt_index.c:
  Rename of defines and functions
storage/myisam/sort.c:
  Rename of defines, functions and structures
config/ac-macros/ha_maria.m4:
  New BitKeeper file ``config/ac-macros/ha_maria.m4''
include/maria.h:
  New BitKeeper file ``include/maria.h''
include/myisamchk.h:
  New BitKeeper file ``include/myisamchk.h''
libmysqld/ha_maria.cc:
  New BitKeeper file ``libmysqld/ha_maria.cc''
mysql-test/include/have_maria.inc:
  New BitKeeper file ``mysql-test/include/have_maria.inc''
mysql-test/r/have_maria.require:
  New BitKeeper file ``mysql-test/r/have_maria.require''
mysql-test/r/maria.result:
  New BitKeeper file ``mysql-test/r/maria.result''
mysql-test/r/ps_maria.result:
  New BitKeeper file ``mysql-test/r/ps_maria.result''
mysql-test/t/maria.test:
  New BitKeeper file ``mysql-test/t/maria.test''
mysql-test/t/ps_maria.test:
  New BitKeeper file ``mysql-test/t/ps_maria.test''
sql/ha_maria.cc:
  New BitKeeper file ``sql/ha_maria.cc''
sql/ha_maria.h:
  New BitKeeper file ``sql/ha_maria.h''
storage/maria/Makefile.am:
  New BitKeeper file ``storage/maria/Makefile.am''
storage/maria/cmakelists.txt:
  New BitKeeper file ``storage/maria/cmakelists.txt''
storage/maria/ft_maria.c:
  New BitKeeper file ``storage/maria/ft_maria.c''
storage/maria/ma_cache.c:
  New BitKeeper file ``storage/maria/ma_cache.c''
storage/maria/ma_changed.c:
  New BitKeeper file ``storage/maria/ma_changed.c''
storage/maria/ma_check.c:
  New BitKeeper file ``storage/maria/ma_check.c''
storage/maria/ma_checksum.c:
  New BitKeeper file ``storage/maria/ma_checksum.c''
storage/maria/ma_close.c:
  New BitKeeper file ``storage/maria/ma_close.c''
storage/maria/ma_create.c:
  New BitKeeper file ``storage/maria/ma_create.c''
storage/maria/ma_dbug.c:
  New BitKeeper file ``storage/maria/ma_dbug.c''
storage/maria/ma_delete.c:
  New BitKeeper file ``storage/maria/ma_delete.c''
storage/maria/ma_delete_all.c:
  New BitKeeper file ``storage/maria/ma_delete_all.c''
storage/maria/ma_delete_table.c:
  New BitKeeper file ``storage/maria/ma_delete_table.c''
storage/maria/ma_dynrec.c:
  New BitKeeper file ``storage/maria/ma_dynrec.c''
storage/maria/ma_extra.c:
  New BitKeeper file ``storage/maria/ma_extra.c''
storage/maria/ma_ft_boolean_search.c:
  New BitKeeper file ``storage/maria/ma_ft_boolean_search.c''
storage/maria/ma_ft_eval.c:
  New BitKeeper file ``storage/maria/ma_ft_eval.c''
storage/maria/ma_ft_eval.h:
  New BitKeeper file ``storage/maria/ma_ft_eval.h''
storage/maria/ma_ft_nlq_search.c:
  New BitKeeper file ``storage/maria/ma_ft_nlq_search.c''
storage/maria/ma_ft_parser.c:
  New BitKeeper file ``storage/maria/ma_ft_parser.c''
storage/maria/ma_ft_stem.c:
  New BitKeeper file ``storage/maria/ma_ft_stem.c''
storage/maria/ma_ft_test1.c:
  New BitKeeper file ``storage/maria/ma_ft_test1.c''
storage/maria/ma_ft_test1.h:
  New BitKeeper file ``storage/maria/ma_ft_test1.h''
storage/maria/ma_ft_update.c:
  New BitKeeper file ``storage/maria/ma_ft_update.c''
storage/maria/ma_ftdefs.h:
  New BitKeeper file ``storage/maria/ma_ftdefs.h''
storage/maria/ma_fulltext.h:
  New BitKeeper file ``storage/maria/ma_fulltext.h''
storage/maria/ma_info.c:
  New BitKeeper file ``storage/maria/ma_info.c''
storage/maria/ma_init.c:
  New BitKeeper file ``storage/maria/ma_init.c''
storage/maria/ma_key.c:
  New BitKeeper file ``storage/maria/ma_key.c''
storage/maria/ma_keycache.c:
  New BitKeeper file ``storage/maria/ma_keycache.c''
storage/maria/ma_locking.c:
  New BitKeeper file ``storage/maria/ma_locking.c''
storage/maria/ma_log.c:
  New BitKeeper file ``storage/maria/ma_log.c''
storage/maria/ma_open.c:
  New BitKeeper file ``storage/maria/ma_open.c''
storage/maria/ma_packrec.c:
  New BitKeeper file ``storage/maria/ma_packrec.c''
storage/maria/ma_page.c:
  New BitKeeper file ``storage/maria/ma_page.c''
storage/maria/ma_panic.c:
  New BitKeeper file ``storage/maria/ma_panic.c''
storage/maria/ma_preload.c:
  New BitKeeper file ``storage/maria/ma_preload.c''
storage/maria/ma_range.c:
  New BitKeeper file ``storage/maria/ma_range.c''
storage/maria/ma_rename.c:
  New BitKeeper file ``storage/maria/ma_rename.c''
storage/maria/ma_rfirst.c:
  New BitKeeper file ``storage/maria/ma_rfirst.c''
storage/maria/ma_rkey.c:
  New BitKeeper file ``storage/maria/ma_rkey.c''
storage/maria/ma_rlast.c:
  New BitKeeper file ``storage/maria/ma_rlast.c''
storage/maria/ma_rnext.c:
  New BitKeeper file ``storage/maria/ma_rnext.c''
storage/maria/ma_rnext_same.c:
  New BitKeeper file ``storage/maria/ma_rnext_same.c''
storage/maria/ma_rprev.c:
  New BitKeeper file ``storage/maria/ma_rprev.c''
storage/maria/ma_rrnd.c:
  New BitKeeper file ``storage/maria/ma_rrnd.c''
storage/maria/ma_rsame.c:
  New BitKeeper file ``storage/maria/ma_rsame.c''
storage/maria/ma_rsamepos.c:
  New BitKeeper file ``storage/maria/ma_rsamepos.c''
storage/maria/ma_rt_index.c:
  New BitKeeper file ``storage/maria/ma_rt_index.c''
storage/maria/ma_rt_index.h:
  New BitKeeper file ``storage/maria/ma_rt_index.h''
storage/maria/ma_rt_key.c:
  New BitKeeper file ``storage/maria/ma_rt_key.c''
storage/maria/ma_rt_key.h:
  New BitKeeper file ``storage/maria/ma_rt_key.h''
storage/maria/ma_rt_mbr.c:
  New BitKeeper file ``storage/maria/ma_rt_mbr.c''
storage/maria/ma_rt_mbr.h:
  New BitKeeper file ``storage/maria/ma_rt_mbr.h''
storage/maria/ma_rt_split.c:
  New BitKeeper file ``storage/maria/ma_rt_split.c''
storage/maria/ma_rt_test.c:
  New BitKeeper file ``storage/maria/ma_rt_test.c''
storage/maria/ma_scan.c:
  New BitKeeper file ``storage/maria/ma_scan.c''
storage/maria/ma_search.c:
  New BitKeeper file ``storage/maria/ma_search.c''
storage/maria/ma_sort.c:
  New BitKeeper file ``storage/maria/ma_sort.c''
storage/maria/ma_sp_defs.h:
  New BitKeeper file ``storage/maria/ma_sp_defs.h''
storage/maria/ma_sp_key.c:
  New BitKeeper file ``storage/maria/ma_sp_key.c''
storage/maria/ma_sp_test.c:
  New BitKeeper file ``storage/maria/ma_sp_test.c''
storage/maria/ma_static.c:
  New BitKeeper file ``storage/maria/ma_static.c''
storage/maria/ma_statrec.c:
  New BitKeeper file ``storage/maria/ma_statrec.c''
storage/maria/ma_test1.c:
  New BitKeeper file ``storage/maria/ma_test1.c''
storage/maria/ma_test2.c:
  New BitKeeper file ``storage/maria/ma_test2.c''
storage/maria/ma_test3.c:
  New BitKeeper file ``storage/maria/ma_test3.c''
storage/maria/ma_test_all.sh:
  New BitKeeper file ``storage/maria/ma_test_all.sh''
storage/maria/ma_unique.c:
  New BitKeeper file ``storage/maria/ma_unique.c''
storage/maria/ma_update.c:
  New BitKeeper file ``storage/maria/ma_update.c''
storage/maria/ma_write.c:
  New BitKeeper file ``storage/maria/ma_write.c''
storage/maria/maria_chk.c:
  New BitKeeper file ``storage/maria/maria_chk.c''
storage/maria/maria_def.h:
  New BitKeeper file ``storage/maria/maria_def.h''
storage/maria/maria_ftdump.c:
  New BitKeeper file ``storage/maria/maria_ftdump.c''
storage/maria/maria_log.c:
  New BitKeeper file ``storage/maria/maria_log.c''
storage/maria/maria_pack.c:
  New BitKeeper file ``storage/maria/maria_pack.c''
storage/maria/maria_rename.sh:
  New BitKeeper file ``storage/maria/maria_rename.sh''
storage/maria/test_pack:
  New BitKeeper file ``storage/maria/test_pack''
storage/myisam/ft_myisam.c:
  New BitKeeper file ``storage/myisam/ft_myisam.c''
2006-04-11 16:45:10 +03:00