summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-06-25 21:56:23 +0300
committerunknown <monty@mysql.com>2004-06-25 21:56:23 +0300
commitba8ffc50a96897f85f32c01485d44730b9deb383 (patch)
tree06dc93aec118ef2da622d0ade5ab9cf7f4664b88
parentc6e23c85493688417c0274b4630a6b7c44f59d10 (diff)
downloadmariadb-git-ba8ffc50a96897f85f32c01485d44730b9deb383.tar.gz
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
-rw-r--r--include/mysql.h1
-rw-r--r--sql-common/client.c4
-rw-r--r--sql/opt_range.cc4
-rw-r--r--sql/sql_handler.cc2
-rw-r--r--sql/sql_insert.cc6
5 files changed, 12 insertions, 5 deletions
diff --git a/include/mysql.h b/include/mysql.h
index cd1226fb272..0f3fdc90548 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -302,7 +302,6 @@ typedef struct st_mysql_res {
#endif
-
typedef struct st_mysql_manager
{
NET net;
diff --git a/sql-common/client.c b/sql-common/client.c
index 5c1a718c5bb..e6c36965f97 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -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
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index e3a9ba4d01d..08856c88c49 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -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;
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index c31763d7f1d..56c1b0a1b51 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -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))
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index a946dec4f35..b769178565b 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -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);