2008-04-16 16:31:38 +02:00
|
|
|
#!/usr/bin/env perl
|
2007-12-24 07:38:44 +02:00
|
|
|
#
|
|
|
|
# Run various unit tests.
|
|
|
|
#
|
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
use Getopt::Long;
|
2008-01-29 15:26:04 +01:00
|
|
|
use File::Basename;
|
2008-01-04 02:16:24 +02:00
|
|
|
|
|
|
|
$|= 1;
|
2008-04-16 16:31:38 +02:00
|
|
|
$^W = 1; # warnings, because env cannot parse 'perl -w'
|
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
|
|
|
$VER= "1.4";
|
2008-01-08 22:21:28 +02:00
|
|
|
|
|
|
|
$opt_version= 0;
|
|
|
|
$opt_help= 0;
|
|
|
|
$opt_verbose= 0;
|
2008-01-22 19:49:05 +02:00
|
|
|
$opt_abort_on_error= 0;
|
2008-01-08 22:21:28 +02:00
|
|
|
$opt_valgrind= "valgrind --alignment=8 --leak-check=yes";
|
|
|
|
$opt_silent= "-s";
|
|
|
|
$opt_number_of_tests= 0;
|
|
|
|
$opt_run_tests= undef();
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-02-02 00:01:31 +01:00
|
|
|
my $maria_path; # path to "storage/maria"
|
2010-09-12 18:40:01 +02:00
|
|
|
my $maria_exe_path; # path to executables (ma_test1, aria_chk etc)
|
2008-01-04 02:16:24 +02:00
|
|
|
my $my_progname= $0;
|
|
|
|
$my_progname=~ s/.*[\/]//;
|
|
|
|
my $runtime_error= 0; # Return 1 if error(s) occur during run
|
|
|
|
my $NEW_TEST= 0; # Test group separator in an array of tests
|
2008-01-08 22:21:28 +02:00
|
|
|
my $test_begin= 0;
|
|
|
|
my $test_end= 0;
|
|
|
|
my $test_counter= 0;
|
2008-01-04 02:16:24 +02:00
|
|
|
|
2007-12-24 07:38:44 +02:00
|
|
|
run_tests();
|
|
|
|
|
|
|
|
####
|
|
|
|
#### Initialise variables, clean temporary files and run the tests
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_tests
|
|
|
|
{
|
|
|
|
my $nr_tests= 0;
|
2008-01-04 02:16:24 +02:00
|
|
|
my $flag_exit= 0;
|
|
|
|
|
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
|
|
|
if (!GetOptions("help" => \$opt_help,
|
|
|
|
"version" => \$opt_version,
|
|
|
|
"verbose" => \$opt_verbose,
|
|
|
|
"abort-on-error" => \$opt_abort_on_error,
|
|
|
|
"valgrind=s" => \$opt_valgrind,
|
|
|
|
"silent=s" => \$opt_silent,
|
|
|
|
"number-of-tests" => \$opt_number_of_tests,
|
|
|
|
"run-tests=s" => \$opt_run_tests,
|
|
|
|
"start-from=s" => \$opt_run_tests))
|
2008-01-04 02:16:24 +02:00
|
|
|
{
|
|
|
|
$flag_exit= 1;
|
|
|
|
}
|
|
|
|
if ($opt_version)
|
|
|
|
{
|
|
|
|
print "$my_progname version $VER\n";
|
|
|
|
exit(0);
|
|
|
|
}
|
2008-02-02 00:01:31 +01:00
|
|
|
$maria_path= dirname($0) . "/..";
|
|
|
|
|
2008-02-21 23:05:27 +01:00
|
|
|
my $suffix= ( $^O =~ /win/i && $^O !~ /darwin/i ) ? ".exe" : "";
|
2008-02-02 00:01:31 +01:00
|
|
|
$maria_exe_path= "$maria_path/release";
|
|
|
|
# we use -f, sometimes -x is unexpectedly false in Cygwin
|
|
|
|
if ( ! -f "$maria_exe_path/ma_test1$suffix" )
|
2008-01-04 02:16:24 +02:00
|
|
|
{
|
2008-02-02 00:01:31 +01:00
|
|
|
$maria_exe_path= "$maria_path/relwithdebinfo";
|
|
|
|
if ( ! -f "$maria_exe_path/ma_test1$suffix" )
|
|
|
|
{
|
|
|
|
$maria_exe_path= "$maria_path/debug";
|
|
|
|
if ( ! -f "$maria_exe_path/ma_test1$suffix" )
|
|
|
|
{
|
|
|
|
$maria_exe_path= $maria_path;
|
|
|
|
if ( ! -f "$maria_exe_path/ma_test1$suffix" )
|
|
|
|
{
|
|
|
|
die("Cannot find ma_test1 executable\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-01-04 02:16:24 +02:00
|
|
|
|
|
|
|
usage() if ($opt_help || $flag_exit);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# IMPORTANT: If you modify this file, please read this:
|
|
|
|
#
|
|
|
|
# Count total number of tests. Make sure that the functions return
|
|
|
|
# number of unit tests correctly, e.g. calls to ok(). The last argument
|
|
|
|
# for each function is a flag counter and will return the number of
|
|
|
|
# unit tests in each. Please see comments on function ok() at the end.
|
|
|
|
#
|
|
|
|
# If you modify any functions or add any new ones, please make sure the
|
|
|
|
# unit tests are appropriately detected here. A wrong count will
|
|
|
|
# make the unit test fail during 'make test'. $nr_tests must be right.
|
|
|
|
#
|
|
|
|
|
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
|
|
|
$nr_tests+= run_check_tests(0, 0, 0, 0, 1) * 5; #
|
|
|
|
$nr_tests+= run_repair_tests(0, 0, 0, 0, 1) * 5; # called 4 times
|
|
|
|
$nr_tests+= run_pack_tests(0, 0, 0, 0, 1) * 5; #
|
2007-12-24 07:38:44 +02:00
|
|
|
$nr_tests+= run_tests_on_warnings_and_errors(0, 0, 0, 1);
|
|
|
|
$nr_tests+= run_ma_test_recovery(0, 1);
|
2008-02-02 00:01:31 +01:00
|
|
|
$nr_tests+= run_tests_on_clrs(0, 0, 1);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-08 22:21:28 +02:00
|
|
|
if ($opt_number_of_tests)
|
|
|
|
{
|
|
|
|
print "Total number of tests is $nr_tests\n";
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (defined($opt_run_tests))
|
|
|
|
{
|
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
|
|
|
if ($opt_run_tests =~ m/^(\d+)$/ ||
|
|
|
|
$opt_run_tests =~ m/^(\d+)\.+$/)
|
2008-01-08 22:21:28 +02:00
|
|
|
{
|
|
|
|
$test_begin= $1;
|
|
|
|
}
|
|
|
|
elsif ($opt_run_tests =~ m/^(\d+)\.+(\d+)$/)
|
|
|
|
{
|
|
|
|
$test_begin= $1;
|
|
|
|
$test_end= $2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
print "Wrong syntax for option --run-tests=$opt_run_tests\n";
|
|
|
|
print "Please use --run-tests=<begin>..<end>\nwhere 'begin' is the ";
|
|
|
|
print "first test to be run and 'end' is the last.\n";
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
if ($test_end > $nr_tests)
|
|
|
|
{
|
|
|
|
print "Test range ($test_begin..$test_end) out of range. ";
|
|
|
|
print "There are only $nr_tests in the test suite.\n";
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
$test_begin++ if (!$test_begin); # Handle zero, if user gave that
|
|
|
|
if ($test_end && $test_begin > $test_end)
|
|
|
|
{
|
|
|
|
print "Bad test range ($test_begin..$test_end)\n";
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
# Now adjust number of tests
|
|
|
|
$nr_tests= ($test_end ? $test_end : $nr_tests) - $test_begin + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# clean-up
|
|
|
|
#
|
|
|
|
|
2010-09-12 18:40:01 +02:00
|
|
|
unlink <*.TMD aria_log*>; # Delete temporary files
|
2008-01-08 22:21:28 +02:00
|
|
|
|
2007-12-24 07:38:44 +02:00
|
|
|
#
|
|
|
|
# Run tests
|
|
|
|
#
|
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
if (!$opt_verbose)
|
|
|
|
{
|
|
|
|
print "1..$nr_tests\n";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
print "Total tests: $nr_tests\n";
|
|
|
|
}
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
if ($opt_verbose)
|
|
|
|
{
|
|
|
|
print "Running tests with dynamic row format\n"
|
|
|
|
}
|
2008-02-02 00:01:31 +01:00
|
|
|
run_check_tests($suffix, $opt_silent, "", $opt_verbose, 0);
|
|
|
|
run_repair_tests($suffix, $opt_silent, "", $opt_verbose, 0);
|
|
|
|
run_pack_tests($suffix, $opt_silent, "", $opt_verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
if ($opt_verbose)
|
|
|
|
{
|
|
|
|
print "\nRunning tests with static row format\n";
|
|
|
|
}
|
2008-02-02 00:01:31 +01:00
|
|
|
run_check_tests($suffix, $opt_silent, "-S", $opt_verbose, 0);
|
|
|
|
run_repair_tests($suffix, $opt_silent, "-S", $opt_verbose, 0);
|
|
|
|
run_pack_tests($suffix, $opt_silent, "-S", $opt_verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
if ($opt_verbose)
|
|
|
|
{
|
|
|
|
print "\nRunning tests with block row format\n";
|
|
|
|
}
|
2008-02-02 00:01:31 +01:00
|
|
|
run_check_tests($suffix, $opt_silent, "-M", $opt_verbose, 0);
|
|
|
|
run_repair_tests($suffix, $opt_silent, "-M", $opt_verbose, 0);
|
|
|
|
run_pack_tests($suffix, $opt_silent, "-M", $opt_verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
if ($opt_verbose)
|
|
|
|
{
|
|
|
|
print "\nRunning tests with block row format and transactions\n";
|
|
|
|
}
|
2008-02-02 00:01:31 +01:00
|
|
|
run_check_tests($suffix, $opt_silent, "-M -T", $opt_verbose, 0);
|
|
|
|
run_repair_tests($suffix, $opt_silent, "-M -T", $opt_verbose, 0);
|
|
|
|
run_pack_tests($suffix, $opt_silent, "-M -T", $opt_verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
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
|
|
|
if ($opt_verbose)
|
|
|
|
{
|
|
|
|
print "\nRunning tests with block row format, transactions and versioning\n";
|
|
|
|
}
|
|
|
|
run_check_tests($suffix, $opt_silent, "-M -T -C", $opt_verbose, 0);
|
|
|
|
run_repair_tests($suffix, $opt_silent, "-M -T -C", $opt_verbose, 0);
|
|
|
|
run_pack_tests($suffix, $opt_silent, "-M -T -C", $opt_verbose, 0);
|
|
|
|
|
|
|
|
|
|
|
|
if ($opt_verbose)
|
|
|
|
{
|
|
|
|
print "\nRunning tests with warnings and recovery\n";
|
|
|
|
}
|
2008-02-02 00:01:31 +01:00
|
|
|
run_tests_on_warnings_and_errors($suffix, $opt_silent, $opt_verbose, 0);
|
2008-01-04 02:16:24 +02:00
|
|
|
run_ma_test_recovery($opt_verbose, 0);
|
2008-02-02 00:01:31 +01:00
|
|
|
run_tests_on_clrs($suffix, $opt_verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
exit($runtime_error);
|
2007-12-24 07:38:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### regular tests
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_check_tests
|
|
|
|
{
|
|
|
|
my ($suffix, $silent, $row_type, $verbose, $count)= @_;
|
|
|
|
my ($i, $nr_tests);
|
|
|
|
my @ma_test1_opt= ( ["","-se"],
|
|
|
|
["-N","-se"],
|
|
|
|
["-P --checksum","-se"],
|
|
|
|
["-P -N","-se"],
|
|
|
|
["-B -N -R2","-sm"],
|
|
|
|
["-a -k 480 --unique","-sm"],
|
|
|
|
["-a -N -R1 ","-sm"],
|
|
|
|
["-p","-sm"],
|
|
|
|
["-p -N --unique","-sm"],
|
|
|
|
["-p -N --key_length=127 --checksum","-sm"],
|
|
|
|
["-p -N --key_length=128","-sm"],
|
|
|
|
["-p --key_length=480","-sm"],
|
|
|
|
["-a -B","-sm"],
|
|
|
|
["-a -B --key_length=64 --unique","-sm"],
|
|
|
|
["-a -B -k 480 --checksum","-sm"],
|
|
|
|
["-a -B -k 480 -N --unique --checksum","-sm"],
|
|
|
|
["-a -m","-sm"],
|
|
|
|
["-a -m -P --unique --checksum","-sm"],
|
|
|
|
["-a -m -P --key_length=480 --key_cache","-sm"],
|
|
|
|
["-m -p","-sm"],
|
|
|
|
["-w --unique","-sm"],
|
|
|
|
["-a -w --key_length=64 --checksum","-sm"],
|
|
|
|
["-a -w -N --key_length=480","-sm"],
|
|
|
|
["-a -w --key_length=480 --checksum","-sm"],
|
|
|
|
["-a -b -N","-sm"],
|
|
|
|
["-a -b --key_length=480","-sm"],
|
|
|
|
["-p -B --key_length=480","-sm"],
|
|
|
|
["--checksum --unique","-se"],
|
|
|
|
["--unique","-se"],
|
|
|
|
["--key_multiple -N -S","-sm"],
|
|
|
|
["--key_multiple -a -p --key_length=480","-sm"],
|
|
|
|
["--key_multiple -a -B --key_length=480","-sm"],
|
|
|
|
["--key_multiple -P -S","-sm"] );
|
|
|
|
my @ma_test2_opt= ( ["-L -K -W -P","-sm"],
|
|
|
|
["-L -K -W -P -A","-sm"],
|
2008-01-07 18:54:41 +02:00
|
|
|
["-L -K -W -P -b32768", "-sm"],
|
|
|
|
["-L -K -W -P -M -T -c -b32768 -t4 -m300", "-sm"],
|
|
|
|
["-L -K -P -R3 -m50 -b1000000", "-sm"],
|
2007-12-24 07:38:44 +02:00
|
|
|
["-L -B","-sm"],
|
|
|
|
["-D -B -c","-sm"],
|
|
|
|
["-m10000 -e4096 -K","-sm"],
|
|
|
|
["-m10000 -e8192 -K","-sm"],
|
|
|
|
["-m10000 -e16384 -E16384 -K -L","-sm"],
|
2007-12-31 11:55:46 +02:00
|
|
|
["-L -K -W -P -b32768", "-se"],
|
2007-12-24 07:38:44 +02:00
|
|
|
["-c -b65000","-se"] );
|
Fix for Valgrind errors when running rt_test and ma_rt_test, and segmentation fault
in ma_rt_test -M (BUG#36321); keyinfo/recinfo/keyseg had non-initialized parts.
maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
Preparing for inclusion into ma_test_all-t and ma_test_recovery.pl (still prevented by
BUG#37307 "Maria: R-tree unit test produces corrupted table").
storage/maria/ma_rt_test.c:
Some members of keyinfo, recinfo, keyseg had non-initialized parts, led to Valgrind errors,
and also segmentation fault when running with -M (=BLOCK_RECORD) (BUG#36321).
We now bzero them like they are in mi_test1.
Other problems:
- maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
- --silent had almost no effect, now it really silences normal output.
- Some errors were going to stdout, they now go to stderr.
Added option for testing versioning, to fit well into ma_test_all-t.
storage/maria/unittest/ma_test_all-t:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/maria/unittest/ma_test_recovery.pl:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/myisam/rt_test.c:
Some members of keyinfo, recinfo, keyseg were not initialized, led to Valgrind errors.
We now bzero them like they are in mi_test1.
2008-06-10 15:44:41 +02:00
|
|
|
my @ma_rt_test_opt= ( ); # (["--checksum", "-se"] );
|
|
|
|
|
2007-12-24 07:38:44 +02:00
|
|
|
|
|
|
|
if ($count)
|
|
|
|
{
|
|
|
|
$nr_tests= 2; # Number of tests outside loops
|
|
|
|
for ($i= 0; defined($ma_test1_opt[$i]); $i++) { $nr_tests+=2; }
|
|
|
|
for ($i= 0; defined($ma_test2_opt[$i]); $i++) { $nr_tests+=2; }
|
Fix for Valgrind errors when running rt_test and ma_rt_test, and segmentation fault
in ma_rt_test -M (BUG#36321); keyinfo/recinfo/keyseg had non-initialized parts.
maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
Preparing for inclusion into ma_test_all-t and ma_test_recovery.pl (still prevented by
BUG#37307 "Maria: R-tree unit test produces corrupted table").
storage/maria/ma_rt_test.c:
Some members of keyinfo, recinfo, keyseg had non-initialized parts, led to Valgrind errors,
and also segmentation fault when running with -M (=BLOCK_RECORD) (BUG#36321).
We now bzero them like they are in mi_test1.
Other problems:
- maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
- --silent had almost no effect, now it really silences normal output.
- Some errors were going to stdout, they now go to stderr.
Added option for testing versioning, to fit well into ma_test_all-t.
storage/maria/unittest/ma_test_all-t:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/maria/unittest/ma_test_recovery.pl:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/myisam/rt_test.c:
Some members of keyinfo, recinfo, keyseg were not initialized, led to Valgrind errors.
We now bzero them like they are in mi_test1.
2008-06-10 15:44:41 +02:00
|
|
|
for ($i= 0; defined($ma_rt_test_opt[$i]); $i++) { $nr_tests+=2; }
|
2007-12-24 07:38:44 +02:00
|
|
|
return $nr_tests;
|
|
|
|
}
|
|
|
|
|
|
|
|
for ($i= 0; defined($ma_test1_opt[$i]); $i++)
|
|
|
|
{
|
2010-09-12 18:40:01 +02:00
|
|
|
unlink <aria_log_control aria_log.*>;
|
2008-02-02 00:01:31 +01:00
|
|
|
ok("$maria_exe_path/ma_test1$suffix $silent $ma_test1_opt[$i][0] $row_type",
|
2007-12-24 07:38:44 +02:00
|
|
|
$verbose, $i + 1);
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_chk$suffix $ma_test1_opt[$i][1] test1",
|
2007-12-24 07:38:44 +02:00
|
|
|
$verbose, $i + 1);
|
|
|
|
}
|
|
|
|
#
|
|
|
|
# These tests are outside the loops. Make sure to include them in
|
|
|
|
# nr_tests manually
|
|
|
|
#
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_pack$suffix --force -s test1", $verbose, 0);
|
|
|
|
ok("$maria_exe_path/aria_chk$suffix -ess test1", $verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
|
|
|
for ($i= 0; defined($ma_test2_opt[$i]); $i++)
|
|
|
|
{
|
2010-09-12 18:40:01 +02:00
|
|
|
unlink <aria_log_control aria_log.*>;
|
2008-02-02 00:01:31 +01:00
|
|
|
ok("$maria_exe_path/ma_test2$suffix $silent $ma_test2_opt[$i][0] $row_type",
|
2007-12-24 07:38:44 +02:00
|
|
|
$verbose, $i + 1);
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_chk$suffix $ma_test2_opt[$i][1] test2",
|
2007-12-24 07:38:44 +02:00
|
|
|
$verbose, $i + 1);
|
|
|
|
}
|
Fix for Valgrind errors when running rt_test and ma_rt_test, and segmentation fault
in ma_rt_test -M (BUG#36321); keyinfo/recinfo/keyseg had non-initialized parts.
maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
Preparing for inclusion into ma_test_all-t and ma_test_recovery.pl (still prevented by
BUG#37307 "Maria: R-tree unit test produces corrupted table").
storage/maria/ma_rt_test.c:
Some members of keyinfo, recinfo, keyseg had non-initialized parts, led to Valgrind errors,
and also segmentation fault when running with -M (=BLOCK_RECORD) (BUG#36321).
We now bzero them like they are in mi_test1.
Other problems:
- maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
- --silent had almost no effect, now it really silences normal output.
- Some errors were going to stdout, they now go to stderr.
Added option for testing versioning, to fit well into ma_test_all-t.
storage/maria/unittest/ma_test_all-t:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/maria/unittest/ma_test_recovery.pl:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/myisam/rt_test.c:
Some members of keyinfo, recinfo, keyseg were not initialized, led to Valgrind errors.
We now bzero them like they are in mi_test1.
2008-06-10 15:44:41 +02:00
|
|
|
|
|
|
|
for ($i= 0; defined($ma_rt_test_opt[$i]); $i++)
|
|
|
|
{
|
2010-09-12 18:40:01 +02:00
|
|
|
unlink <aria_log_control aria_log.*>;
|
Fix for Valgrind errors when running rt_test and ma_rt_test, and segmentation fault
in ma_rt_test -M (BUG#36321); keyinfo/recinfo/keyseg had non-initialized parts.
maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
Preparing for inclusion into ma_test_all-t and ma_test_recovery.pl (still prevented by
BUG#37307 "Maria: R-tree unit test produces corrupted table").
storage/maria/ma_rt_test.c:
Some members of keyinfo, recinfo, keyseg had non-initialized parts, led to Valgrind errors,
and also segmentation fault when running with -M (=BLOCK_RECORD) (BUG#36321).
We now bzero them like they are in mi_test1.
Other problems:
- maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
- --silent had almost no effect, now it really silences normal output.
- Some errors were going to stdout, they now go to stderr.
Added option for testing versioning, to fit well into ma_test_all-t.
storage/maria/unittest/ma_test_all-t:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/maria/unittest/ma_test_recovery.pl:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/myisam/rt_test.c:
Some members of keyinfo, recinfo, keyseg were not initialized, led to Valgrind errors.
We now bzero them like they are in mi_test1.
2008-06-10 15:44:41 +02:00
|
|
|
ok("$maria_exe_path/ma_rt_test$suffix $silent $ma_rt_test_opt[$i][0] $row_type",
|
|
|
|
$verbose, $i + 1);
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_chk$suffix $ma_rt_test_opt[$i][1] rt_test",
|
Fix for Valgrind errors when running rt_test and ma_rt_test, and segmentation fault
in ma_rt_test -M (BUG#36321); keyinfo/recinfo/keyseg had non-initialized parts.
maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
Preparing for inclusion into ma_test_all-t and ma_test_recovery.pl (still prevented by
BUG#37307 "Maria: R-tree unit test produces corrupted table").
storage/maria/ma_rt_test.c:
Some members of keyinfo, recinfo, keyseg had non-initialized parts, led to Valgrind errors,
and also segmentation fault when running with -M (=BLOCK_RECORD) (BUG#36321).
We now bzero them like they are in mi_test1.
Other problems:
- maria_scan() was not wrapped in maria_scan_init()/end() so "ma_rt_test -M" found no rows.
- --silent had almost no effect, now it really silences normal output.
- Some errors were going to stdout, they now go to stderr.
Added option for testing versioning, to fit well into ma_test_all-t.
storage/maria/unittest/ma_test_all-t:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/maria/unittest/ma_test_recovery.pl:
preparing for running ma_rt_test when ma_rt_test remaining bugs are fixed
storage/myisam/rt_test.c:
Some members of keyinfo, recinfo, keyseg were not initialized, led to Valgrind errors.
We now bzero them like they are in mi_test1.
2008-06-10 15:44:41 +02:00
|
|
|
$verbose, $i + 1);
|
|
|
|
}
|
|
|
|
|
2010-09-12 18:40:01 +02:00
|
|
|
unlink <aria_log_control aria_log.*>;
|
2007-12-24 07:38:44 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### repair tests
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_repair_tests()
|
|
|
|
{
|
|
|
|
my ($suffix, $silent, $row_type, $verbose, $count)= @_;
|
2008-01-04 02:16:24 +02:00
|
|
|
my ($i);
|
|
|
|
|
|
|
|
my @t= ($NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test1$suffix $silent --checksum $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix --silent -re --transaction-log test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rs test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rqs test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rs --correct-checksum test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rqs --correct-checksum test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -ros --correct-checksum test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rqos --correct-checksum test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -sz test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix $silent -c -d1 $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_chk$suffix -s --parallel-recover test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -s --parallel-recover --quick test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix $silent -c $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -sr test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix $silent -c -t4 -b32768 $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_chk$suffix -s --zerofill test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1"
|
2008-01-04 02:16:24 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
return &count_tests(\@t) if ($count);
|
|
|
|
&run_test_bunch(\@t, $verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### pack tests
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_pack_tests()
|
|
|
|
{
|
|
|
|
my ($suffix, $silent, $row_type, $verbose, $count)= @_;
|
2008-01-04 02:16:24 +02:00
|
|
|
my ($i);
|
|
|
|
|
|
|
|
my @t= ($NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test1$suffix $silent --checksum $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_pack$suffix --force -s test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -ess test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rqs test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rs test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rus test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test1",
|
2008-01-04 02:16:24 +02:00
|
|
|
$NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test1$suffix $silent --checksum $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_pack$suffix --force -s test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rus --safe-recover test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test1",
|
2008-01-04 02:16:24 +02:00
|
|
|
$NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test1$suffix $silent --checksum -S $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -ros test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rqs test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test1",
|
2008-01-04 02:16:24 +02:00
|
|
|
$NEW_TEST,
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_pack$suffix --force -s test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rqs test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -rus test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test1",
|
2008-01-04 02:16:24 +02:00
|
|
|
$NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix $silent -c -d1 $row_type",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_chk$suffix -s --parallel-recover test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -s --unpack --parallel-recover test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
|
|
|
"$maria_exe_path/aria_pack$suffix --force -s test1",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -s --unpack --parallel-recover test2",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -se test2",
|
2008-01-23 05:00:17 +02:00
|
|
|
$NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test1$suffix $silent -c $row_type",
|
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
|
|
|
"cp test1.MAD test2.MAD",
|
|
|
|
"cp test1.MAI test2.MAI",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_pack$suffix --force -s --join=test3 test1 test2",
|
|
|
|
"$maria_exe_path/aria_chk -s test3",
|
|
|
|
"$maria_exe_path/aria_chk -s --safe-recover test3",
|
|
|
|
"$maria_exe_path/aria_chk -s test3"
|
2008-01-04 02:16:24 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
return &count_tests(\@t) if ($count);
|
|
|
|
&run_test_bunch(\@t, $verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### Tests that gives warnings or errors
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_tests_on_warnings_and_errors
|
|
|
|
{
|
|
|
|
my ($suffix, $silent, $verbose, $count)= @_;
|
|
|
|
my ($com);
|
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
return 9 if ($count); # Number of tests in this function, e.g. calls to ok()
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-02-02 00:01:31 +01:00
|
|
|
ok("$maria_exe_path/ma_test2$suffix $silent -L -K -W -P -S -R1 -m500",
|
2007-12-24 07:38:44 +02:00
|
|
|
$verbose, 0);
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_chk$suffix -sm test2", $verbose, 0);
|
2007-12-31 11:55:46 +02:00
|
|
|
# ma_test2$suffix $silent -L -K -R1 -m2000 ; Should give error 135\n
|
2007-12-24 07:38:44 +02:00
|
|
|
# In the following a failure is a success and success is a failure
|
2008-02-02 00:01:31 +01:00
|
|
|
$com= "$maria_exe_path/ma_test2$suffix $silent -L -K -R1 -m2000 ";
|
2008-01-07 18:54:41 +02:00
|
|
|
$com.= ">ma_test2_message.txt 2>&1";
|
2007-12-24 07:38:44 +02:00
|
|
|
ok($com, $verbose, 0, 1);
|
|
|
|
ok("cat ma_test2_message.txt", $verbose, 0);
|
|
|
|
ok("grep \"Error: 135\" ma_test2_message.txt > /dev/null", $verbose, 0);
|
2010-09-12 18:40:01 +02:00
|
|
|
# maria_exe_path/aria_chk$suffix -sm test2 will warn that
|
2007-12-31 11:55:46 +02:00
|
|
|
# Datafile is almost full
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_chk$suffix -sm test2 >ma_test2_message.txt 2>&1",
|
2007-12-24 07:38:44 +02:00
|
|
|
$verbose, 0);
|
|
|
|
ok("cat ma_test2_message.txt", $verbose, 0);
|
|
|
|
ok("grep \"warning: Datafile is almost full\" ma_test2_message.txt>/dev/null",
|
|
|
|
$verbose, 0);
|
2008-01-04 02:16:24 +02:00
|
|
|
unlink <ma_test2_message.txt>;
|
2010-09-12 18:40:01 +02:00
|
|
|
ok("$maria_exe_path/aria_chk$suffix -ssm test2", $verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### Test that removing tables and applying the log leads to identical tables
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_ma_test_recovery
|
|
|
|
{
|
|
|
|
my ($verbose, $count)= @_;
|
|
|
|
|
|
|
|
return 1 if ($count); # Number of tests in this function
|
2008-02-02 00:01:31 +01:00
|
|
|
ok("$maria_path/unittest/ma_test_recovery.pl", $verbose, 0);
|
2007-12-24 07:38:44 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### Tests on CLR's
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_tests_on_clrs
|
|
|
|
{
|
2008-02-02 00:01:31 +01:00
|
|
|
my ($suffix, $verbose, $count)= @_;
|
2008-01-04 02:16:24 +02:00
|
|
|
my ($i);
|
|
|
|
|
|
|
|
my @t= ($NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix -s -L -K -W -P -M -T -c -b -t2 -A1",
|
2010-09-12 18:40:01 +02:00
|
|
|
"cp aria_log_control tmp",
|
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -s -e test2",
|
|
|
|
"cp tmp/aria_log_control .",
|
2008-01-04 02:16:24 +02:00
|
|
|
"rm test2.MA?",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -s -e test2",
|
2008-01-04 02:16:24 +02:00
|
|
|
"rm test2.MA?",
|
|
|
|
$NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix -s -L -K -W -P -M -T -c -b -t2 -A1",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -s -e test2",
|
2008-01-04 02:16:24 +02:00
|
|
|
"rm test2.MA?",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -e -s test2",
|
2008-01-04 02:16:24 +02:00
|
|
|
"rm test2.MA?",
|
|
|
|
$NEW_TEST,
|
2008-02-02 00:01:31 +01:00
|
|
|
"$maria_exe_path/ma_test2$suffix -s -L -K -W -P -M -T -c -b32768 -t4 -A1",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test2",
|
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test2",
|
2008-01-04 02:16:24 +02:00
|
|
|
"rm test2.MA?",
|
2010-09-12 18:40:01 +02:00
|
|
|
"$maria_exe_path/aria_read_log$suffix -a -s",
|
|
|
|
"$maria_exe_path/aria_chk$suffix -es test2",
|
2008-01-04 02:16:24 +02:00
|
|
|
"rm test2.MA?"
|
|
|
|
);
|
|
|
|
|
|
|
|
return &count_tests(\@t) if ($count);
|
|
|
|
&run_test_bunch(\@t, $verbose, 1);
|
2007-12-24 07:38:44 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Print "ok" on success and "not ok" on error
|
|
|
|
#
|
|
|
|
# Note: Every time this function is called it will be counted
|
|
|
|
# as a unit test.
|
|
|
|
#
|
|
|
|
# Args: $com: The actual command run. Will be printed on a failure
|
|
|
|
# $verbose: Be more verbose.
|
|
|
|
# $iteration: Number of iterations in a loop when the error
|
|
|
|
# occurred. If not in loop, this should be blank
|
|
|
|
# (e.g. send zero).
|
|
|
|
# $expected_error: Optional; put here expected error code. Test
|
|
|
|
# will pass with this result only.
|
|
|
|
#
|
|
|
|
# Return value: Will return 1 on success and 0 on an error
|
|
|
|
#
|
|
|
|
|
|
|
|
sub ok
|
|
|
|
{
|
|
|
|
my ($com, $verbose, $iteration, $expected_error)= @_;
|
2008-01-04 02:16:24 +02:00
|
|
|
my ($msg, $output, $err, $len);
|
2007-12-24 07:38:44 +02:00
|
|
|
|
2008-01-08 22:21:28 +02:00
|
|
|
$test_counter++;
|
|
|
|
if ($test_begin > $test_counter)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if ($test_end && $test_end < $test_counter)
|
|
|
|
{
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
$msg= "";
|
2007-12-24 07:38:44 +02:00
|
|
|
$expected_error= 0 if (!defined($expected_error));
|
|
|
|
|
|
|
|
if ($verbose)
|
|
|
|
{
|
2008-01-04 02:16:24 +02:00
|
|
|
print "$com ";
|
2007-12-24 07:38:44 +02:00
|
|
|
}
|
|
|
|
$output= `$com 2>&1`;
|
2008-01-04 02:16:24 +02:00
|
|
|
$len= length($com);
|
2007-12-24 07:38:44 +02:00
|
|
|
if ($verbose)
|
|
|
|
{
|
2008-01-08 22:21:28 +02:00
|
|
|
print " " x (62 - $len);
|
2007-12-24 07:38:44 +02:00
|
|
|
}
|
2008-01-07 19:02:10 +02:00
|
|
|
$err= $?;
|
2008-01-07 18:54:41 +02:00
|
|
|
if ((!$err && !$expected_error) ||
|
|
|
|
(($err >> 8) == $expected_error && $expected_error))
|
2007-12-24 07:38:44 +02:00
|
|
|
{
|
2008-01-04 02:16:24 +02:00
|
|
|
print "[ " if ($verbose);
|
|
|
|
print "ok";
|
2008-01-08 22:21:28 +02:00
|
|
|
if ($verbose)
|
|
|
|
{
|
|
|
|
print " ]";
|
|
|
|
print " " x (5 - length("$test_counter"));
|
|
|
|
print "$test_counter";
|
|
|
|
}
|
2008-01-29 15:26:04 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
print " $test_counter - $com"
|
|
|
|
}
|
2008-01-04 02:16:24 +02:00
|
|
|
print "\n";
|
2007-12-24 07:38:44 +02:00
|
|
|
return 1;
|
|
|
|
}
|
2008-01-04 02:16:24 +02:00
|
|
|
print "[ " if ($verbose);
|
|
|
|
print "not ok";
|
|
|
|
print " ]" if ($verbose);
|
2008-01-29 15:26:04 +01:00
|
|
|
print " $test_counter - $com" unless $verbose;
|
2008-01-04 02:16:24 +02:00
|
|
|
print "\n";
|
2008-01-09 18:51:05 +01:00
|
|
|
if ($verbose && defined($output) && length($output))
|
2008-01-04 02:16:24 +02:00
|
|
|
{
|
|
|
|
print "$output\n";
|
|
|
|
}
|
|
|
|
if (!$verbose)
|
|
|
|
{
|
|
|
|
$msg= "\n"; # Get a nicer output in perl unit test mode
|
|
|
|
}
|
|
|
|
$msg.= "Failed test '$com' ";
|
2007-12-24 07:38:44 +02:00
|
|
|
if ($iteration)
|
|
|
|
{
|
|
|
|
$msg.= "(loop iteration $iteration.) ";
|
|
|
|
}
|
|
|
|
$msg.= "at line ";
|
|
|
|
$msg.= (caller)[2];
|
2008-01-08 22:21:28 +02:00
|
|
|
$msg.= "\n(errcode: $err, test: $test_counter)\n";
|
2007-12-24 07:38:44 +02:00
|
|
|
if ($expected_error)
|
|
|
|
{
|
|
|
|
$msg.= "Was expecting errcode: $expected_error\n";
|
|
|
|
}
|
|
|
|
warn $msg;
|
2008-01-04 02:16:24 +02:00
|
|
|
$runtime_error= 1;
|
2008-01-22 19:49:05 +02:00
|
|
|
if ($opt_abort_on_error)
|
|
|
|
{
|
|
|
|
exit 1;
|
|
|
|
}
|
2007-12-24 07:38:44 +02:00
|
|
|
return 0;
|
|
|
|
}
|
2008-01-04 02:16:24 +02:00
|
|
|
|
2008-01-29 18:15:38 +01:00
|
|
|
#
|
|
|
|
# Print "skip" and the reason
|
|
|
|
#
|
|
|
|
# Note: Every time this function is called it will be counted
|
|
|
|
# as a unit test.
|
|
|
|
#
|
|
|
|
# Args: $com: The actual command run. Will be printed on a failure
|
|
|
|
# $reason: The reason to skip a test
|
|
|
|
# $verbose: Be more verbose.
|
|
|
|
#
|
|
|
|
|
|
|
|
sub skip
|
|
|
|
{
|
|
|
|
my ($com, $reason, $verbose)= @_;
|
|
|
|
|
|
|
|
$test_counter++;
|
|
|
|
return 0 if $test_begin > $test_counter;
|
|
|
|
exit 0 if $test_end && $test_end < $test_counter;
|
|
|
|
printf '%-64s[ skipped ]%5d', $com, $test_counter if $verbose;
|
|
|
|
print "ok $test_counter # skip $reason" unless $verbose;
|
|
|
|
print "\n";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2008-01-04 02:16:24 +02:00
|
|
|
####
|
|
|
|
#### Count tests
|
|
|
|
#### Arguments: $t: an array of the tests
|
|
|
|
####
|
|
|
|
|
|
|
|
sub count_tests
|
|
|
|
{
|
|
|
|
my ($t)= @_;
|
|
|
|
my ($i, $nr_tests);
|
|
|
|
|
|
|
|
$nr_tests= 0;
|
|
|
|
for ($i= 0; defined(@$t[$i]); $i++) { $nr_tests++ if (@$t[$i]); }
|
|
|
|
return $nr_tests;
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### Run a bunch of tests
|
|
|
|
#### Arguments: $t: an array of the tests
|
|
|
|
#### $verbose: to be passed to ok()
|
|
|
|
#### $clear: clear log files if set
|
|
|
|
####
|
|
|
|
|
|
|
|
sub run_test_bunch
|
|
|
|
{
|
|
|
|
my ($t, $verbose, $clear)= @_;
|
|
|
|
my ($i);
|
|
|
|
|
|
|
|
for ($i= 0; defined(@$t[$i]); $i++)
|
|
|
|
{
|
|
|
|
if ($clear && @$t[$i] eq $NEW_TEST)
|
|
|
|
{
|
2010-09-12 18:40:01 +02:00
|
|
|
unlink <aria_log.* aria_log_control>;
|
2008-01-04 02:16:24 +02:00
|
|
|
}
|
|
|
|
if (@$t[$i] ne $NEW_TEST)
|
|
|
|
{
|
|
|
|
ok(@$t[$i], $verbose, $i + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
####
|
|
|
|
#### usage
|
|
|
|
####
|
|
|
|
|
|
|
|
sub usage
|
|
|
|
{
|
|
|
|
print <<EOF;
|
|
|
|
$my_progname version $VER
|
|
|
|
|
|
|
|
Description:
|
|
|
|
|
2010-09-12 18:40:01 +02:00
|
|
|
Run various Aria related tests. Typically used via make test as a unittest.
|
2008-01-04 02:16:24 +02:00
|
|
|
|
|
|
|
Options
|
|
|
|
--help Show this help and exit.
|
2008-01-22 19:49:05 +02:00
|
|
|
--abort-on-error Abort at once in case of error.
|
|
|
|
--number-of-tests Print the total number of tests and exit.
|
2008-01-08 22:21:28 +02:00
|
|
|
--run-tests=... Test number(s) that should be run. You can give just
|
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
|
|
|
one number or a range. For example 45..89. To run a specific
|
|
|
|
test alone, for example test 215, use --run-tests=215..215
|
|
|
|
Use this option with caution, because some of the tests
|
2008-01-08 22:21:28 +02:00
|
|
|
might depend on previous ones.
|
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
|
|
|
--start-from=... Alias for --run-tests
|
2008-01-22 19:49:05 +02:00
|
|
|
--silent=... Silent option passed to ma_test* tests ('$opt_silent')
|
|
|
|
--valgrind=... Options for valgrind.
|
|
|
|
('$opt_valgrind')
|
|
|
|
--verbose Be more verbose. Will print each unittest on a line
|
|
|
|
and result after. This mode cannot be used with unit.pl
|
|
|
|
when running in normal unit test mode.
|
|
|
|
--version Show version number and exit.
|
2008-01-04 02:16:24 +02:00
|
|
|
EOF
|
|
|
|
exit(0);
|
|
|
|
}
|