diff options
author | unknown <serg@serg.mylan> | 2005-03-09 19:22:30 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-09 19:22:30 +0100 |
commit | d1b3c64b230e35dccf33ac7bb70bdd52f779536b (patch) | |
tree | f16bb48edb46705380ea8ac84c64b53a1a81b163 | |
parent | cd4961830ef37a6c4470ec22fecdf308fc307a46 (diff) | |
download | mariadb-git-d1b3c64b230e35dccf33ac7bb70bdd52f779536b.tar.gz |
after merge fixes
mysql-test/r/fulltext.result:
after merge - test results updated
sql/sql_class.cc:
protection
-rw-r--r-- | mysql-test/r/fulltext.result | 1 | ||||
-rw-r--r-- | mysys/my_bitmap.c | 6 | ||||
-rw-r--r-- | sql/ha_heap.cc | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 4 | ||||
-rw-r--r-- | sql/protocol.cc | 4 | ||||
-rw-r--r-- | sql/sql_class.cc | 6 |
6 files changed, 14 insertions, 9 deletions
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index fa1e6a75e52..34d1213d1b2 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -132,6 +132,7 @@ a b MySQL has now support for full-text search select * from t1 where MATCH a,b AGAINST ('"now support"' IN BOOLEAN MODE); a b +MySQL has now support for full-text search select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE); a b MySQL has now support for full-text search diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index 462c4ec4692..c0eb6f15548 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -28,8 +28,8 @@ * when both arguments are bitmaps, they must be of the same size * bitmap_intersect() is an exception :) (for for Bitmap::intersect(ulonglong map2buff)) - - If THREAD is defined all bitmap operations except bitmap_init/bitmap_free + + If THREAD is defined all bitmap operations except bitmap_init/bitmap_free are thread-safe. TODO: @@ -40,6 +40,7 @@ #include <my_bitmap.h> #include <m_string.h> +static inline void bitmap_lock(MY_BITMAP *map) { #ifdef THREAD if (map->mutex) @@ -47,6 +48,7 @@ #endif } +static inline void bitmap_unlock(MY_BITMAP *map) { #ifdef THREAD if (map->mutex) diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index b5884b17093..7dc7da4dad6 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -489,8 +489,6 @@ int ha_heap::create(const char *name, TABLE *table_arg, default: DBUG_ASSERT(0); // cannot happen } - keydef[key].algorithm= ((pos->algorithm == HA_KEY_ALG_UNDEF) ? - HA_KEY_ALG_HASH : pos->algorithm); for (; key_part != key_part_end; key_part++, seg++) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4b56154cf64..8e5668e684a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1462,8 +1462,8 @@ void close_connection(THD *thd, uint errcode, bool lock) errcode ? ER(errcode) : "")); if (lock) (void) pthread_mutex_lock(&LOCK_thread_count); - thd->killed=1; - if ((vio=thd->net.vio) != 0) + thd->killed= THD::KILL_CONNECTION; + if ((vio= thd->net.vio) != 0) { if (errcode) net_send_error(thd, errcode, ER(errcode)); /* purecov: inspected */ diff --git a/sql/protocol.cc b/sql/protocol.cc index f84be5b1947..71908d2a958 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -60,7 +60,7 @@ void net_send_error(THD *thd, uint sql_errno, const char *err) char buff[MYSQL_ERRMSG_SIZE+2], *pos; #endif NET *net= &thd->net; - bool generate_warning= 1; + bool generate_warning= thd->killed != THD::KILL_CONNECTION; DBUG_ENTER("net_send_error"); DBUG_PRINT("enter",("sql_errno: %d err: %s", sql_errno, err ? err : net->last_error[0] ? @@ -252,7 +252,7 @@ net_printf_error(THD *thd, uint errcode, ...) strmake(net->last_error, text_pos, length); strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH); #endif - if (!thd->killed) + if (thd->killed != THD::KILL_CONNECTION) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, errcode, text_pos ? text_pos : ER(errcode)); thd->is_fatal_error=0; // Error message is given diff --git a/sql/sql_class.cc b/sql/sql_class.cc index bac3e42ed62..e8879e8c66f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1781,7 +1781,11 @@ void TMP_TABLE_PARAM::init() void thd_increment_bytes_sent(ulong length) { - current_thd->status_var.bytes_sent+= length; + THD *thd=current_thd; + if (likely(thd)) + { /* current_thd==0 when close_connection() calls net_send_error() */ + thd->status_var.bytes_sent+= length; + } } |