diff options
author | monty@donna.mysql.fi <> | 2001-04-18 23:47:11 +0300 |
---|---|---|
committer | monty@donna.mysql.fi <> | 2001-04-18 23:47:11 +0300 |
commit | bc6fd0acaaf59ae1c11b0079a45895b86ed3ff83 (patch) | |
tree | 62925f613305f153cac7b3281ddea83336002c0d /sql/ha_myisam.cc | |
parent | 5a5e2be98a36db13002f5de4628327acce05f6dd (diff) | |
download | mariadb-git-bc6fd0acaaf59ae1c11b0079a45895b86ed3ff83.tar.gz |
Added test for PTHREAD_YIELD
Removed test of default master parameter
Don't lock locked tables in REPAIR
Changed optimzation for SELECT * from table,table ORDER BY keypart LIMIT
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r-- | sql/ha_myisam.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 1a205e54b9d..b6cfc2c3612 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -533,7 +533,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) VOID(fn_format(fixed_name,file->filename,"",MI_NAME_IEXT, 4+ (param.opt_follow_links ? 16 : 0))); - if (mi_lock_database(file,F_WRLCK)) + // Don't lock tables if we have used LOCK TABLE + if (!thd->locked_tables && mi_lock_database(file,F_WRLCK)) { mi_check_print_error(¶m,ER(ER_CANT_LOCK),my_errno); DBUG_RETURN(HA_ADMIN_FAILED); @@ -615,7 +616,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) update_state_info(¶m, file, 0); } thd->proc_info=old_proc_info; - mi_lock_database(file,F_UNLCK); + if (!thd->locked_tables) + mi_lock_database(file,F_UNLCK); DBUG_RETURN(error ? HA_ADMIN_FAILED : !optimize_done ? HA_ADMIN_ALREADY_DONE : HA_ADMIN_OK); } |