summaryrefslogtreecommitdiff
path: root/storage/maria/ma_locking.c
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot4.local>2007-10-08 19:08:25 +0200
committerunknown <guilhem@gbichot4.local>2007-10-08 19:08:25 +0200
commit63ff9877a588477e646afda9a0b30befc5e02866 (patch)
tree3cee2a41cb705c7a4b17818661c3652784f74902 /storage/maria/ma_locking.c
parentdcd4b6f540d205f37a5db4e8911f40c4c41736c1 (diff)
downloadmariadb-git-63ff9877a588477e646afda9a0b30befc5e02866.tar.gz
WL#3072 Maria recovery
Misc changes: - fix for benign Valgrind error, compiler warnings - fix for a segfault in execution of maria_delete_all_rows() and one when taking multiple checkpoints - fix for too paranoid assertion - adding ability to take checkpoints at the end of the REDO phase and at the end of recovery. - other minor changes storage/maria/ha_maria.cc: The checkpoint done after Recovery is finished, is moved to maria_recover(). storage/maria/ma_bitmap.c: fix for Valgrind error: the "shadow debug copy" of the bitmap page started unitialized and so ma_print_bitmap() would use it uninitialized storage/maria/ma_checkpoint.c: * reset pointers to NULL after freeing them, or we segfault at next checkpoint in my_realloc(). * fix for compiler warnings. storage/maria/ma_delete_all.c: info->trn is NULL for non-transactional tables storage/maria/ma_locking.c: correct assertion (it fired wrongly in execution of REDO_DROP_TABLE due to the maria_extra(HA_PREPARE_FOR_DROP)->_ma_decrement_open_count() ->maria_lock_database(F_UNLCK); another solution would have been to not call _ma_decrement_open_count() (it's ok to have a wrong open count in a table which we are dropping), but the same problem would still exist for REDO_RENAME_TABLE. storage/maria/ma_loghandler.c: fail early if UNRECOVERABLE_ERROR storage/maria/ma_recovery.c: * new argument to maria_apply_log(): should it take checkpoints (at end of REDO phase and at the very end) or no. * moving the call to translog_next_LSN() into parse_checkpoint_record() ("hide the details"). * Refining an error detection for something which could happen if there is a checkpoint record in the log. * Using close_one_table() instead of maria_extra(HA_EXTRA_PREPARE_FOR_DROP|RENAME), as it looks safer, and also changing how close_one_table() works: it now limits itself to scanning all_tables[], thus having one loopp instead of two, which should be faster (as a result, it does not close tables not registered in this array, which is ok as there should not be any). storage/maria/ma_recovery.h: new parameter storage/maria/maria_read_log.c: update to new prototype
Diffstat (limited to 'storage/maria/ma_locking.c')
-rw-r--r--storage/maria/ma_locking.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/maria/ma_locking.c b/storage/maria/ma_locking.c
index 178ced3906f..9fc364e2af8 100644
--- a/storage/maria/ma_locking.c
+++ b/storage/maria/ma_locking.c
@@ -140,8 +140,13 @@ int maria_lock_database(MARIA_HA *info, int lock_type)
}
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
info->lock_type= F_UNLCK;
- /* verify that user of the table cleaned up after itself */
- DBUG_ASSERT(share->now_transactional == share->base.born_transactional);
+ /*
+ Verify that user of the table cleaned up after itself. Not in
+ recovery, as for example maria_extra(HA_EXTRA_PREPARE_FOR_RENAME) may
+ call us here, with transactionality temporarily disabled.
+ */
+ DBUG_ASSERT(maria_in_recovery ||
+ share->now_transactional == share->base.born_transactional);
break;
case F_RDLCK:
if (info->lock_type == F_WRLCK)