summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-11-13 23:38:19 +0100
committerunknown <serg@serg.mysql.com>2002-11-13 23:38:19 +0100
commit9f8277f9a4b743549b148df11b52a7d14af8412f (patch)
tree5860bf943511260e77178dd936c6727deb24e734 /sql/ha_myisam.cc
parent30fb37d53c420fb1ffdf4a6886c4e0a4ca44c962 (diff)
parent3a58dc5a4ecb0cf0f3ed29c9250ba7adec784fae (diff)
downloadmariadb-git-9f8277f9a4b743549b148df11b52a7d14af8412f.tar.gz
merged
BitKeeper/etc/gone: auto-union BitKeeper/etc/logging_ok: auto-union sql/ha_myisam.cc: Auto merged innobase/row/row0sel.c: merged (ul - as 3.23's fix was a backport from 4.0) mysql-test/r/myisam.result: merged - ul
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index a92c4f64668..b4ca822784a 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -566,7 +566,6 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
}
if (!optimize ||
- memcmp(file->state, & share->state.state, sizeof(MI_STATUS_INFO)) ||
((file->state->del || share->state.split != file->state->records) &&
(!(param.testflag & T_QUICK) ||
!(share->state.changed & STATE_NOT_OPTIMIZED_KEYS))))
@@ -625,7 +624,16 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
STATE_CRASHED_ON_REPAIR);
file->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
}
- file->save_state=file->s->state.state;
+ /* Here we need to make file->save_state and file->s->state.state
+ equal. Unfortunately, sometime table comes locked here (so
+ file->save_state represents actual table state), and sometime
+ unlocked (and actual is file->s->state.state instead). This all
+ is very confusing, and should be streamlined (TODO).
+ */
+ if (file->state == & file->save_state)
+ file->s->state.state=file->save_state;
+ else
+ file->save_state=file->s->state.state;
if (file->s->base.auto_key)
update_auto_increment_key(&param, file, 1);
if (optimize_done)