summaryrefslogtreecommitdiff
path: root/include/myisamchk.h
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-12-31 11:55:46 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-12-31 11:55:46 +0200
commit6cad02044072403c652e2da9a3cc0dfd9713f1e6 (patch)
tree2c526d1754deff4582c354f19712550e132f5d37 /include/myisamchk.h
parent1e9ee8abbd348f3bf1f4342b4db69a025a289523 (diff)
downloadmariadb-git-6cad02044072403c652e2da9a3cc0dfd9713f1e6.tar.gz
Added maria_zerofill()
This is used to bzero all not used parts of the index pages and compact and bzero the not used parts of the data pages of block-record type Added --zerofill (-z) option to maria_chk (Mostly code from Jani) Added now table states ZEROFILLED and MOVEABLE Set state.changed with new states when things changes include/maria.h: Added maria_zerofill include/myisamchk.h: Added option for zerofill Extend testflag to be 64 to allow for more flags mysql-test/r/create.result: Updated results after merge mysql-test/r/maria.result: Updated results after merge mysys/my_getopt.c: Removed not used variable sql/sql_show.cc: Fixed wrong page type storage/maria/ma_blockrec.c: Renamed compact_page() to ma_compact_block_page() and made it global Always zerofill half filled blob pages Set share.state.changed on REDO storage/maria/ma_blockrec.h: Added _ma_compact_block_page() storage/maria/ma_check.c: Added maria_zerofill() This is used to bzero all not used parts of the index pages and compact and bzero the not used parts of the data pages of block-record type This gives the following benefits: - Table is smaller if compressed - All LSN are removed for transactinal tables and this makes them movable between systems Dont set table states of we are using --quick Changed log entry for repair to use 8 bytes for flag storage/maria/ma_delete.c: Simplify code Update state.changed storage/maria/ma_key_recover.c: Update state.changed storage/maria/ma_locking.c: Set uuid for file on first change if it's not set (table was cleared with zerofill) storage/maria/ma_loghandler.c: Updated log entry for REDO_REPAIR_TABLE storage/maria/ma_recovery.c: Updated log entry for REDO_REPAIR_TABLE (flag is now 8 bytes) Set new bits in state.changed storage/maria/ma_test_all.sh: Nicer output storage/maria/ma_test_recovery.expected: Updated results (now states flags are visible) storage/maria/ma_update.c: Update state.changed storage/maria/ma_write.c: Simplify code Set state.changed storage/maria/maria_chk.c: Added option --zerofill Added printing of states for MOVABLE and ZEROFILLED MYD -> MAD MYI -> MAI storage/maria/maria_def.h: Added states STATE_NOT_MOVABLE and STATE_NOT_ZEROFILLED Added prototype for new functions storage/maria/unittest/ma_test_all-t: More tests, including tests for zerofill Removed some not needed 'print' statements storage/maria/unittest/ma_test_loghandler_multithread-t.c: Smaller buffer to not trash devlopment machines totally
Diffstat (limited to 'include/myisamchk.h')
-rw-r--r--include/myisamchk.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/myisamchk.h b/include/myisamchk.h
index 3c5d59884be..3b18a631221 100644
--- a/include/myisamchk.h
+++ b/include/myisamchk.h
@@ -59,6 +59,7 @@
#define T_VERY_SILENT (1L << 29)
#define T_WAIT_FOREVER (1L << 30)
#define T_WRITE_LOOP ((ulong) 1L << 31)
+#define T_ZEROFILL ((ulonglong) 1L << 32)
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
@@ -129,13 +130,14 @@ typedef struct st_handler_check_param
ha_checksum tmp_key_crc[HA_MAX_POSSIBLE_KEY];
ha_checksum tmp_record_checksum;
ulonglong org_key_map;
+ ulonglong testflag;
size_t use_buffers, read_buffer_length, write_buffer_length;
size_t sort_buffer_length, sort_key_blocks;
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
uint out_flag, warning_printed, error_printed, verbose;
uint opt_sort_key, total_files, max_level;
- uint testflag, key_cache_block_size, pagecache_block_size;
+ uint key_cache_block_size, pagecache_block_size;
int tmpfile_createflag, err_count;
myf myf_rw;
uint8 language;