summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-10-23 15:35:42 +0300
committerunknown <monty@donna.mysql.com>2000-10-23 15:35:42 +0300
commit76edea0d7354133743b3608213653c5a7f3c94ce (patch)
tree20b25b09438bf3aad77ad7810faab9651daf310f /myisam
parent3d10e826ffc1423ced9a2d845a8e617b0d569f58 (diff)
downloadmariadb-git-76edea0d7354133743b3608213653c5a7f3c94ce.tar.gz
Fix of automatic repair
Docs/manual.texi: Update for 3.23.27 configure.in: Fixed syntax error include/m_string.h: bmove() was wrongly defined (old code was probably never executed) myisam/mi_check.c: Fix for automatic repair myisam/myisamchk.c: Fix for automatic repair sql/ha_myisam.cc: Fix for automatic repair sql/handler.cc: Fix for automatic repair sql/mysqlbinlog.cc: Indentation sql/sql_insert.cc: Move incrementation of thread_count to make things safer sql/sql_parse.cc: Added a new state for bug tracking sql/sql_select.cc: Increment created_tmp_disk_tables for each internal temporary MyISAM table. Added path to some printf statements.
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c13
-rw-r--r--myisam/myisamchk.c2
2 files changed, 11 insertions, 4 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 351c2d469da..2e3df08083d 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -1048,6 +1048,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
mi_check_print_error(param,"got error: %d when reading datafile",my_errno);
err2:
my_afree((gptr) record);
+ param->retry_without_quick=1;
DBUG_RETURN(1);
} /* chk_data_link */
@@ -2052,6 +2053,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
{
if (param->read_cache.error)
param->out_flag |= O_DATA_LOST;
+ param->retry_repair=param->retry_without_quick=1;
DBUG_RETURN(-1);
}
sort_info->start_recpos=sort_info->pos;
@@ -2076,7 +2078,10 @@ static int sort_get_next_record(SORT_INFO *sort_info)
found_record=block_info.second_read= 0;
left_length=1;
if (searching)
+ {
pos=MY_ALIGN(pos,MI_DYN_ALIGN_SIZE);
+ param->retry_without_quick=1;
+ }
do
{
if (pos > sort_info->max_pos)
@@ -2084,11 +2089,10 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (pos & (MI_DYN_ALIGN_SIZE-1))
{
if ((param->testflag & T_VERBOSE) || searching == 0)
- {
mi_check_print_info(param,"Wrong aligned block at %s",
llstr(pos,llbuff));
+ if (searching)
goto try_next;
- }
}
if (found_record && pos == param->search_after_block)
mi_check_print_info(param,"Block: %s used by record at %s",
@@ -2110,6 +2114,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (searching && ! sort_info->fix_datafile)
{
param->error_printed=1;
+ param->retry_repair=param->retry_without_quick=1;
DBUG_RETURN(1); /* Something wrong with data */
}
if (((b_type=_mi_get_block_info(&block_info,-1,pos)) &
@@ -2230,7 +2235,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
{
mi_check_print_error(param,"Not enough memory for blob at %s",
llstr(sort_info->start_recpos,llbuff));
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
}
}
else
@@ -2305,6 +2310,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
if (searching && ! sort_info->fix_datafile)
{
param->error_printed=1;
+ param->retry_repair=param->retry_without_quick=1;
DBUG_RETURN(1); /* Something wrong with data */
}
sort_info->start_recpos=sort_info->pos;
@@ -2958,6 +2964,7 @@ int update_state_info(MI_CHECK *param, MI_INFO *info,uint update)
}
if (mi_state_info_write(share->kfile,&share->state,1+2))
goto err;
+ share->changed=0;
}
{ /* Force update of status */
int error;
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index 7d9ba9b7c28..29259d15c1a 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -196,7 +196,7 @@ static struct option long_options[] =
static void print_version(void)
{
- printf("%s Ver 1.35 for %s at %s\n",my_progname,SYSTEM_TYPE,
+ printf("%s Ver 1.36 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
}