diff options
author | unknown <monty@donna.mysql.com> | 2001-01-16 15:02:25 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-01-16 15:02:25 +0200 |
commit | 86b58e29471cfba2d5f7f3f7adfb6e448cc0018f (patch) | |
tree | f2d56706f932b8495846a884f7a9aa8bbbab0e3f /sql | |
parent | 64289e22b6e234a9888869264d01160d241e0548 (diff) | |
download | mariadb-git-86b58e29471cfba2d5f7f3f7adfb6e448cc0018f.tar.gz |
Fixed bug in CHECK TABLE ... EXTENDED
Added keyword MEDIUM to CHECK TABLE
New benchmarks results for Linux-alpha
BitKeeper/deleted/.del-READ-ME~ed6c5184d4bf6b7c:
Delete: strings/READ-ME
BitKeeper/deleted/.del-ATIS-mysql-Linux_2.2.13_SMP_alpha~21ddf9425cbdd58:
Delete: sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-RUN-mysql-Linux_2.2.13_SMP_alpha~583091e05a25fb6:
Delete: sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-alter-table-mysql-Linux_2.2.13_SMP_alpha~6c20c9ef46f82241:
Delete: sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-big-tables-mysql-Linux_2.2.13_SMP_alpha~e8cc899bb933532f:
Delete: sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-connect-mysql-Linux_2.2.13_SMP_alpha~84df7c6446e51e26:
Delete: sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-create-mysql-Linux_2.2.13_SMP_alpha~2c9af91e9771f618:
Delete: sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-insert-mysql-Linux_2.2.13_SMP_alpha~688809eb8ea77b3d:
Delete: sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-select-mysql-Linux_2.2.13_SMP_alpha~db59425a7f4aa93f:
Delete: sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.2.13_SMP_alpha~fc410754151d622c:
Delete: sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha
Docs/manual.texi:
Updated ChangeLog
myisam/mi_close.c:
Force write of crashed flag on close
myisam/mi_info.c:
Fixed that mean_reclength works for big files
mysql-test/r/show_check.result:
Added test of CHECK TABLE ... MEDIUM
mysql-test/t/show_check.test:
Added test of CHECK TABLE ... MEDIUM
sql/ha_myisam.cc:
Fixed that CHECK TABLE .. EXTENDED works properly
Cleared the CRASHED flag on repair
sql/lex.h:
Added keyword MEDIUM
sql/sql_yacc.yy:
Added CHECK TABLE .. MEDIUM
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_myisam.cc | 12 | ||||
-rw-r--r-- | sql/lex.h | 1 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 3 |
3 files changed, 12 insertions, 4 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index ecebe9d4ff2..7e6c4a697fa 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -246,7 +246,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) param.thd = thd; param.op_name = (char*)"check"; param.table_name = table->table_name; - param.testflag = check_opt->flags | T_CHECK | T_SILENT | T_MEDIUM; + param.testflag = check_opt->flags | T_CHECK | T_SILENT; if (!(table->db_stat & HA_READ_ONLY)) param.testflag|= T_STATISTICS; @@ -270,15 +270,19 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) if (!error) { if ((!check_opt->quick && - (share->options & - (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) || + ((share->options & + (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) || + (param.testflag & (T_EXTEND | T_MEDIUM)))) || mi_is_crashed(file)) { + uint old_testflag=param.testflag; + param.testflag|=T_MEDIUM; init_io_cache(¶m.read_cache, file->dfile, my_default_record_cache_size, READ_CACHE, share->pack.header_length, 1, MYF(MY_WME)); error |= chk_data_link(¶m, file, param.testflag & T_EXTEND); end_io_cache(&(param.read_cache)); + param.testflag=old_testflag; } } if (!error) @@ -548,7 +552,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) thd->proc_info="saving state"; if (!error) { - if (share->state.changed & STATE_CHANGED) + if ((share->state.changed & STATE_CHANGED) || mi_is_crashed(file)) { share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED | STATE_CRASHED_ON_REPAIR); diff --git a/sql/lex.h b/sql/lex.h index 399106bfd77..dd691f29bbc 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -207,6 +207,7 @@ static SYMBOL symbols[] = { { "MEDIUMTEXT", SYM(MEDIUMTEXT),0,0}, { "MEDIUMINT", SYM(MEDIUMINT),0,0}, { "MERGE", SYM(MERGE_SYM),0,0}, + { "MEDIUM", SYM(MEDIUM_SYM),0,0}, { "MIDDLEINT", SYM(MEDIUMINT),0,0}, /* For powerbuilder */ { "MIN_ROWS", SYM(MIN_ROWS),0,0}, { "MINUTE", SYM(MINUTE_SYM),0,0}, diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 94c1ea943e7..4c50f50b001 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -205,6 +205,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token MASTER_CONNECT_RETRY_SYM %token MATCH %token MAX_ROWS +%token MEDIUM_SYM %token MERGE_SYM %token MIN_ROWS %token MYISAM_SYM @@ -1156,6 +1157,7 @@ mi_check_types: mi_check_type: QUICK { Lex->check_opt.quick = 1; } | FAST_SYM { Lex->check_opt.flags|= T_FAST; } + | MEDIUM_SYM { Lex->check_opt.flags|= T_MEDIUM; } | EXTENDED_SYM { Lex->check_opt.flags|= T_EXTEND; } | CHANGED { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; } @@ -2510,6 +2512,7 @@ keyword: | MASTER_USER_SYM {} | MASTER_PASSWORD_SYM {} | MASTER_CONNECT_RETRY_SYM {} + | MEDIUM_SYM {} | MERGE_SYM {} | MINUTE_SYM {} | MIN_ROWS {} |