Commit e7a01ed3 authored by monty@mysql.com's avatar monty@mysql.com

After merge fixes

parent b1d08ba2
......@@ -302,7 +302,6 @@ typedef struct st_mysql_res {
#endif
typedef struct st_mysql_manager
{
NET net;
......
......@@ -39,6 +39,10 @@
#include "mysql.h"
/* Remove client convenience wrappers */
#undef max_allowed_packet
#undef net_buffer_length
#ifdef EMBEDDED_LIBRARY
#undef MYSQL_SERVER
......
......@@ -629,7 +629,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
if (!records)
records++; /* purecov: inspected */
scan_time=(double) records / TIME_FOR_COMPARE+1;
read_time=(double) head->file->scan_time()+ scan_time + 1.0;
read_time=(double) head->file->scan_time()+ scan_time + 1.1;
if (head->force_index)
scan_time= read_time= DBL_MAX;
if (limit < records)
......@@ -749,6 +749,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
param.range_count,
found_records)+
(double) found_records / TIME_FOR_COMPARE);
DBUG_PRINT("info",("read_time: %g found_read_time: %g",
read_time, found_read_time));
if (read_time > found_read_time && found_records != HA_POS_ERROR)
{
read_time=found_read_time;
......
......@@ -108,7 +108,7 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables,
!no_alias, dont_lock, &was_flushed);
if (*table_ptr)
{
(*ptr)->file->ha_index_or_rnd_end();
(*table_ptr)->file->ha_index_or_rnd_end();
if (!dont_lock)
VOID(pthread_mutex_lock(&LOCK_open));
if (close_thread_table(thd, table_ptr))
......
......@@ -1219,8 +1219,10 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
di->status=0;
if (!di->stacked_inserts && !di->tables_in_use && thd->lock)
{
/* No one is doing a insert delayed;
Unlock it so that other threads can use it */
/*
No one is doing a insert delayed
Unlock table so that other threads can use it
*/
MYSQL_LOCK *lock=thd->lock;
thd->lock=0;
pthread_mutex_unlock(&di->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment