From 9d36f27bb021a3496e3b08c91f62a27daaad7664 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Apr 2001 23:47:11 +0300 Subject: 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 --- sql/ha_myisam.cc | 6 ++++-- sql/sql_select.cc | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sql') 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); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e726a9969ca..77cf20f813a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -528,9 +528,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List &fields,COND *conds, if (order && (join.const_tables == join.tables || test_if_skip_sort_order(&join.join_tab[join.const_tables], order, - (having || group || - join.const_tables != join.tables - 1) ? - HA_POS_ERROR : thd->select_limit))) + (group ? HA_POS_ERROR : thd->select_limit)))) order=0; select_describe(&join,need_tmp, (order != 0 && -- cgit v1.2.1