mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
18bc7b695a
* to honour WAL we now force the whole log when flushing a bitmap page. * ability to intentionally crash in various places for recovery testing * bugfix (dirty pages list found in checkpoint record was ignored) * smaller checkpoint record * misc small cleanups and comments mysql-test/include/maria_empty_logs.inc: maria-purge.test creates ~11 logs, remove them all mysql-test/r/maria-recovery-bitmap.result: result is good; without the _ma_bitmap_get_log_address() call, we got check error Bitmap at 0 has pages reserved outside of data file length mysql-test/r/maria-recovery.result: result update mysql-test/t/maria-recovery-bitmap.test: enable test of "bitmap-flush should flush whole log otherwise corrupted data file (bitmap ahead of data pages)". mysql-test/t/maria-recovery.test: test of checkpoint sql/sql_table.cc: comment storage/maria/ha_maria.cc: _ma_reenable_logging_for_table() now includes file->trn=0. At the end of repair() we don't need to re-enable logging, it is done already by caller (like copy_data_between_tables()); it sounds strange that this function could decide to re-enable, it should be up to caller who knows what other operations it plans. Removing this line led to assertion failure in maria_lock_database(F_UNLCK), fixed by removing the assertion: maria_lock_database() is here called in a context where F_UNLCK does not make the table visible to others so assertion is excessive, and external_lock() is already designed to honour the asserted condition. Ability to crash at the end of bulk insert when indices have been enabled. storage/maria/ma_bitmap.c: Better use pagecache_file_init() than set pagecache callbacks directly; and a new function to set those callbacks for bitmap so that we can reuse it. _ma_bitmap_get_log_address() is a pagecache get_log_address callback which causes the whole log to be flushed when a bitmap page is flushed by the page cache. This was required by WAL. storage/maria/ma_blockrec.c: get_log_address pagecache callback for data (non bitmap) pages: just reads the LSN from the page's content, like was hard-coded before in ma_pagecache.c. storage/maria/ma_blockrec.h: functions which need to be exported storage/maria/ma_check.c: create_new_data_handle() can be static. Ability to crash after rebuilding the index in OPTIMIZE, in REPAIR. my_lock() implemented already. storage/maria/ma_checkpoint.c: As MARIA_SHARE* is now accessible to pagecache_collect_changed_blocks_LSN(), we don't need to store kfile/dfile descriptors in checkpoint record, 2-byte-id of the table plus one byte to say if this is data or index file is enough. So we go from 4+4 bytes per table down to 2+1. storage/maria/ma_commit.c: removing duplicate functions (see _ma_tmp_disable_logging_for_table()) storage/maria/ma_extra.c: Monty fixed storage/maria/ma_key_recover.c: comment storage/maria/ma_locking.c: Sometimes other code does funny things with maria_lock_database(), like ha_maria::repair() calling it at start and end without going through ha_maria::external_lock(). So it happens that maria_lock_database() is called with now_transactional!=born_transactional. storage/maria/ma_loghandler.c: update to new prototype storage/maria/ma_open.c: set_data|index_pagecache_callbacks() need to be exported as they are now called when disabling/enabling transactionality. storage/maria/ma_pagecache.c: Removing PAGE_LSN_OFFSET, as much of the code relies on it being 0 anyway (let's not give impression we can just change this constant). When flushing a page to disk, call the get_log_address callback to know up to which LSN the log should be flushed. As we now can access MARIA_SHARE* we can know share->id and store it into the checkpoint record; we thus go from 4 bytes per dirty page to 2+1. storage/maria/ma_pagecache.h: get_log_address callback storage/maria/ma_panic.c: No reason to reset pagecache callbacks in HA_PANIC_READ: all we do is reopen files if they were closed; callbacks should be in place already as 'info' exists; we just want to modify the file descriptors, not the full PAGECACHE_FILE structure. If we open data file and it was closed, share->bitmap.file needs to be set. Note that the modified code is disabled anyway. storage/maria/ma_recovery.c: Checkpoint record does not contain kfile/dfile descriptors anymore so code can be simplified. Hash key in all_dirty_pages is not made from file_descriptor & pageno anymore, but index_or_data & table-short-id & pageno. If a table's create_rename_lsn is higher than record's LSN, we skip the table and don't fail if it's corrupted (because the LSNs say that we don't have to look at this table). If a table is skipped (for example due to create_rename_lsn), its UNDOs still cause undo_lsn to advance; this is so that if later we notice the transaction has to rollback we fail (as table should not be skipped in this case). Fixing a bug: the dirty_pages list was never used, because the LSN below which it was used was the minimum rec_lsn of dirty pages! It is now the min(checkpoint_start_log_horizon, min(trn's rec_lsn)). When we disable/reenable transactionality, we modify pagecache callbacks (needed for example for get_log_address: changing share->page_type is not enough anymore). storage/maria/ma_write.c: 'records' and 'checksum' are protected: they are updated under log's mutex in write-hooks when UNDO is written. storage/maria/maria_chk.c: remove use of duplicate functions. storage/maria/maria_def.h: set_data|index_pagecache_callbacks() need to be exported; _ma_reenable_logging_for_table() changes to a real function. storage/maria/unittest/ma_pagecache_consist.c: new prototype storage/maria/unittest/ma_pagecache_single.c: new prototype storage/maria/unittest/ma_test_loghandler_pagecache-t.c: new prototype |
||
---|---|---|
.. | ||
1st.result | ||
alias.result | ||
alter_table-big.result | ||
alter_table.result | ||
analyse.result | ||
analyze.result | ||
ansi.result | ||
archive-big.result | ||
archive.result | ||
archive_bitfield.result | ||
archive_gis.result | ||
auto_increment.result | ||
backup.result | ||
bench_count_distinct.result | ||
big_test.require | ||
bigint.result | ||
binary.result | ||
binlog_tx_isolation.result | ||
binlog_unsafe.result | ||
bool.result | ||
bootstrap.result | ||
bulk_replace.result | ||
cache_innodb.result | ||
case.result | ||
case_sensitive_file_system.require | ||
cast.result | ||
check.result | ||
check_var_limit.require | ||
client_xml.result | ||
comments.result | ||
compare.result | ||
compress.result | ||
concurrent_innodb.result | ||
connect.result | ||
consistent_snapshot.result | ||
constraints.result | ||
contributors.result | ||
count_distinct.result | ||
count_distinct2.result | ||
count_distinct3.result | ||
crash_commit_before.result | ||
create-big.result | ||
create.result | ||
create_not_windows.result | ||
create_select_tmp.result | ||
csv.result | ||
ctype_ascii.result | ||
ctype_big5.result | ||
ctype_collate.result | ||
ctype_cp932_binlog_row.result | ||
ctype_cp932_binlog_stm.result | ||
ctype_cp1250_ch.result | ||
ctype_cp1251.result | ||
ctype_create.result | ||
ctype_eucjpms.result | ||
ctype_euckr.result | ||
ctype_filename.result | ||
ctype_gb2312.result | ||
ctype_gbk.result | ||
ctype_hebrew.result | ||
ctype_latin1.result | ||
ctype_latin1_de.result | ||
ctype_latin2.result | ||
ctype_latin2_ch.result | ||
ctype_ldml.result | ||
ctype_many.result | ||
ctype_mb.result | ||
ctype_recoding.result | ||
ctype_sjis.result | ||
ctype_tis620.result | ||
ctype_uca.result | ||
ctype_ucs.result | ||
ctype_ucs2_def.result | ||
ctype_ujis.result | ||
ctype_ujis_ucs2.result | ||
ctype_utf8.result | ||
date_formats.result | ||
ddl_i18n_koi8r.result | ||
ddl_i18n_utf8.result | ||
deadlock_innodb.result | ||
default.result | ||
delayed.result | ||
delete.result | ||
derived.result | ||
dirty_close.result | ||
distinct.result | ||
drop.result | ||
empty_table.result | ||
endspace.result | ||
error_simulation.result | ||
errors.result | ||
events.result | ||
events_bugs.result | ||
events_grant.result | ||
events_logs_tests.result | ||
events_microsec.result | ||
events_restart_phase1.result | ||
events_restart_phase2.result | ||
events_restart_phase3.result | ||
events_scheduling.result | ||
events_stress.result | ||
events_time_zone.result | ||
events_trans.result | ||
events_trans_notembedded.result | ||
exampledb.result | ||
execution_constants.result | ||
explain.result | ||
federated.result | ||
federated_archive.result | ||
federated_bug_13118.result | ||
federated_bug_25714.result | ||
federated_innodb.result | ||
federated_server.result | ||
federated_transactions.result | ||
fix_priv_tables.result | ||
flush.result | ||
flush2.result | ||
flush_block_commit.result | ||
flush_block_commit_notembedded.result | ||
flush_read_lock_kill.result | ||
flush_table.result | ||
foreign_key.result | ||
fulltext.result | ||
fulltext2.result | ||
fulltext3.result | ||
fulltext_cache.result | ||
fulltext_distinct.result | ||
fulltext_left_join.result | ||
fulltext_multi.result | ||
fulltext_order_by.result | ||
fulltext_update.result | ||
fulltext_var.result | ||
func_compress.result | ||
func_concat.result | ||
func_crypt.result | ||
func_date_add.result | ||
func_default.result | ||
func_des_encrypt.result | ||
func_encrypt.result | ||
func_encrypt_nossl.result | ||
func_equal.result | ||
func_gconcat.result | ||
func_group.result | ||
func_group_innodb.result | ||
func_if.result | ||
func_in.result | ||
func_isnull.result | ||
func_like.result | ||
func_math.result | ||
func_misc.result | ||
func_op.result | ||
func_regexp.result | ||
func_sapdb.result | ||
func_set.result | ||
func_str.result | ||
func_system.result | ||
func_test.result | ||
func_time.result | ||
func_timestamp.result | ||
gcc296.result | ||
gis-rtree.result | ||
gis.result | ||
grant.result | ||
grant2.result | ||
grant3.result | ||
grant_cache_no_prot.result | ||
grant_cache_ps_prot.result | ||
greedy_optimizer.result | ||
group_by.result | ||
group_min_max.result | ||
group_min_max_innodb.result | ||
handler_innodb.result | ||
handler_myisam.result | ||
have_big5.require | ||
have_binlog_format_mixed.require | ||
have_binlog_format_row.require | ||
have_binlog_format_statement.require | ||
have_bug25714.require | ||
have_compress.require | ||
have_cp866.require | ||
have_cp932.require | ||
have_cp1250_ch.require | ||
have_cp1251.require | ||
have_crypt.require | ||
have_debug.require | ||
have_dynamic_loading.require | ||
have_eucjpms.require | ||
have_euckr.require | ||
have_example_plugin.require | ||
have_gb2312.require | ||
have_gbk.require | ||
have_geometry.require | ||
have_koi8r.require | ||
have_latin2_ch.require | ||
have_log_bin.require | ||
have_maria.require | ||
have_met_timezone.require | ||
have_moscow_leap_timezone.require | ||
have_mysql_upgrade.result | ||
have_ndb_extra.require | ||
have_ndbapi_examples.require | ||
have_outfile.require | ||
have_partition.require | ||
have_perror.require | ||
have_query_cache.require | ||
have_sjis.require | ||
have_ssl.require | ||
have_symlink.require | ||
have_tis620.require | ||
have_ucs2.require | ||
have_udf_example.require | ||
have_ujis.require | ||
have_utf8.require | ||
having.result | ||
heap.result | ||
heap_auto_increment.result | ||
heap_btree.result | ||
heap_hash.result | ||
help.result | ||
index_merge_innodb.result | ||
index_merge_myisam.result | ||
information_schema.result | ||
information_schema_chmod.result | ||
information_schema_db.result | ||
information_schema_inno.result | ||
information_schema_part.result | ||
init_connect.result | ||
init_file.result | ||
innodb-lock.result | ||
innodb-replace.result | ||
innodb-ucs2.result | ||
innodb.result | ||
innodb_gis.result | ||
innodb_mysql.result | ||
innodb_notembedded.result | ||
innodb_timeout_rollback.result | ||
innodb_trx_weight.result | ||
insert.result | ||
insert_notembedded.result | ||
insert_select.result | ||
insert_update.result | ||
is_debug_build.require | ||
isam.result | ||
join.result | ||
join_crash.result | ||
join_nested.result | ||
join_outer.result | ||
join_outer_innodb.result | ||
key.result | ||
key_cache.result | ||
key_diff.result | ||
key_primary.result | ||
keywords.result | ||
kill.result | ||
limit.result | ||
loaddata.result | ||
loaddata_autocom_innodb.result | ||
lock.result | ||
lock_multi.result | ||
lock_tables_lost_commit.result | ||
log_state.result | ||
log_tables-big.result | ||
log_tables.result | ||
long_tmpdir.result | ||
lowercase0.require | ||
lowercase1.require | ||
lowercase2.require | ||
lowercase_fs_off.result | ||
lowercase_mixed_tmpdir.result | ||
lowercase_table.result | ||
lowercase_table2.result | ||
lowercase_table3.result | ||
lowercase_table_grant.result | ||
lowercase_table_qcache.result | ||
lowercase_view.result | ||
maria-big.result | ||
maria-connect.result | ||
maria-purge.result | ||
maria-recovery-bitmap.result | ||
maria-recovery.result | ||
maria.result | ||
merge.result | ||
metadata.result | ||
mix2_myisam.result | ||
mix2_myisam_ucs2.result | ||
multi_statement.result | ||
multi_update.result | ||
myisam-blob.result | ||
myisam-system.result | ||
myisam.result | ||
mysql.result | ||
mysql_client_test.result | ||
mysql_cp932.result | ||
mysql_protocols.result | ||
mysql_upgrade.result | ||
mysqladmin.result | ||
mysqlbinlog-cp932.result | ||
mysqlbinlog.result | ||
mysqlbinlog2.result | ||
mysqlbinlog_base64.result | ||
mysqlcheck.result | ||
mysqldump-compat.result | ||
mysqldump-max.result | ||
mysqldump.result | ||
mysqlshow.result | ||
mysqlslap.result | ||
mysqltest.result | ||
ndb_default_cluster.require | ||
negation_elimination.result | ||
no-threads.result | ||
not_as_root.require | ||
not_embedded.require | ||
not_embedded_server.result | ||
not_ndb.require | ||
not_ndb_default.require | ||
not_openssl.require | ||
not_partition.require | ||
not_partition.result | ||
not_valgrind.require | ||
not_windows.require | ||
null.result | ||
null_key.result | ||
odbc.result | ||
olap.result | ||
old-mode.result | ||
one_thread_per_connection.require | ||
openssl_1.result | ||
order_by.result | ||
order_fill_sortbuf.result | ||
outfile.result | ||
overflow.result | ||
packet.result | ||
parser.result | ||
parser_bug21114_innodb.result | ||
parser_precedence.result | ||
partition.result | ||
partition_02myisam.result | ||
partition_bug18198.result | ||
partition_charset.result | ||
partition_error.result | ||
partition_federated.result | ||
partition_grant.result | ||
partition_hash.result | ||
partition_innodb.result | ||
partition_list.result | ||
partition_mgm.result | ||
partition_mgm_err.result | ||
partition_mgm_err2.result | ||
partition_not_windows.result | ||
partition_order.result | ||
partition_pruning.result | ||
partition_range.result | ||
partition_windows.result | ||
perror.result | ||
plugin.result | ||
preload.result | ||
ps.result | ||
ps_1general.result | ||
ps_2myisam.result | ||
ps_3innodb.result | ||
ps_4heap.result | ||
ps_5merge.result | ||
ps_10nestset.result | ||
ps_11bugs.result | ||
ps_grant.result | ||
ps_maria.result | ||
ps_not_windows.result | ||
query_cache.result | ||
query_cache_merge.result | ||
query_cache_notembedded.result | ||
query_cache_ps_no_prot.result | ||
query_cache_ps_ps_prot.result | ||
query_cache_with_views.result | ||
raid.result | ||
range.result | ||
read_many_rows_innodb.result | ||
read_only.result | ||
read_only_innodb.result | ||
rename.result | ||
renamedb.result | ||
repair.result | ||
replace.result | ||
rollback.result | ||
round.result | ||
row.result | ||
rowid_order_innodb.result | ||
rpl_colSize.result | ||
rpl_extraColmaster_innodb.result | ||
rpl_extraColmaster_myisam.result | ||
schema.result | ||
select.result | ||
select_found.result | ||
select_safe.result | ||
server_id.require | ||
server_id1.require | ||
show_check.result | ||
skip_grants.result | ||
skip_name_resolve.result | ||
slave-running.result | ||
slave-stopped.result | ||
sp-big.result | ||
sp-code.result | ||
sp-destruct.result | ||
sp-dynamic.result | ||
sp-error.result | ||
sp-prelocking.result | ||
sp-security.result | ||
sp-threads.result | ||
sp-ucs2.result | ||
sp-vars.result | ||
sp.result | ||
sp_gis.result | ||
sp_notembedded.result | ||
sp_stress_case.result | ||
sp_trans.result | ||
sp_trans_log.result | ||
sql_mode.result | ||
ssl-big.result | ||
ssl.result | ||
ssl_8k_key.result | ||
ssl_compress.result | ||
ssl_connect.result | ||
status.result | ||
strict.result | ||
strict_autoinc_1myisam.result | ||
strict_autoinc_2innodb.result | ||
strict_autoinc_3heap.result | ||
strict_autoinc_4bdb.result | ||
subselect.result | ||
subselect2.result | ||
subselect3.result | ||
subselect_gis.result | ||
subselect_innodb.result | ||
subselect_notembedded.result | ||
sum_distinct-big.result | ||
sum_distinct.result | ||
symlink.result | ||
synchronization.result | ||
sysdate_is_now.result | ||
system_mysql_db.result | ||
system_mysql_db_refs.result | ||
tablelock.result | ||
temp_table.result | ||
testdb_only.require | ||
timezone.result | ||
timezone2.result | ||
timezone3.result | ||
timezone4.result | ||
timezone_grant.result | ||
trigger-compat.result | ||
trigger-grant.result | ||
trigger-trans.result | ||
trigger.result | ||
true.require | ||
truncate.result | ||
type_binary.result | ||
type_bit.result | ||
type_bit_innodb.result | ||
type_blob.result | ||
type_date.result | ||
type_datetime.result | ||
type_decimal.result | ||
type_enum.result | ||
type_float.result | ||
type_nchar.result | ||
type_newdecimal-big.result | ||
type_newdecimal.result | ||
type_ranges.result | ||
type_set.result | ||
type_time.result | ||
type_timestamp.result | ||
type_uint.result | ||
type_varchar.result | ||
type_year.result | ||
udf.result | ||
union.result | ||
unsafe_binlog_innodb.result | ||
update.result | ||
upgrade.result | ||
user_limits.result | ||
user_var-binlog.result | ||
user_var.result | ||
varbinary.result | ||
variables-big.result | ||
variables.result | ||
view.result | ||
view_grant.result | ||
wait_timeout.result | ||
warnings.result | ||
warnings_engine_disabled.result | ||
windows.require | ||
windows.result | ||
windows_shm.result | ||
xa.result | ||
xml.result |