summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2000-11-22 03:45:02 +0200
committermonty@donna.mysql.com <>2000-11-22 03:45:02 +0200
commite049538cb02c000e7c62d5662429b7db02941844 (patch)
tree86a351dd4dd65b86a54c5a4cf62c8500e6ae110b /sql/ha_myisam.cc
parent4f91d5b5fe1349c5bdf6be567dece52cc632d8e7 (diff)
downloadmariadb-git-e049538cb02c000e7c62d5662429b7db02941844.tar.gz
Split error message for crashed table to 3 different error messages.
Fixes for Windows
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 630a672d346..7f658303a4c 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -259,6 +259,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
(uint) (share->global_changed ? 1 : 0)))))
return HA_ADMIN_ALREADY_DONE;
+ error = chk_status(&param, file); // Not fatal
error = chk_size(&param, file);
if (!error)
error |= chk_del(&param, file, param.testflag);
@@ -266,8 +267,10 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
error = chk_key(&param, file);
if (!error)
{
- if (!check_opt->quick &&
- (share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)))
+ if ((!check_opt->quick &&
+ (share->options &
+ (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) ||
+ mi_is_crashed(file))
{
init_io_cache(&param.read_cache, file->dfile,
my_default_record_cache_size, READ_CACHE,
@@ -281,7 +284,8 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
if ((share->state.changed & (STATE_CHANGED |
STATE_CRASHED_ON_REPAIR |
STATE_CRASHED | STATE_NOT_ANALYZED)) ||
- (param.testflag & T_STATISTICS))
+ (param.testflag & T_STATISTICS) ||
+ mi_is_crashed(file))
{
file->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
pthread_mutex_lock(&share->intern_lock);