Drizzled Public API Documentation

check_transaction_log.inc

00001 # check_transaction_log.inc
00002 # a test-run include file that will check the transaction log contents
00003 # through a variety of means.
00004 # For a given query we will check the data_dictoionary views:
00005 #      transaction_log
00006 #      transaction_log_entries
00007 #      transaction_log_transactions
00008 # We will also check the transaction log contents via the 
00009 # udf - PRINT_TRANSACTION_MESSAGE(transaction_log, <offset>)
00010 
00011 #--echo # check transaction_log
00012 #--replace_column 7 START_TIMESTAMP 8 END_TIMESTAMP 9 INDEX_SIZE
00013 #SELECT COUNT(*) FROM DATA_DICTIONARY.TRANSACTION_LOG;
00014 #--echo
00015 
00016 --echo Check transaction_log_entries
00017 SELECT COUNT(*) FROM DATA_DICTIONARY.TRANSACTION_LOG_ENTRIES;
00018 --echo
00019 
00020 --echo Check transaction_log_transactions
00021 --replace_column 4 START_TIMESTAMP 5 END_TIMESTAMP
00022 SELECT COUNT(*) FROM DATA_DICTIONARY.TRANSACTION_LOG_TRANSACTIONS;
00023 
00024 --echo Check transaction log contents
00025 --replace_regex /start_timestamp: [0-9]+/START_TIMESTAMP/g /end_timestamp: [0-9]+/END_TIMESTAMP/g /creation_timestamp: [0-9]+/CREATE_TIMESTAMP/g /update_timestamp: [0-9]+/UPDATE_TIMESTAMP/g /uuid: [-a-zA-Z0-9"]+/UUID/g /transaction_id: [0-9]+/TRANSACTION_ID/
00026 
00027 SELECT PRINT_TRANSACTION_MESSAGE('transaction.log',(select max(entry_offset) from DATA_DICTIONARY.TRANSACTION_LOG_TRANSACTIONS));
00028 --echo
00029 COMMIT;