summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authoringo@mysql.com <>2005-10-26 14:01:54 +0200
committeringo@mysql.com <>2005-10-26 14:01:54 +0200
commit5f51294a3ce2f40483adb23a5140c90ff95c007f (patch)
treec12184e8c66ad1e14f66fa8b150e3fa3fe1a0e7a /sql/ha_myisam.cc
parent1cb37294dee5a6882b0ff387854ffd110ab2c8a3 (diff)
downloadmariadb-git-5f51294a3ce2f40483adb23a5140c90ff95c007f.tar.gz
1.2048 05/10/20 10:31:16 ingo@mysql.com +1 -0
Bug#12166 - Unable to index very large tables Moved clearing of errors behind the second repair attempt, but will clear only if no error happened. No test case. The error can be repeated with little free space on tmpdir only. I do not know of a way to create this in a portable way with our test suite. I did however attach a shell script to the bug report which can easily be adapted to the situation on the test machine.
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 70137ff2b16..ced00c94e73 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -985,11 +985,16 @@ int ha_myisam::enable_indexes(uint mode)
{
sql_print_warning("Warning: Enabling keys got errno %d, retrying",
my_errno);
- thd->clear_error();
+ /* Repairing by sort failed. Now try standard repair method. */
param.testflag&= ~(T_REP_BY_SORT | T_QUICK);
error= (repair(thd,param,0) != HA_ADMIN_OK);
- if (!error && thd->net.report_error)
- error= HA_ERR_CRASHED;
+ /*
+ If the standard repair succeeded, clear all error messages which
+ might have been set by the first repair. They can still be seen
+ with SHOW WARNINGS then.
+ */
+ if (! error)
+ thd->clear_error();
}
info(HA_STATUS_CONST);
thd->proc_info=save_proc_info;