After merge fixes
include/mysql.h: Cleanup sql-common/client.c: Allow client.c to compile after changes to mysql.h sql/opt_range.cc: Make bdb.test repeatable (and assume that table scans is a little bit slower) sql/sql_handler.cc: Fixed typo during merge sql/sql_insert.cc: Fixed indentation
This commit is contained in:
parent
c6e23c8549
commit
ba8ffc50a9
@ -302,7 +302,6 @@ typedef struct st_mysql_res {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct st_mysql_manager
|
typedef struct st_mysql_manager
|
||||||
{
|
{
|
||||||
NET net;
|
NET net;
|
||||||
|
@ -39,6 +39,10 @@
|
|||||||
|
|
||||||
#include "mysql.h"
|
#include "mysql.h"
|
||||||
|
|
||||||
|
/* Remove client convenience wrappers */
|
||||||
|
#undef max_allowed_packet
|
||||||
|
#undef net_buffer_length
|
||||||
|
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
|
||||||
#undef MYSQL_SERVER
|
#undef MYSQL_SERVER
|
||||||
|
@ -629,7 +629,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
|||||||
if (!records)
|
if (!records)
|
||||||
records++; /* purecov: inspected */
|
records++; /* purecov: inspected */
|
||||||
scan_time=(double) records / TIME_FOR_COMPARE+1;
|
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)
|
if (head->force_index)
|
||||||
scan_time= read_time= DBL_MAX;
|
scan_time= read_time= DBL_MAX;
|
||||||
if (limit < records)
|
if (limit < records)
|
||||||
@ -749,6 +749,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
|||||||
param.range_count,
|
param.range_count,
|
||||||
found_records)+
|
found_records)+
|
||||||
(double) found_records / TIME_FOR_COMPARE);
|
(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)
|
if (read_time > found_read_time && found_records != HA_POS_ERROR)
|
||||||
{
|
{
|
||||||
read_time=found_read_time;
|
read_time=found_read_time;
|
||||||
|
@ -108,7 +108,7 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables,
|
|||||||
!no_alias, dont_lock, &was_flushed);
|
!no_alias, dont_lock, &was_flushed);
|
||||||
if (*table_ptr)
|
if (*table_ptr)
|
||||||
{
|
{
|
||||||
(*ptr)->file->ha_index_or_rnd_end();
|
(*table_ptr)->file->ha_index_or_rnd_end();
|
||||||
if (!dont_lock)
|
if (!dont_lock)
|
||||||
VOID(pthread_mutex_lock(&LOCK_open));
|
VOID(pthread_mutex_lock(&LOCK_open));
|
||||||
if (close_thread_table(thd, table_ptr))
|
if (close_thread_table(thd, table_ptr))
|
||||||
|
@ -1219,8 +1219,10 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
|
|||||||
di->status=0;
|
di->status=0;
|
||||||
if (!di->stacked_inserts && !di->tables_in_use && thd->lock)
|
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;
|
MYSQL_LOCK *lock=thd->lock;
|
||||||
thd->lock=0;
|
thd->lock=0;
|
||||||
pthread_mutex_unlock(&di->mutex);
|
pthread_mutex_unlock(&di->mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user