Loading sql/ha_myisam.cc +6 −10 Original line number Diff line number Diff line Loading @@ -617,16 +617,12 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, 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). /* the following 'if', thought conceptually wrong, is a useful optimization nevertheless. */ if (file->state == & file->save_state) file->s->state.state=file->save_state; else file->save_state=file->s->state.state; if (file->state != &file->s->state.state); file->s->state.state = *file->state; if (file->s->base.auto_key) update_auto_increment_key(¶m, file, 1); if (optimize_done) Loading Loading
sql/ha_myisam.cc +6 −10 Original line number Diff line number Diff line Loading @@ -617,16 +617,12 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, 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). /* the following 'if', thought conceptually wrong, is a useful optimization nevertheless. */ if (file->state == & file->save_state) file->s->state.state=file->save_state; else file->save_state=file->s->state.state; if (file->state != &file->s->state.state); file->s->state.state = *file->state; if (file->s->base.auto_key) update_auto_increment_key(¶m, file, 1); if (optimize_done) Loading