summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-11-14 22:42:19 +0100
committerunknown <serg@serg.mysql.com>2002-11-14 22:42:19 +0100
commitf9fffc777149e67c522a96e3d4c2b85afd7c47fb (patch)
treed1cc11958a1af5f784a6e5ae5e1124776566c78c /sql/ha_myisam.cc
parent1f2c27022f836a45aefe0ca51e490c63585c14e2 (diff)
parent037136cd4ff97a9e6f6efeec1400dd8ab21fd9c6 (diff)
downloadmariadb-git-f9fffc777149e67c522a96e3d4c2b85afd7c47fb.tar.gz
Merge serg.mysql.com:/usr/home/serg/Abk/mysql
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0 sql/ha_myisam.cc: Auto merged
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index b4ca822784a..e9b1a454046 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -624,16 +624,12 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
STATE_CRASHED_ON_REPAIR);
file->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
}
- /* 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;
+ /*
+ the following 'if', thought conceptually wrong,
+ is a useful optimization nevertheless.
+ */
+ if (file->state != &file->s->state.state);
+ file->s->state.state = *file->state;
if (file->s->base.auto_key)
update_auto_increment_key(&param, file, 1);
if (optimize_done)