Removed blanks
This commit is contained in:
parent
6a5d4b6b80
commit
f053a2846a
@ -1,15 +1,15 @@
|
|||||||
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
@ -72,7 +72,7 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Failed on my_net_write, writing to stderr instead: %s\n",
|
"Failed on my_net_write, writing to stderr instead: %s\n",
|
||||||
msgbuf);
|
msgbuf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -134,7 +134,7 @@ int ha_myisam::net_read_dump(NET* net)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err:
|
err:
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ int ha_myisam::dump(THD* thd, int fd)
|
|||||||
my_net_write(net, "", 0);
|
my_net_write(net, "", 0);
|
||||||
net_flush(net);
|
net_flush(net);
|
||||||
}
|
}
|
||||||
|
|
||||||
err:
|
err:
|
||||||
my_free((gptr) buf, MYF(0));
|
my_free((gptr) buf, MYF(0));
|
||||||
return error;
|
return error;
|
||||||
@ -233,13 +233,13 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
|
|||||||
int error ;
|
int error ;
|
||||||
MI_CHECK param;
|
MI_CHECK param;
|
||||||
MYISAM_SHARE* share = file->s;
|
MYISAM_SHARE* share = file->s;
|
||||||
|
|
||||||
myisamchk_init(¶m);
|
myisamchk_init(¶m);
|
||||||
param.thd = thd;
|
param.thd = thd;
|
||||||
param.op_name = (char*)"check";
|
param.op_name = (char*)"check";
|
||||||
param.table_name = table->table_name;
|
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 | T_MEDIUM;
|
||||||
|
|
||||||
if (!(table->db_stat & HA_READ_ONLY))
|
if (!(table->db_stat & HA_READ_ONLY))
|
||||||
param.testflag|= T_STATISTICS;
|
param.testflag|= T_STATISTICS;
|
||||||
param.using_global_keycache = 1;
|
param.using_global_keycache = 1;
|
||||||
@ -270,8 +270,8 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
if ((share->state.changed & (STATE_CHANGED |
|
if ((share->state.changed & (STATE_CHANGED |
|
||||||
STATE_CRASHED_ON_REPAIR |
|
STATE_CRASHED_ON_REPAIR |
|
||||||
STATE_CRASHED | STATE_NOT_ANALYZED)) ||
|
STATE_CRASHED | STATE_NOT_ANALYZED)) ||
|
||||||
(param.testflag & T_STATISTICS))
|
(param.testflag & T_STATISTICS))
|
||||||
@ -299,7 +299,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
|
|||||||
mi_mark_crashed(file);
|
mi_mark_crashed(file);
|
||||||
file->update |= HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
|
file->update |= HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return error ? HA_CHECK_CORRUPT : HA_CHECK_OK;
|
return error ? HA_CHECK_CORRUPT : HA_CHECK_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ int ha_myisam::analyze(THD *thd)
|
|||||||
int error=0;
|
int error=0;
|
||||||
MI_CHECK param;
|
MI_CHECK param;
|
||||||
MYISAM_SHARE* share = file->s;
|
MYISAM_SHARE* share = file->s;
|
||||||
|
|
||||||
myisamchk_init(¶m);
|
myisamchk_init(¶m);
|
||||||
param.thd = thd;
|
param.thd = thd;
|
||||||
param.op_name = (char*)" analyze";
|
param.op_name = (char*)" analyze";
|
||||||
@ -328,7 +328,7 @@ int ha_myisam::analyze(THD *thd)
|
|||||||
{
|
{
|
||||||
error = chk_key(¶m, file);
|
error = chk_key(¶m, file);
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&share->intern_lock);
|
pthread_mutex_lock(&share->intern_lock);
|
||||||
#ifndef HAVE_PREAD
|
#ifndef HAVE_PREAD
|
||||||
pthread_mutex_lock(&THR_LOCK_keycache); // QQ; Has to be removed!
|
pthread_mutex_lock(&THR_LOCK_keycache); // QQ; Has to be removed!
|
||||||
@ -357,7 +357,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
|
|||||||
param.op_name = (char*) "repair";
|
param.op_name = (char*) "repair";
|
||||||
param.testflag = (check_opt->flags | T_SILENT|T_FORCE_CREATE|T_REP_BY_SORT|
|
param.testflag = (check_opt->flags | T_SILENT|T_FORCE_CREATE|T_REP_BY_SORT|
|
||||||
T_STATISTICS);
|
T_STATISTICS);
|
||||||
if (check_opt->quick)
|
if (check_opt->quick)
|
||||||
param.opt_rep_quick++;
|
param.opt_rep_quick++;
|
||||||
param.sort_buffer_length= check_opt->sort_buffer_size;
|
param.sort_buffer_length= check_opt->sort_buffer_size;
|
||||||
return repair(thd,param);
|
return repair(thd,param);
|
||||||
@ -377,11 +377,11 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m)
|
|||||||
VOID(fn_format(fixed_name,file->filename,"",MI_NAME_IEXT,
|
VOID(fn_format(fixed_name,file->filename,"",MI_NAME_IEXT,
|
||||||
4+ (param.opt_follow_links ? 16 : 0)));
|
4+ (param.opt_follow_links ? 16 : 0)));
|
||||||
if (mi_test_if_sort_rep(file,file->state->records))
|
if (mi_test_if_sort_rep(file,file->state->records))
|
||||||
error = mi_repair_by_sort(¶m, file, fixed_name, param.opt_rep_quick);
|
error = mi_repair_by_sort(¶m, file, fixed_name, param.opt_rep_quick);
|
||||||
else
|
else
|
||||||
error= mi_repair(¶m, file, fixed_name, param.opt_rep_quick);
|
error= mi_repair(¶m, file, fixed_name, param.opt_rep_quick);
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
if (share->state.changed & STATE_CHANGED)
|
if (share->state.changed & STATE_CHANGED)
|
||||||
{
|
{
|
||||||
share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED |
|
share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED |
|
||||||
@ -415,7 +415,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m)
|
|||||||
if (param.out_flag & O_NEW_DATA)
|
if (param.out_flag & O_NEW_DATA)
|
||||||
error|=change_to_newfile(fixed_name,MI_NAME_DEXT,
|
error|=change_to_newfile(fixed_name,MI_NAME_DEXT,
|
||||||
DATA_TMP_EXT, 0);
|
DATA_TMP_EXT, 0);
|
||||||
|
|
||||||
if (param.out_flag & O_NEW_INDEX)
|
if (param.out_flag & O_NEW_INDEX)
|
||||||
error|=change_to_newfile(fixed_name,MI_NAME_IEXT,
|
error|=change_to_newfile(fixed_name,MI_NAME_IEXT,
|
||||||
INDEX_TMP_EXT,0);
|
INDEX_TMP_EXT,0);
|
||||||
@ -448,7 +448,7 @@ bool ha_myisam::activate_all_index(THD *thd)
|
|||||||
thd->proc_info="creating index";
|
thd->proc_info="creating index";
|
||||||
myisamchk_init(¶m);
|
myisamchk_init(¶m);
|
||||||
param.op_name = (char*) "recreating_index";
|
param.op_name = (char*) "recreating_index";
|
||||||
param.testflag = (T_SILENT | T_REP_BY_SORT |
|
param.testflag = (T_SILENT | T_REP_BY_SORT |
|
||||||
T_STATISTICS | T_CREATE_MISSING_KEYS | T_TRUST_HEADER);
|
T_STATISTICS | T_CREATE_MISSING_KEYS | T_TRUST_HEADER);
|
||||||
param.myf_rw&= ~MY_WAIT_IF_FULL;
|
param.myf_rw&= ~MY_WAIT_IF_FULL;
|
||||||
param.sort_buffer_length= myisam_sort_buffer_size;
|
param.sort_buffer_length= myisam_sort_buffer_size;
|
||||||
@ -506,7 +506,7 @@ int ha_myisam::index_prev(byte * buf)
|
|||||||
table->status=error ? STATUS_NOT_FOUND: 0;
|
table->status=error ? STATUS_NOT_FOUND: 0;
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ha_myisam::index_first(byte * buf)
|
int ha_myisam::index_first(byte * buf)
|
||||||
{
|
{
|
||||||
statistic_increment(ha_read_first_count,&LOCK_status);
|
statistic_increment(ha_read_first_count,&LOCK_status);
|
||||||
@ -641,7 +641,7 @@ int ha_myisam::delete_table(const char *name)
|
|||||||
int ha_myisam::external_lock(THD *thd, int lock_type)
|
int ha_myisam::external_lock(THD *thd, int lock_type)
|
||||||
{
|
{
|
||||||
return mi_lock_database(file,lock_type);
|
return mi_lock_database(file,lock_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
THR_LOCK_DATA **ha_myisam::store_lock(THD *thd,
|
THR_LOCK_DATA **ha_myisam::store_lock(THD *thd,
|
||||||
@ -848,8 +848,8 @@ int ha_myisam::create(const char *name, register TABLE *form,
|
|||||||
((options & HA_OPTION_CHECKSUM) ? HA_CREATE_CHECKSUM : 0) |
|
((options & HA_OPTION_CHECKSUM) ? HA_CREATE_CHECKSUM : 0) |
|
||||||
((options & HA_OPTION_DELAY_KEY_WRITE) ?
|
((options & HA_OPTION_DELAY_KEY_WRITE) ?
|
||||||
HA_CREATE_DELAY_KEY_WRITE : 0)));
|
HA_CREATE_DELAY_KEY_WRITE : 0)));
|
||||||
|
|
||||||
|
|
||||||
my_free((gptr) recinfo,MYF(0));
|
my_free((gptr) recinfo,MYF(0));
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user