summaryrefslogtreecommitdiff
path: root/myisam/myisamchk.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-08-18 12:48:00 +0300
committerunknown <monty@donna.mysql.com>2000-08-18 12:48:00 +0300
commit6a5d4b6b80899ccffb7fab93c7fe2099bdb15eb8 (patch)
treedc12a8a920e65278811e12ea88c8d7d24390be23 /myisam/myisamchk.c
parentc4543517a39e376ce12a86b2d68baf98fde4880e (diff)
downloadmariadb-git-6a5d4b6b80899ccffb7fab93c7fe2099bdb15eb8.tar.gz
Updated benchmark and results for PostgreSQL 7.0.2
Added more status to the MyISAM files to avoid checking files that has already been checked. Docs/manual.texi: Turn off RCS flag BitKeeper/deleted/.del-ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-ATIS-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-RUN-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-alter-table-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-big-tables-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-connect-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-create-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-insert-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-select-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-wisconsin-pg_fast-Linux_2.2.14_5.0_i686: ***MISSING WEAVE*** BitKeeper/deleted/.del-ATIS-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-RUN-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-alter-table-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-big-tables-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-connect-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-create-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-insert-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-select-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-wisconsin-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** BitKeeper/deleted/.del-wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg: ***MISSING WEAVE*** dbug/Makefile.am: Fix for bitkeeper extra/Makefile.am: Fix for bitkeeper heap/Makefile.am: Fix for bitkeeper isam/Makefile.am: Fix for bitkeeper merge/Makefile.am: Fix for bitkeeper myisam/ChangeLog: Added more status for the MyISAM table myisam/Makefile.am: Fix for bitkeeper myisam/mi_check.c: Added more status for the MyISAM table myisam/mi_extra.c: Added more status for the MyISAM table myisam/mi_page.c: Added more status for the MyISAM table myisam/myisamchk.c: Added more status for the MyISAM table myisammrg/Makefile.am: Fix for bitkeeper mysys/Makefile.am: Fix for bitkeeper readline/Makefile.am: Fix for bitkeeper regex/Makefile.am: Fix for bitkeeper scripts/Makefile.am: Fix for bitkeeper sql-bench/Comments/Access.crash-me: Comments for crash-me sql-bench/Comments/Adabas.crash-me: Comments for crash-me sql-bench/Comments/Empress.crash-me: Comments for crash-me sql-bench/Comments/Informix.crash-me: Comments for crash-me sql-bench/Comments/postgres.benchmark: Updated documentation sql-bench/Comments/postgres.crash-me: Comments for crash-me sql-bench/Makefile.am: Added the Comments directory sql-bench/Results/ATIS-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/ATIS-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/RUN-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/RUN-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/alter-table-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/big-tables-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/connect-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/connect-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/create-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/create-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/insert-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/insert-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/select-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/select-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/wisconsin-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg: Version number fix sql-bench/compare-results.sh: Fix bug in --relative sql-bench/test-insert.sh: Fix for duplicate key test sql/ha_myisam.cc: Don't check checked tables sql/lex.h: Remove MAX as a reserved keyword sql/sql_yacc.yy: Remove MAX as a reserved keyword strings/Makefile.am: Fix for bitkeeper support-files/Makefile.am: Fix for bitkeeper tests/Makefile.am: Fix for bitkeeper vio/Makefile.am: Fix for bitkeeper
Diffstat (limited to 'myisam/myisamchk.c')
-rw-r--r--myisam/myisamchk.c41
1 files changed, 31 insertions, 10 deletions
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index 4f2288322e8..abfb580b501 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -190,7 +190,7 @@ static struct option long_options[] =
static void print_version(void)
{
- printf("%s Ver 1.28 for %s at %s\n",my_progname,SYSTEM_TYPE,
+ printf("%s Ver 1.29 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
}
@@ -520,7 +520,9 @@ static int myisamchk(MI_CHECK *param, my_string filename)
We are using --fast and the table is closed properly
We are using --check-only-changed-tables and the table hasn't changed
*/
- if ((param->testflag & T_CHECK_ONLY_CHANGED) && !share->state.changed ||
+ if (((param->testflag & T_CHECK_ONLY_CHANGED) &&
+ (share->state.changed & (STATE_CHANGED | STATE_CRASHED |
+ STATE_CRASHED_ON_REPAIR))) ||
(param->testflag & T_FAST) && share->state.open_count == 0)
{
if (!(param->testflag & T_SILENT) || param->testflag & T_INFO)
@@ -687,7 +689,8 @@ static int myisamchk(MI_CHECK *param, my_string filename)
if (!error && param->testflag & T_SORT_INDEX)
error=mi_sort_index(param,info,fixed_name);
if (!error)
- share->state.changed=0;
+ share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED |
+ STATE_CRASHED_ON_REPAIR);
else
mi_mark_crashed(info);
}
@@ -734,9 +737,11 @@ static int myisamchk(MI_CHECK *param, my_string filename)
}
if (!error)
{
- if (share->state.changed && (param->testflag & T_UPDATE_STATE))
+ if ((share->state.changed & STATE_CHANGED) &&
+ (param->testflag & T_UPDATE_STATE))
info->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
- share->state.changed=0;
+ share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED |
+ STATE_CRASHED_ON_REPAIR);
}
else if (!mi_is_crashed(info) &&
(param->testflag & T_UPDATE_STATE))
@@ -815,7 +820,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name)
reg3 MI_KEYDEF *keyinfo;
reg2 MI_KEYSEG *keyseg;
reg4 const char *text;
- char buff[40],length[10],*pos,*end;
+ char buff[160],length[10],*pos,*end;
enum en_fieldtype type;
MYISAM_SHARE *share=info->s;
char llbuff[22],llbuff2[22];
@@ -847,10 +852,26 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name)
get_date(buff,1,share->state.check_time);
printf("Recover time: %s\n",buff);
}
- printf("Status: %s\n",
- share->state.changed & 2 ? "crashed" :
- share->state.open_count ? "open" :
- share->state.changed ? "changed" : "checked");
+ pos=buff;
+ if (share->state.changed & STATE_CRASHED)
+ strmov(buff,"crashed");
+ else
+ {
+ if (share->state.open_count)
+ pos=strmov(pos,"open,");
+ if (share->state.changed & STATE_CHANGED)
+ pos=strmov(pos,"changed,");
+ else
+ pos=strmov(pos,"checked,");
+ if (!(share->state.changed & STATE_NOT_ANALYZED))
+ pos=strmov(pos,"analyzed,");
+ if (!(share->state.changed & STATE_NOT_OPTIMIZED_KEYS))
+ pos=strmov(pos,"optimized keys,");
+ if (!(share->state.changed & STATE_NOT_SORTED_PAGES))
+ pos=strmov(pos,"sorted index pages,");
+ pos[-1]=0; /* Remove extra ',' */
+ }
+ printf("Status: %s\n",buff);
if (share->base.auto_key)
{
printf("Auto increment key: %13d Last value: %13s\n",