Loading mysql-test/r/repair.result 0 → 100644 +7 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1 SELECT 1,"table 1"; repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair warning Number of rows changed from 0 to 1 test.t1 repair status OK drop table if exists t1; mysql-test/t/repair.test 0 → 100644 +8 −0 Original line number Diff line number Diff line # # Test of repair table # drop table if exists t1; create table t1 SELECT 1,"table 1"; repair table t1 use_frm; drop table if exists t1; sql/sql_table.cc +2 −0 Original line number Diff line number Diff line Loading @@ -972,7 +972,9 @@ static int prepare_for_repair(THD* thd, TABLE_LIST* table, fn_format(from, from, "", MI_NAME_DEXT, 4); sprintf(tmp,"%s-%lx_%lx", from, current_pid, thd->thread_id); pthread_mutex_lock(&LOCK_open); close_cached_table(thd,table->table); pthread_mutex_unlock(&LOCK_open); if (lock_and_wait_for_table_name(thd,table)) DBUG_RETURN(-1); Loading Loading
mysql-test/r/repair.result 0 → 100644 +7 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1 SELECT 1,"table 1"; repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair warning Number of rows changed from 0 to 1 test.t1 repair status OK drop table if exists t1;
mysql-test/t/repair.test 0 → 100644 +8 −0 Original line number Diff line number Diff line # # Test of repair table # drop table if exists t1; create table t1 SELECT 1,"table 1"; repair table t1 use_frm; drop table if exists t1;
sql/sql_table.cc +2 −0 Original line number Diff line number Diff line Loading @@ -972,7 +972,9 @@ static int prepare_for_repair(THD* thd, TABLE_LIST* table, fn_format(from, from, "", MI_NAME_DEXT, 4); sprintf(tmp,"%s-%lx_%lx", from, current_pid, thd->thread_id); pthread_mutex_lock(&LOCK_open); close_cached_table(thd,table->table); pthread_mutex_unlock(&LOCK_open); if (lock_and_wait_for_table_name(thd,table)) DBUG_RETURN(-1); Loading