summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-04-18 23:47:11 +0300
committerunknown <monty@donna.mysql.fi>2001-04-18 23:47:11 +0300
commit9d36f27bb021a3496e3b08c91f62a27daaad7664 (patch)
tree62925f613305f153cac7b3281ddea83336002c0d /sql/ha_myisam.cc
parentdc72a9d59abc5291f68dc0e27a9852908d5bf064 (diff)
downloadmariadb-git-9d36f27bb021a3496e3b08c91f62a27daaad7664.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 BitKeeper/deleted/.del-have_default_master.inc~a54c86e65a6c4af: Delete: mysql-test/include/have_default_master.inc BitKeeper/deleted/.del-have_default_master.require~1465255ffdaf82f: Delete: mysql-test/r/have_default_master.require Docs/manual.texi: Changelog for 3.23.38 acconfig.h: Added test for PTHREAD_YIELD acinclude.m4: Added test for PTHREAD_YIELD configure.in: Added test for PTHREAD_YIELD innobase/os/os0thread.c: Added test for PTHREAD_YIELD mysql-test/r/lock.result: Added test of lock bug mysql-test/t/lock.test: Added test of lock bug mysql-test/t/rpl000014.test: Removed test of default master parameter mysql-test/t/rpl000015.test: Removed test of default master parameter mysql-test/t/rpl000016.test: Removed test of default master parameter sql/ha_myisam.cc: Don't lock locked tables in REPAIR sql/sql_select.cc: Changed optimzation for SELECT * from table,table ORDER BY keypart LIMIT
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc6
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 &param, 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(&param,ER(ER_CANT_LOCK),my_errno);
DBUG_RETURN(HA_ADMIN_FAILED);
@@ -615,7 +616,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
update_state_info(&param, 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);
}