2006-04-11 15:45:10 +02:00
|
|
|
/* Copyright (C) 2006 MySQL AB
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
|
|
|
/* Definitions needed for myisamchk/mariachk.c */
|
|
|
|
|
|
|
|
/*
|
|
|
|
Entries marked as "QQ to be removed" are NOT used to
|
|
|
|
pass check/repair options to xxx_check.c. They are used
|
|
|
|
internally by xxxchk.c or/and ha_xxxx.cc and should NOT
|
|
|
|
be stored together with other flags. They should be removed
|
|
|
|
from the following list to make addition of new flags possible.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _myisamchk_h
|
|
|
|
#define _myisamchk_h
|
|
|
|
|
|
|
|
#define T_AUTO_INC 1
|
|
|
|
#define T_AUTO_REPAIR 2 /* QQ to be removed */
|
|
|
|
#define T_BACKUP_DATA 4
|
|
|
|
#define T_CALC_CHECKSUM 8
|
2013-05-12 23:43:46 +02:00
|
|
|
#define T_CHECK 16
|
|
|
|
#define T_CHECK_ONLY_CHANGED 32
|
2006-04-11 15:45:10 +02:00
|
|
|
#define T_CREATE_MISSING_KEYS 64
|
|
|
|
#define T_DESCRIPT 128
|
|
|
|
#define T_DONT_CHECK_CHECKSUM 256
|
|
|
|
#define T_EXTEND 512
|
2013-05-12 23:43:46 +02:00
|
|
|
#define T_FAST (1L << 10)
|
|
|
|
#define T_FORCE_CREATE (1L << 11)
|
2006-04-11 15:45:10 +02:00
|
|
|
#define T_FORCE_UNIQUENESS (1L << 12)
|
|
|
|
#define T_INFO (1L << 13)
|
|
|
|
#define T_MEDIUM (1L << 14)
|
2013-05-12 23:43:46 +02:00
|
|
|
#define T_QUICK (1L << 15)
|
|
|
|
#define T_READONLY (1L << 16)
|
2006-04-11 15:45:10 +02:00
|
|
|
#define T_REP (1L << 17)
|
2013-05-12 23:43:46 +02:00
|
|
|
#define T_REP_BY_SORT (1L << 18)
|
|
|
|
#define T_REP_PARALLEL (1L << 19)
|
2006-04-11 15:45:10 +02:00
|
|
|
#define T_RETRY_WITHOUT_QUICK (1L << 20)
|
|
|
|
#define T_SAFE_REPAIR (1L << 21)
|
|
|
|
#define T_SILENT (1L << 22)
|
2013-05-12 23:43:46 +02:00
|
|
|
#define T_SORT_INDEX (1L << 23)
|
|
|
|
#define T_SORT_RECORDS (1L << 24)
|
2006-04-11 15:45:10 +02:00
|
|
|
#define T_STATISTICS (1L << 25)
|
|
|
|
#define T_UNPACK (1L << 26)
|
|
|
|
#define T_UPDATE_STATE (1L << 27)
|
|
|
|
#define T_VERBOSE (1L << 28)
|
|
|
|
#define T_VERY_SILENT (1L << 29)
|
|
|
|
#define T_WAIT_FOREVER (1L << 30)
|
|
|
|
#define T_WRITE_LOOP ((ulong) 1L << 31)
|
2007-12-31 10:55:46 +01:00
|
|
|
#define T_ZEROFILL ((ulonglong) 1L << 32)
|
2008-02-11 16:36:34 +01:00
|
|
|
#define T_ZEROFILL_KEEP_LSN ((ulonglong) 1L << 33)
|
WL#3072 - Maria Recovery
Bulk insert: don't log REDO/UNDO for rows, log one UNDO which will
truncate files; this is an optimization and a bugfix (table was left
half-repaired by crash).
Repair: mark table crashed-on-repair at start, bump skip_redo_lsn at start,
this is easier for recovery (tells it to skip old REDOs or even UNDO
phase) and user (tells it to repair) in case of crash, sync files
in the end.
Recovery skips missing or corrupted table and moves to next record
(in REDO or UNDO phase) to be more robust; warns if happens in UNDO phase.
Bugfix for UNDO_KEY_DELETE_WITH_ROOT (tested in ma_test_recovery)
and maria_enable_indexes().
Create missing bitmaps when needed (there can be more than one to create,
in rare cases), log a record for this.
include/myisamchk.h:
new flag: bulk insert repair mustn't bump create_rename_lsn
mysql-test/lib/mtr_report.pl:
skip normal warning in maria-recovery.test
mysql-test/r/maria-recovery.result:
result: crash before bulk insert is committed, causes proper rollback,
and crash right after OPTIMIZE replaces index file with new index file
leads to table marked corrupted and recovery not failing.
mysql-test/t/maria-recovery.test:
- can't check the table or it would commit the transaction,
but check is made after recovery.
- test of crash before bulk-insert-with-repair is committed
(to see if it is rolled back), and of crash after OPTIMIZE has replaced
index file but not finished all operations (to see if recovery fails -
it used to assert when trying to execute an old REDO on the new
index).
storage/maria/CMakeLists.txt:
new file
storage/maria/Makefile.am:
new file
storage/maria/ha_maria.cc:
- If bulk insert on a transactional table using an index repair:
table is initially empty, so don't log REDO/UNDO for data rows
(optimization), just log an UNDO_BULK_INSERT_WITH_REPAIR
which will, if executed, empty the data and index file. Re-enable
logging in end_bulk_insert().
- write log record for repair operation only after it's fully done,
index sort including (maria_repair*() used to write the log record).
- Adding back file->trn=NULL which was removed by mistake earlier.
storage/maria/ha_maria.h:
new member (see ha_maria.cc)
storage/maria/ma_bitmap.c:
Functions to create missing bitmaps:
- one function which creates missing bitmaps in page cache, except
the missing one with max offset which it does not put into page cache
as it will be modified very soon.
- one function which the one above calls, and creates bitmaps in page
cache
- one function to execute REDO_BITMAP_NEW_PAGE which uses the second
one above.
storage/maria/ma_blockrec.c:
- when logging REDO_DELETE_ALL, not only 'records' and 'checksum'
has to be reset under log's mutex.
- execution of REDO_INSERT_ROW_BLOBS now checks the dirty pages' list
- execution of UNDO_BULK_INSERT_WITH_REPAIR
storage/maria/ma_blockrec.h:
new functions
storage/maria/ma_check.c:
- table-flush-before-repair is moved to a separate function reused
by maria_sort_index(); syncing is added
- maria_repair() is allowed to re-enable logging only if it is the one
which disabled it.
- "_ma_flush_table_files_after_repair" was a bad name, it's not after
repair now, and it should not sync as we do more changes to the files
shortly after (sync is postponed to when writing the log record)
- REDO_REPAIR record should be written only after all repair
operations (in particular after sorting index in ha_mara::repair())
- close to the end of repair by sort, flushing of pages must happen
also in the non-quick case, to prepare for the sync at end.
- in parallel repair, some page flushes are not needed as done
by initialize_variables_for_repair().
storage/maria/ma_create.c:
Update skip_redo_lsn, create_rename_lsn optionally.
storage/maria/ma_delete_all.c:
Need to sync files at end of maria_delete_all_rows(), if transactional.
storage/maria/ma_extra.c:
During repair, we sometimes call _ma_flush_table_files() (via
_ma_flush_table_files_before_swap()) while there is a WRITE_CACHE.
storage/maria/ma_key_recover.c:
- when we see CLR_END for UNDO_BULK_INSERT_WITH_REPAIR, re-enable
indices.
- fixing bug: _ma_apply_undo_key_delete() parsed UNDO_KEY_DELETE_WITH_ROOT
wrongly, leading to recovery failure
storage/maria/ma_key_recover.h:
new prototype
storage/maria/ma_locking.c:
DBUG_VOID_RETURN missing
storage/maria/ma_loghandler.c:
UNDO for bulk insert with repair, and REDO for creating bitmaps.
LOGREC_FIRST_FREE to not have to change the for() every time we
add a new record type.
storage/maria/ma_loghandler.h:
new UNDO and REDO
storage/maria/ma_open.c:
Move share.kfile.file=kfile up a bit, so that _ma_update_state_lsns()
can get its value, this fixes a bug where LSN_REPAIRED_BY_MARIA_CHK
was not corrected on disk by maria_open().
Store skip_redo_lsn in index' header.
maria_enable_indexes() had a bug for BLOCK_RECORD, where an empty
file has one page, not 0 bytes.
storage/maria/ma_recovery.c:
- Skip a corrupted, missing, or repaired-with-maria_chk, table in
recovery: don't fail, just go to next REDO or UNDO; but if an UNDO
is skipped in UNDO phase we issue warnings.
- Skip REDO|UNDO in REDO phase if <skip_redo_lsn.
- If UNDO phase fails, delete transactions to not make trnman
assert.
- Update skip_redo_lsn when playing REDO_CREATE_TABLE
- Don't record UNDOs for old transactions which we don't know (long_trid==0)
- Bugfix for UNDO_KEY_DELETE_WITH_ROOT (see ma_key_recover.c)
- Execution of UNDO_BULK_INSERT_WITH_REPAIR
- Don't try to find a page number in REDO_DELETE_ALL
- Pieces moved to ma_recovery_util.c
storage/maria/ma_rename.c:
name change
storage/maria/ma_static.c:
I modified layout of the index' header (inserted skip_redo_lsn in its middle)
storage/maria/ma_test2.c:
allow breaking the test towards the end, tests execution of
UNDO_KEY_DELETE_WITH_ROOT
storage/maria/ma_test_recovery.expected:
6 as testflag instead of 4
storage/maria/ma_test_recovery:
Increase the amount of rollback work to do when testing recovery
with ma_test2; this reproduces the UNDO_KEY_DELETE_WITH_ROOT bug.
storage/maria/maria_chk.c:
skip_redo_lsn should be updated too, for consistency.
Write a REDO_REPAIR after all operations (including sort-records)
have been done.
No reason to flush blocks after maria_chk_data_link() and
maria_sort_records(), there is maria_close() in the end.
write_log_record() is a function, to not clutter maria_chk().
storage/maria/maria_def.h:
New member skip_redo_lsn in the state, and comments
storage/maria/maria_pack.c:
skip_redo_lsn should be updated too, for consistency
storage/maria/ma_recovery_util.c:
_ma_redo_not_needed_for_page(), defined in ma_recovery.c, is needed
by ma_blockrec.c; this causes link issues, resolved by putting
_ma_redo_not_needed_for_page() into a new file (so that it is not
in the same file as repair-related objects of ma_recovery.c).
storage/maria/ma_recovery_util.h:
new file
2008-01-17 23:59:32 +01:00
|
|
|
/** If repair should not bump create_rename_lsn */
|
|
|
|
#define T_NO_CREATE_RENAME_LSN ((ulonglong) 1L << 33)
|
2006-04-11 15:45:10 +02:00
|
|
|
|
|
|
|
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
|
|
|
|
|
|
|
|
/*
|
|
|
|
Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed
|
|
|
|
to xxxcheck.c follows:
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define TT_USEFRM 1
|
|
|
|
#define TT_FOR_UPGRADE 2
|
|
|
|
|
2010-11-07 13:25:29 +01:00
|
|
|
/* Bits set in out_flag */
|
2006-04-11 15:45:10 +02:00
|
|
|
#define O_NEW_DATA 2
|
|
|
|
#define O_DATA_LOST 4
|
|
|
|
|
|
|
|
typedef struct st_sort_key_blocks /* Used when sorting */
|
|
|
|
{
|
2007-07-02 19:45:15 +02:00
|
|
|
uchar *buff, *end_pos;
|
|
|
|
uchar lastkey[HA_MAX_POSSIBLE_KEY_BUFF];
|
2006-04-11 15:45:10 +02:00
|
|
|
uint last_length;
|
|
|
|
int inited;
|
|
|
|
} SORT_KEY_BLOCKS;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
MARIA/MYISAM supports several statistics collection
|
|
|
|
methods. Currently statistics collection method is not stored in
|
|
|
|
MARIA file and has to be specified for each table analyze/repair
|
|
|
|
operation in MI_CHECK::stats_method.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
/* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
|
|
|
|
MI_STATS_METHOD_NULLS_NOT_EQUAL,
|
|
|
|
/* Treat NULLs as equal when collecting statistics (like 4.0 did) */
|
|
|
|
MI_STATS_METHOD_NULLS_EQUAL,
|
|
|
|
/* Ignore NULLs - count only tuples without NULLs in the index components */
|
|
|
|
MI_STATS_METHOD_IGNORE_NULLS
|
|
|
|
} enum_handler_stats_method;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct st_handler_check_param
|
|
|
|
{
|
|
|
|
char *isam_file_name;
|
|
|
|
MY_TMPDIR *tmpdir;
|
|
|
|
void *thd;
|
|
|
|
const char *db_name, *table_name, *op_name;
|
|
|
|
ulonglong auto_increment_value;
|
|
|
|
ulonglong max_data_file_length;
|
|
|
|
ulonglong keys_in_use;
|
|
|
|
ulonglong max_record_length;
|
|
|
|
/*
|
|
|
|
The next two are used to collect statistics, see update_key_parts for
|
|
|
|
description.
|
|
|
|
*/
|
|
|
|
ulonglong unique_count[HA_MAX_KEY_SEG + 1];
|
|
|
|
ulonglong notnull_count[HA_MAX_KEY_SEG + 1];
|
|
|
|
|
|
|
|
my_off_t search_after_block;
|
|
|
|
my_off_t new_file_pos, key_file_blocks;
|
|
|
|
my_off_t keydata, totaldata, key_blocks, start_check_pos;
|
2008-01-07 17:54:41 +01:00
|
|
|
my_off_t used, empty, splits, del_length, link_used, lost;
|
2007-01-18 20:38:14 +01:00
|
|
|
ha_rows total_records, total_deleted, records,del_blocks;
|
|
|
|
ha_rows full_page_count, tail_count;
|
2006-04-11 15:45:10 +02:00
|
|
|
ha_checksum record_checksum, glob_crc;
|
|
|
|
ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
|
2007-01-18 20:38:14 +01:00
|
|
|
ha_checksum tmp_key_crc[HA_MAX_POSSIBLE_KEY];
|
|
|
|
ha_checksum tmp_record_checksum;
|
2007-12-04 22:23:42 +01:00
|
|
|
ulonglong org_key_map;
|
2007-12-31 10:55:46 +01:00
|
|
|
ulonglong testflag;
|
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 04:26:36 +02:00
|
|
|
|
|
|
|
/* Following is used to check if rows are visible */
|
|
|
|
ulonglong max_trid, max_found_trid;
|
|
|
|
ulonglong not_visible_rows_found;
|
2013-03-08 19:09:45 +01:00
|
|
|
ulonglong sort_buffer_length;
|
2009-09-07 22:50:10 +02:00
|
|
|
ulonglong use_buffers; /* Used as param to getopt() */
|
2013-03-08 19:09:45 +01:00
|
|
|
size_t read_buffer_length, write_buffer_length, sort_key_blocks;
|
2010-11-07 13:25:29 +01:00
|
|
|
time_t backup_time; /* To sign backup files */
|
2006-04-11 15:45:10 +02:00
|
|
|
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
2007-10-09 20:09:50 +02:00
|
|
|
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
2011-09-09 18:44:07 +02:00
|
|
|
uint out_flag, warning_printed, error_printed, note_printed, verbose;
|
2006-04-11 15:45:10 +02:00
|
|
|
uint opt_sort_key, total_files, max_level;
|
2007-12-31 10:55:46 +01:00
|
|
|
uint key_cache_block_size, pagecache_block_size;
|
2007-01-18 20:38:14 +01:00
|
|
|
int tmpfile_createflag, err_count;
|
2006-04-11 15:45:10 +02:00
|
|
|
myf myf_rw;
|
2010-11-25 18:17:28 +01:00
|
|
|
uint16 language;
|
2006-04-11 15:45:10 +02:00
|
|
|
my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
|
2007-01-18 20:38:14 +01:00
|
|
|
my_bool retry_repair, force_sort, calc_checksum, static_row_size;
|
2006-04-11 15:45:10 +02:00
|
|
|
char temp_filename[FN_REFLEN];
|
|
|
|
IO_CACHE read_cache;
|
|
|
|
enum_handler_stats_method stats_method;
|
2011-07-01 14:08:30 +02:00
|
|
|
/* For reporting progress */
|
|
|
|
uint stage, max_stage;
|
|
|
|
uint progress_counter; /* How often to call _report_progress() */
|
|
|
|
ulonglong progress, max_progress;
|
|
|
|
|
2011-04-25 17:22:25 +02:00
|
|
|
mysql_mutex_t print_msg_mutex;
|
2009-11-16 21:49:51 +01:00
|
|
|
my_bool need_print_msg_lock;
|
2006-04-11 15:45:10 +02:00
|
|
|
} HA_CHECK;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct st_sort_ftbuf
|
|
|
|
{
|
2007-07-02 19:45:15 +02:00
|
|
|
uchar *buf, *end;
|
2006-04-11 15:45:10 +02:00
|
|
|
int count;
|
2007-07-02 19:45:15 +02:00
|
|
|
uchar lastkey[HA_MAX_KEY_BUFF];
|
2006-04-11 15:45:10 +02:00
|
|
|
} SORT_FT_BUF;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct st_buffpek {
|
|
|
|
my_off_t file_pos; /* Where we are in the sort file */
|
2007-07-02 19:45:15 +02:00
|
|
|
uchar *base, *key; /* Key pointers */
|
2006-04-11 15:45:10 +02:00
|
|
|
ha_rows count; /* Number of rows in table */
|
|
|
|
ulong mem_count; /* numbers of keys in memory */
|
|
|
|
ulong max_keys; /* Max keys in buffert */
|
|
|
|
} BUFFPEK;
|
|
|
|
|
|
|
|
#endif /* _myisamchk_h */
|