From 04fc6fd0806409b6c930610cb4551e7e92a815ed Mon Sep 17 00:00:00 2001 From: "jcole@tetra.spaceapes.com" <> Date: Wed, 24 Jan 2001 22:35:53 -0600 Subject: [PATCH 01/11] New empty News-3.23.33 section added to manual. --- Docs/manual.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index ade214b3b3f..da4b95ae4ed 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -40674,6 +40674,7 @@ users uses this code as the rest of the code and because of this we are not yet 100 % confident in this code. @menu +* News-3.23.33:: Changes in release 3.23.33 * News-3.23.32:: Changes in release 3.23.32 * News-3.23.31:: Changes in release 3.23.31 * News-3.23.30:: Changes in release 3.23.30 @@ -40709,7 +40710,12 @@ not yet 100 % confident in this code. * News-3.23.0:: Changes in release 3.23.0 @end menu -@node News-3.23.32, News-3.23.31, News-3.23.x, News-3.23.x +@node News-3.23.33, News-3.23.32, News-3.23.x, News-3.23.x +@appendixsubsec Changes in release 3.23.33 +@itemize @bullet +@end itemize + +@node News-3.23.32, News-3.23.31, News-3.23.33, News-3.23.x @appendixsubsec Changes in release 3.23.32 @itemize @bullet @item From 89b5dab2f4397855b5e139dd18dc1e2f276d6abd Mon Sep 17 00:00:00 2001 From: "jcole@tetra.spaceapes.com" <> Date: Wed, 24 Jan 2001 22:39:45 -0600 Subject: [PATCH 02/11] mysql* -P 3307 uses TCP/IP now. --- Docs/manual.texi | 2 ++ client/mysql.cc | 4 ++++ client/mysqladmin.c | 4 ++++ client/mysqldump.c | 4 ++++ client/mysqlshow.c | 4 ++++ client/mysqltest.c | 4 ++++ 6 files changed, 22 insertions(+) diff --git a/Docs/manual.texi b/Docs/manual.texi index da4b95ae4ed..fe251c355a5 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -40713,6 +40713,8 @@ not yet 100 % confident in this code. @node News-3.23.33, News-3.23.32, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.33 @itemize @bullet +@item +Changed clients to use TCP/IP when -P or --port option is specified. @end itemize @node News-3.23.32, News-3.23.31, News-3.23.33, News-3.23.x diff --git a/client/mysql.cc b/client/mysql.cc index d0300344ba4..11bf5640020 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -692,6 +692,10 @@ static int get_options(int argc, char **argv) skip_column_names=1; break; case 'P': + if(!current_host) { + my_free(current_host, MYF(MY_ALLOW_ZERO_PTR)); + current_host=my_strdup("127.0.0.1", MYF(MY_WME)); + }; opt_mysql_port= (unsigned int) atoi(optarg); break; case 'S': diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 2a9d47edf44..b17559aafd6 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -185,6 +185,10 @@ int main(int argc,char *argv[]) interval=atoi(optarg); break; case 'P': + if(!host) { + my_free(host, MYF(MY_ALLOW_ZERO_PTR)); + host=my_strdup("127.0.0.1", MYF(MY_WME)); + }; tcp_port= (unsigned int) atoi(optarg); break; case 'r': diff --git a/client/mysqldump.c b/client/mysqldump.c index efb632cf5e4..c5ae758541c 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -344,6 +344,10 @@ static int get_options(int *argc,char ***argv) tty_password=1; break; case 'P': + if(!current_host) { + my_free(current_host, MYF(MY_ALLOW_ZERO_PTR)); + current_host=my_strdup("127.0.0.1", MYF(MY_WME)); + }; opt_mysql_port= (unsigned int) atoi(optarg); break; case 'S': diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 8fffe02a52f..f341108d8d4 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -238,6 +238,10 @@ get_options(int *argc,char ***argv) break; #endif case 'P': + if(!host) { + my_free(host, MYF(MY_ALLOW_ZERO_PTR)); + host=my_strdup("127.0.0.1", MYF(MY_WME)); + }; opt_mysql_port= (unsigned int) atoi(optarg); break; case 'S': diff --git a/client/mysqltest.c b/client/mysqltest.c index b7c0c09579c..c282cadf1df 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1149,6 +1149,10 @@ int parse_args(int argc, char **argv) tty_password=1; break; case 'P': + if(!host) { + my_free(host, MYF(MY_ALLOW_ZERO_PTR)); + host=my_strdup("127.0.0.1", MYF(MY_WME)); + }; port = atoi(optarg); break; case 'S': From 7c5db0d36468456fd47f5aa67115fc266e77b711 Mon Sep 17 00:00:00 2001 From: "paul@central.snake.net" <> Date: Fri, 26 Jan 2001 17:30:14 -0600 Subject: [PATCH 03/11] manual.texi minor edits to change notes. --- Docs/manual.texi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index d57dcdbbaf7..df903a22191 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -40815,13 +40815,13 @@ not yet 100 % confident in this code. @itemize bullet @item Fixed bug in replication that broke slave server start with existing -@code{master.info} - bug introduced in 3.23.32 +@code{master.info}. This fixes a bug introduced in 3.23.32. @item Added @code{SET SQL_SLAVE_SKIP_COUNTER=n} command to recover from -replication glitches without a full database copy +replication glitches without a full database copy. @item -Added @code{max_binlog_size} variable - binary log will be rotated -automatically once the size crosses the limit. +Added @code{max_binlog_size} variable; the binary log will be rotated +automatically when the size crosses the limit. @item Added @code{Last_error}, @code{Last_errno}, and @code{Slave_skip_counter} to @code{SHOW SLAVE STATUS}. @@ -40834,7 +40834,7 @@ Execute coredump handler on @code{SIGILL}, and @code{SIGBUS} in addition to On x86 Linux, print the current query and thread (connection) id, if available, in the coredump handler. @item -Fixed several timing bugs in the test suite +Fixed several timing bugs in the test suite. @item Extended @code{mysqltest} to take care of the timing issues in the test suite. @@ -40849,8 +40849,8 @@ Changed code to get around compiler bug in Compaq C++ on OSF1, that broke @code{BACKUP}, @code{RESTORE}, @code{CHECK}, @code{REPAIR}, and @code{ANALYZE TABLE}. @item -Added option @code{FULL} to @code{SHOW COLUMNS}. Now we only show the -privilege list for the columns if this option is given. +Added option @code{FULL} to @code{SHOW COLUMNS}. Now we show the +privilege list for the columns only if this option is given. @item Fixed bug in @code{SHOW LOGS} when there weren't any BDB logs. @item From 5f6561ec885e200b7e5c6fd7907d8f3388d348ad Mon Sep 17 00:00:00 2001 From: "sasha@mysql.sashanet.com" <> Date: Fri, 26 Jan 2001 20:00:42 -0700 Subject: [PATCH 04/11] Table_locks_waited Table_locks_immediate --- mysql-test/r/status.result | 6 ++++++ mysql-test/t/status.test | 23 +++++++++++++++++++++++ mysys/thr_lock.c | 8 +++++++- sql/mysqld.cc | 3 +++ sql/sql_base.cc | 4 +++- 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/status.result create mode 100644 mysql-test/t/status.test diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result new file mode 100644 index 00000000000..661009b6cda --- /dev/null +++ b/mysql-test/r/status.result @@ -0,0 +1,6 @@ +Variable_name Value +Table_locks_immediate 5 +Table_locks_waited 0 +Variable_name Value +Table_locks_immediate 8 +Table_locks_waited 1 diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test new file mode 100644 index 00000000000..2f65f87f29f --- /dev/null +++ b/mysql-test/t/status.test @@ -0,0 +1,23 @@ +connect (con1,localhost,root,,test,0,mysql-master.sock); +connect (con2,localhost,root,,test,0,mysql-master.sock); + +#don't polute binlog +show status like 'Table_lock%'; +connection con1; +SET SQL_LOG_BIN=0; +drop table if exists t1; +create table t1(n int); +insert into t1 values(1); +connection con2; +lock tables t1 read; +unlock tables; +lock tables t1 read; +connection con1; +send update t1 set n = 3; +connection con2; +sleep 0.5; +unlock tables; +connection con1; +reap; +show status like 'Table_lock%'; + diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 5c48ad435a4..6f5f8afac3c 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -83,7 +83,7 @@ multiple read locks. #include my_bool thr_lock_inited=0; - +ulong locks_immediate = 0L, locks_waited = 0L; /* The following constants are only for debug output */ #define MAX_THREADS 100 @@ -387,6 +387,7 @@ static my_bool wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, else { result=0; + ++locks_waited; if (data->lock->get_status) (*data->lock->get_status)(data->status_param); check_locks(data->lock,"got wait_for_lock",0); @@ -447,6 +448,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) check_locks(lock,"read lock with old write lock",0); if (lock->get_status) (*lock->get_status)(data->status_param); + ++locks_immediate; goto end; } if (lock->write.data->type == TL_WRITE_ONLY) @@ -470,6 +472,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) if ((int) lock_type == (int) TL_READ_NO_INSERT) lock->read_no_write_count++; check_locks(lock,"read lock with no write locks",0); + ++locks_immediate; goto end; } /* Can't get lock yet; Wait for it */ @@ -501,6 +504,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) data->cond=get_cond(); if (lock->get_status) (*lock->get_status)(data->status_param); + ++locks_immediate; goto end; } } @@ -535,6 +539,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) check_locks(lock,"second write lock",0); if (data->lock->get_status) (*data->lock->get_status)(data->status_param); + ++locks_immediate; goto end; } DBUG_PRINT("lock",("write locked by thread: %ld", @@ -560,6 +565,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) if (data->lock->get_status) (*data->lock->get_status)(data->status_param); check_locks(lock,"only write lock",0); + ++locks_immediate; goto end; } } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f9c4d10f46f..36fc5a49148 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -260,6 +260,7 @@ ulong query_id=1L,long_query_count,long_query_time,aborted_threads, delayed_queue_size,delayed_insert_threads,delayed_insert_writes, delayed_rows_in_use,delayed_insert_errors,flush_time, thread_created; ulong filesort_rows, filesort_range_count, filesort_scan_count; +extern "C" ulong locks_immediate, locks_waited; ulong filesort_merge_passes; ulong select_range_check_count, select_range_count, select_scan_count; ulong select_full_range_join_count,select_full_join_count; @@ -2804,6 +2805,8 @@ struct show_var_st status_vars[]= { {"Sort_range", (char*) &filesort_range_count, SHOW_LONG}, {"Sort_rows", (char*) &filesort_rows, SHOW_LONG}, {"Sort_scan", (char*) &filesort_scan_count, SHOW_LONG}, + {"Table_locks_immediate", (char*) &locks_immediate, SHOW_LONG}, + {"Table_locks_waited", (char*) &locks_waited, SHOW_LONG}, {"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST}, {"Threads_created", (char*) &thread_created, SHOW_LONG_CONST}, {"Threads_connected", (char*) &thread_count, SHOW_INT_CONST}, diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 96d6ea660aa..ed7a8027079 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -32,6 +32,7 @@ TABLE *unused_tables; /* Used by mysql_test */ HASH open_cache; /* Used by mysql_test */ +extern "C" ulong locks_waited, locks_immediate; static int open_unireg_entry(THD *thd,TABLE *entry,const char *db, const char *name, const char *alias, bool locked); @@ -1166,7 +1167,8 @@ bool wait_for_tables(THD *thd) { /* Now we can open all tables without any interference */ thd->proc_info="Reopen tables"; - result=reopen_tables(thd,0,0); + if(!(result=reopen_tables(thd,0,0))) + ++locks_waited; } pthread_mutex_unlock(&LOCK_open); thd->proc_info=0; From 31569172ee204a74bbecbd65d35d7b7c56025297 Mon Sep 17 00:00:00 2001 From: "jcole@tetra.spaceapes.com" <> Date: Sat, 27 Jan 2001 03:24:05 -0600 Subject: [PATCH 05/11] Added --temp-pool option to mysqld. This will cause temporary files created to use a small set of filenames, to try and avoid problems in the Linux kernel. --- include/my_bitmap.h | 35 ++++++++++++++++++++++++++ mysys/Makefile.am | 2 +- mysys/my_bitmap.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ mysys/my_init.c | 10 +++++++- mysys/mysys_priv.h | 1 + sql/mysql_priv.h | 4 ++- sql/mysqld.cc | 14 ++++++++++- sql/sql_select.cc | 29 +++++++++++++++++++--- sql/table.h | 2 ++ 9 files changed, 150 insertions(+), 7 deletions(-) create mode 100644 include/my_bitmap.h create mode 100644 mysys/my_bitmap.c diff --git a/include/my_bitmap.h b/include/my_bitmap.h new file mode 100644 index 00000000000..6c86a79fe45 --- /dev/null +++ b/include/my_bitmap.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA */ + +#ifndef _my_bitmap_h_ +#define _my_bitmap_h_ + +#define MY_BIT_NONE ~(uint)0 + +#ifdef __cplusplus +extern "C" { +#endif + + extern void bitmap_set_bit(uchar *bitmap, uint bitmap_size, uint bitmap_bit); + extern uint bitmap_set_next(uchar *bitmap, uint bitmap_size); + extern void bitmap_clear_bit(uchar *bitmap,uint bitmap_size,uint bitmap_bit); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 7615b85fa29..6674132bdca 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -44,7 +44,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c\ my_quick.c my_lockmem.c my_static.c \ getopt.c getopt1.c getvar.c my_mkdir.c \ default.c my_compress.c checksum.c raid.cc my_net.c \ - my_vsnprintf.c charset.c + my_vsnprintf.c charset.c my_bitmap.c EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ thr_mutex.c thr_rwlock.c libmysys_a_LIBADD = @THREAD_LOBJECTS@ diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c new file mode 100644 index 00000000000..1434f472f98 --- /dev/null +++ b/mysys/my_bitmap.c @@ -0,0 +1,60 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA */ + +/* + Handling of uchar arrays as large bitmaps. +*/ + +#include "mysys_priv.h" +#include + +pthread_mutex_t LOCK_bitmap; + +void bitmap_set_bit(uchar *bitmap, uint bitmap_size, uint bitmap_bit) { + if((bitmap_bit != MY_BIT_NONE) && (bitmap_bit < bitmap_size*8)) { + pthread_mutex_lock(&LOCK_bitmap); + bitmap[bitmap_bit / 8] |= (1 << bitmap_bit % 8); + pthread_mutex_unlock(&LOCK_bitmap); + }; +}; + +uint bitmap_set_next(uchar *bitmap, uint bitmap_size) { + uint bit_found = MY_BIT_NONE; + int i, b; + + pthread_mutex_lock(&LOCK_bitmap); + for(i=0; (i threads,thread_cache; time_t start_time; +uchar temp_pool[TEMP_POOL_SIZE]; +bool use_temp_pool; + pthread_key(MEM_ROOT*,THR_MALLOC); pthread_key(THD*, THR_THD); pthread_key(NET*, THR_NET); @@ -1498,6 +1501,9 @@ int main(int argc, char **argv) if (!mysql_tmpdir || !mysql_tmpdir[0]) mysql_tmpdir=(char*) P_tmpdir; /* purecov: inspected */ + bzero(temp_pool, TEMP_POOL_SIZE); + use_temp_pool = 0; + set_options(); #ifdef __WIN__ /* service parameters can be overwritten by options */ @@ -2370,7 +2376,8 @@ enum options { OPT_INNOBASE_LOG_GROUP_HOME_DIR, OPT_INNOBASE_LOG_ARCH_DIR, OPT_INNOBASE_LOG_ARCHIVE, OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT, OPT_SAFE_SHOW_DB, - OPT_GEMINI_SKIP + OPT_GEMINI_SKIP, + OPT_TEMP_POOL }; static struct option long_options[] = { @@ -2501,6 +2508,7 @@ static struct option long_options[] = { #ifdef __WIN__ {"standalone", no_argument, 0, (int) OPT_STANDALONE}, #endif + {"temp-pool", no_argument, 0, (int) OPT_TEMP_POOL}, {"tmpdir", required_argument, 0, 't'}, {"use-locking", no_argument, 0, (int) OPT_USE_LOCKING}, #ifdef USE_SYMDIR @@ -2874,6 +2882,7 @@ static void usage(void) Don't give threads different priorities.\n\ --socket=... Socket file to use for connection\n\ -t, --tmpdir=path Path for temporary files\n\ + --temp-pool Use a pool of temporary files\n\ -u, --user=user_name Run mysqld daemon as user\n\ -V, --version output version information and exit"); #ifdef __WIN__ @@ -3049,6 +3058,9 @@ static void get_options(int argc,char **argv) case 't': mysql_tmpdir=optarg; break; + case OPT_TEMP_POOL: + use_temp_pool=1; + break; case 'u': mysqld_user=optarg; break; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2d8373ec067..16d525f0ea7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -30,6 +30,7 @@ #include #include #include +#include const char *join_type_str[]={ "UNKNOWN","system","const","eq_ref","ref", "MAYBE_REF","ALL","range","index","fulltext" }; @@ -3276,14 +3277,28 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, KEY_PART_INFO *key_part_info; Item_result_field **copy_func; MI_COLUMNDEF *recinfo; + uint temp_pool_slot; + DBUG_ENTER("create_tmp_table"); DBUG_PRINT("enter",("distinct: %d save_sum_fields: %d allow_distinct_limit: %d group: %d", (int) distinct, (int) save_sum_fields, (int) allow_distinct_limit,test(group))); statistic_increment(created_tmp_tables, &LOCK_status); - sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid, - thd->thread_id, thd->tmp_table++); + + if(use_temp_pool) { + temp_pool_slot = bitmap_set_next(temp_pool, TEMP_POOL_SIZE); + if(temp_pool_slot != MY_BIT_NONE) // we got a slot + sprintf(path, "%s%s_%lx_%i", mysql_tmpdir, tmp_file_prefix, + current_pid, temp_pool_slot); + else // if we run out of slots in the pool, fall back to old behavior + sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid, + thd->thread_id, thd->tmp_table++); + } else { + sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid, + thd->thread_id, thd->tmp_table++); + }; + if (group) { if (!param->quick_group) @@ -3310,10 +3325,12 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, param->group_length : 0, NullS)) { + bitmap_clear_bit(temp_pool, TEMP_POOL_SIZE, temp_pool_slot); DBUG_RETURN(NULL); /* purecov: inspected */ } if (!(param->copy_field=copy=new Copy_field[field_count])) { + bitmap_clear_bit(temp_pool, TEMP_POOL_SIZE, temp_pool_slot); my_free((gptr) table,MYF(0)); /* purecov: inspected */ DBUG_RETURN(NULL); /* purecov: inspected */ } @@ -3333,6 +3350,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, table->map=1; table->tmp_table=1; table->db_low_byte_first=1; // True for HEAP and MyISAM + table->temp_pool_slot = temp_pool_slot; + /* Calculate with type of fields we will need in heap table */ @@ -3626,7 +3645,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, DBUG_RETURN(table); err: - free_tmp_table(thd,table); /* purecov: inspected */ + free_tmp_table(thd,table); /* purecov: inspected */ + bitmap_clear_bit(temp_pool, TEMP_POOL_SIZE, temp_pool_slot); DBUG_RETURN(NULL); /* purecov: inspected */ } @@ -3773,6 +3793,9 @@ free_tmp_table(THD *thd, TABLE *entry) delete *ptr; my_free((gptr) entry->record[0],MYF(0)); free_io_cache(entry); + + bitmap_clear_bit(temp_pool, TEMP_POOL_SIZE, entry->temp_pool_slot); + my_free((gptr) entry,MYF(0)); thd->proc_info=save_proc_info; diff --git a/sql/table.h b/sql/table.h index 8121271b479..c709be6a08c 100644 --- a/sql/table.h +++ b/sql/table.h @@ -119,6 +119,8 @@ struct st_table { key_part_map const_key_parts[MAX_KEY]; ulong query_id; + uint temp_pool_slot; + THD *in_use; /* Which thread uses this */ struct st_table *next,*prev; }; From b64a5bc71532a6c4c2f9cf764eae75318fea069c Mon Sep 17 00:00:00 2001 From: "jcole@tetra.spaceapes.com" <> Date: Sat, 27 Jan 2001 03:36:50 -0600 Subject: [PATCH 06/11] Added ChangeLog entry for --temp-pool to manual. --- Docs/manual.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Docs/manual.texi b/Docs/manual.texi index 7672af71694..3ec99ee1dcf 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -863,6 +863,7 @@ Changes in release 4.0.x (Development; Alpha) Changes in release 3.23.x (Stable) +* News-3.23.33:: Changes in release 3.23.33 * News-3.23.32:: Changes in release 3.23.32 * News-3.23.31:: Changes in release 3.23.31 * News-3.23.30:: Changes in release 3.23.30 @@ -40840,6 +40841,13 @@ Fixed several timing bugs in the test suite. @item Extended @code{mysqltest} to take care of the timing issues in the test suite. +@item +Added --temp-pool option to mysqld. Using this option will cause most +temporary files created to use a small set of names, rather than a unique +name for each new file. This is to work around a problem in the Linux +kernel dealing with creating a bunch of new files with different names. +With the old behavior, Linux seems to "leak" memory, as it's being allocated +to the directory entry cache instead of the disk cache. @end itemize @node News-3.23.32, News-3.23.31, News-3.23.33, News-3.23.x From dc66a0f52357c27fdfe6936d2000a306f2b987fa Mon Sep 17 00:00:00 2001 From: "jcole@tetra.spaceapes.com" <> Date: Sat, 27 Jan 2001 05:09:27 -0600 Subject: [PATCH 07/11] Added notes on OpenBSD 2.8 to manual --- Docs/manual.texi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 3ec99ee1dcf..9fbf7186cac 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -7582,8 +7582,15 @@ To compile on NetBSD you need GNU @code{make}. Otherwise the compile will crash when @code{make} tries to run @code{lint} on C++ files. @node OpenBSD, BSDI, NetBSD, Source install system issues -@subsection OpenBSD 2.5 Notes +@subsection OpenBSD Notes +@menu +* OpenBSD 2.5:: OpenBSD 2.5 Notes +* OpenBSD 2.8:: OpenBSD 2.8 Notes +@end menu + +@node OpenBSD 2.5 +@subsubsection OpenBSD 2.5 Notes On OpenBSD Version 2.5, you can compile @strong{MySQL} with native threads with the following options: @@ -7591,6 +7598,14 @@ with the following options: CFLAGS=-pthread CXXFLAGS=-pthread ./configure --with-mit-threads=no @end example +@node OpenBSD 2.8 +@subsubsection OpenBSD 2.8 Notes +Our users have reported that OpenBSD 2.8 has a threading bug which causes +problems with MySQL. The OpenBSD Developers have fixed the problem, but as +of January 25th, 2001, it's only available in the ``-current'' branch. The +symptoms of this threading bug are: slow response, high load, high cpu usage, +and crashes. + @node BSDI, SCO, OpenBSD, Source install system issues @subsection BSD/OS Notes From 802fc0a05446ee1eb522b1ffc3adaee72da7e648 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Sat, 27 Jan 2001 13:32:29 +0100 Subject: [PATCH 08/11] logging_ok Logging to logging@openlogging.org accepted mi_check.c fix for empty FULLTEXT index manual.texi fulltext finetuning 50% limit issue modified --- BitKeeper/etc/logging_ok | 1 + Docs/manual.texi | 2 +- myisam/mi_check.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 4c2320fbc15..256272eaf10 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -5,3 +5,4 @@ tim@cane.mysql.fi serg@donna.mysql.com jcole@tetra.spaceapes.com paul@central.snake.net +serg@serg.mysql.com diff --git a/Docs/manual.texi b/Docs/manual.texi index e2e9611db39..63facf44c25 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -38725,7 +38725,7 @@ your @code{FULLTEXT} indexes. @end example line in @code{myisam/ftdefs.h} to @example -#define GWS_IN_USE GWS_IDF +#define GWS_IN_USE GWS_FREQ @end example and recompile @strong{MySQL}. There is no need to rebuild the indexes though. diff --git a/myisam/mi_check.c b/myisam/mi_check.c index ee9e3387119..037f66c54e5 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -376,7 +376,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) if ((!(param->testflag & T_SILENT))) printf ("- check data record references index: %d\n",key+1); if (share->state.key_root[key] == HA_OFFSET_ERROR && - info->state->records == 0) + (info->state->records == 0 || keyinfo->flag & HA_FULLTEXT)) continue; if (!_mi_fetch_keypage(info,keyinfo,share->state.key_root[key],info->buff, 0)) From 70f619856b0692c4f0df13065e54670bb56ec52d Mon Sep 17 00:00:00 2001 From: "sasha@mysql.sashanet.com" <> Date: Sat, 27 Jan 2001 15:33:31 -0700 Subject: [PATCH 09/11] fixed up lock counting code - Monty's suggestions updated manual about table lock counter fixed coredump in DROP DATABASE with long bogus name by non-root user fixed bug in handling STOP immediately after ROTATE added test case for buffer overrun on DROP DATABASE by non-root user added test case for the STOP bug in replication --- Docs/manual.texi | 127 +++++++++++++++++------------ include/thr_lock.h | 3 +- mysql-test/r/rpl000018.result | 5 ++ mysql-test/r/status.result | 4 +- mysql-test/std_data/master-bin.001 | Bin 0 -> 113 bytes mysql-test/t/overflow.test | 4 + mysql-test/t/rpl000018-master.opt | 1 + mysql-test/t/rpl000018-master.sh | 3 + mysql-test/t/rpl000018-slave.opt | 1 + mysql-test/t/rpl000018.test | 19 +++++ mysql-test/t/status.test | 4 +- mysys/thr_lock.c | 2 +- sql/mysqld.cc | 1 - sql/slave.cc | 9 +- sql/sql_base.cc | 5 +- sql/sql_parse.cc | 7 ++ sql/sql_repl.cc | 2 +- 17 files changed, 129 insertions(+), 68 deletions(-) create mode 100644 mysql-test/r/rpl000018.result create mode 100644 mysql-test/std_data/master-bin.001 create mode 100644 mysql-test/t/overflow.test create mode 100644 mysql-test/t/rpl000018-master.opt create mode 100755 mysql-test/t/rpl000018-master.sh create mode 100644 mysql-test/t/rpl000018-slave.opt create mode 100644 mysql-test/t/rpl000018.test diff --git a/Docs/manual.texi b/Docs/manual.texi index df903a22191..7d873447928 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -20285,59 +20285,64 @@ The following columns are returned: below, though the format and numbers probably differ: @example -+--------------------------+------------+ -| Variable_name | Value | -+--------------------------+------------+ -| Aborted_clients | 0 | -| Aborted_connects | 0 | -| Bytes_received | 142160923 | -| Bytes_sent | 1161910370 | -| Connections | 30022 | -| Created_tmp_disk_tables | 0 | -| Created_tmp_tables | 8988 | -| Delayed_insert_threads | 0 | -| Delayed_writes | 0 | -| Delayed_errors | 0 | -| Flush_commands | 1 | -| Handler_delete | 462604 | -| Handler_read_first | 95882 | -| Handler_read_key | 27681068 | -| Handler_read_next | 265008218 | -| Handler_read_prev | 3022500 | -| Handler_read_rnd | 36900998 | -| Handler_read_rnd_next | 252097176 | -| Handler_update | 16945404 | -| Handler_write | 66826676 | -| Key_blocks_used | 14955 | -| Key_read_requests | 90131960 | -| Key_reads | 163268 | -| Key_write_requests | 7573912 | -| Key_writes | 3780151 | -| Max_used_connections | 0 | -| Not_flushed_key_blocks | 0 | -| Not_flushed_delayed_rows | 0 | -| Open_tables | 0 | -| Open_files | 0 | -| Open_streams | 0 | -| Opened_tables | 44598 | -| Questions | 1866024 | -| Select_full_join | 0 | -| Select_full_range_join | 0 | -| Select_range | 68187 | -| Select_range_check | 0 | -| Select_scan | 31440 | -| Slave_running | OFF | -| Slow_launch_threads | 0 | -| Slow_queries | 0 | -| Sort_range | 0 | -| Sort_rows | 36650500 | -| Sort_scan | 5298 | -| Threads_cached | 0 | -| Threads_connected | 1 | -| Threads_created | 30022 | -| Threads_running | 1 | -| Uptime | 39613 | -+--------------------------+------------+ ++--------------------------+--------+ +| Variable_name | Value | ++--------------------------+--------+ +| Aborted_clients | 0 | +| Aborted_connects | 0 | +| Bytes_received | 629539 | +| Bytes_sent | 736394 | +| Connections | 62 | +| Created_tmp_disk_tables | 0 | +| Created_tmp_tables | 0 | +| Created_tmp_files | 0 | +| Delayed_insert_threads | 0 | +| Delayed_writes | 0 | +| Delayed_errors | 0 | +| Flush_commands | 1 | +| Handler_delete | 0 | +| Handler_read_first | 1 | +| Handler_read_key | 9201 | +| Handler_read_next | 0 | +| Handler_read_prev | 0 | +| Handler_read_rnd | 0 | +| Handler_read_rnd_next | 45 | +| Handler_update | 5998 | +| Handler_write | 0 | +| Key_blocks_used | 407 | +| Key_read_requests | 27683 | +| Key_reads | 407 | +| Key_write_requests | 0 | +| Key_writes | 0 | +| Max_used_connections | 60 | +| Not_flushed_key_blocks | 0 | +| Not_flushed_delayed_rows | 0 | +| Open_tables | 60 | +| Open_files | 66 | +| Open_streams | 0 | +| Opened_tables | 66 | +| Questions | 9308 | +| Select_full_join | 0 | +| Select_full_range_join | 0 | +| Select_range | 0 | +| Select_range_check | 0 | +| Select_scan | 0 | +| Slave_running | OFF | +| Slave_open_temp_tables | 0 | +| Slow_launch_threads | 0 | +| Slow_queries | 0 | +| Sort_merge_passes | 0 | +| Sort_range | 0 | +| Sort_rows | 0 | +| Sort_scan | 0 | +| Table_locks_immediate | 3183 | +| Table_locks_waited | 6030 | +| Threads_cached | 30 | +| Threads_created | 61 | +| Threads_connected | 31 | +| Threads_running | 31 | +| Uptime | 135 | ++--------------------------+--------+ @end example @cindex variables, status @@ -20400,6 +20405,12 @@ open by the slave thread @item @code{Sort_range} @tab Number of sorts that where done with ranges. @item @code{Sort_rows} @tab Number of sorted rows. @item @code{Sort_scan} @tab Number of sorts that where done by scanning the table. +@item @code{Table_locks_immediate} @tab Number of times a table lock was +acquired immediately. Available after 3.23.33. +@item @code{Table_locks_waited} @tab Number of times a table lock could not +be acquired immediately and a wait was needed. If this is high, and you +have performance problems, you should first optimize your queries, and then +either split your table(s) or use replication. Available after 3.23.33. @item @code{Threads_cached} @tab Number of threads in the thread cache. @item @code{Threads_connected} @tab Number of currently open connections. @item @code{Threads_created} @tab Number of threads created to handle connections. @@ -40814,6 +40825,9 @@ not yet 100 % confident in this code. @appendixsubsec Changes in release 3.23.33 @itemize bullet @item +Added @code{Table_locks_immediate} and @code{Table_locks_waited} status +variables +@item Fixed bug in replication that broke slave server start with existing @code{master.info}. This fixes a bug introduced in 3.23.32. @item @@ -46638,10 +46652,15 @@ for @code{BDB} tables. @xref{Internal locking}. With @code{MyISAM} tables one can freely mix @code{INSERT} and @code{SELECT} without locks (@code{Versioning}). +Starting in version 3.23.33, you can analyze the table lock contention +on your system by checkining @code{Table_locks_waited} and +@code{Table_locks_immediate} environemt variables. + Some database users claim that @strong{MySQL} cannot support near the number of concurrent users because it lacks row-level locking. This is a may be true for some specific applications, but is' not generally -true. As always this depends totally on what the application does and what is the access/update pattern of the data. +true. As always this depends totally on what the application does and what +is the access/update pattern of the data. Pros for row locking: diff --git a/include/thr_lock.h b/include/thr_lock.h index 569a09d7aa5..ffcad4a4d11 100644 --- a/include/thr_lock.h +++ b/include/thr_lock.h @@ -27,7 +27,8 @@ extern "C" { #include struct st_thr_lock; - +extern ulong locks_immediate,locks_waited ; + enum thr_lock_type { TL_IGNORE=-1, TL_UNLOCK, /* UNLOCK ANY LOCK */ TL_READ, /* Read lock */ diff --git a/mysql-test/r/rpl000018.result b/mysql-test/r/rpl000018.result new file mode 100644 index 00000000000..7c89c2ef2b2 --- /dev/null +++ b/mysql-test/r/rpl000018.result @@ -0,0 +1,5 @@ +Log_name +master-bin.001 +master-bin.002 +n +3351 diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index 661009b6cda..8f3ad3e0d59 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -1,6 +1,6 @@ Variable_name Value -Table_locks_immediate 5 +Table_locks_immediate 0 Table_locks_waited 0 Variable_name Value -Table_locks_immediate 8 +Table_locks_immediate 3 Table_locks_waited 1 diff --git a/mysql-test/std_data/master-bin.001 b/mysql-test/std_data/master-bin.001 new file mode 100644 index 0000000000000000000000000000000000000000..fa30d8e530297be8e5b8fa32bf961e28a3557e60 GIT binary patch literal 113 zcmeyDl$qD;R&2${$iTqh3dD>I#(GA^dd5b&DXB@N>AE@j=|EBZ0A#=A`Qg3 YiNz(UMY=$<^$ZM*KvK*gDPAB308AeeRR910 literal 0 HcmV?d00001 diff --git a/mysql-test/t/overflow.test b/mysql-test/t/overflow.test new file mode 100644 index 00000000000..73554200dce --- /dev/null +++ b/mysql-test/t/overflow.test @@ -0,0 +1,4 @@ +connect (con1,localhost,boo,,test,0,mysql-master.sock); +connection con1; +-- error 1064; +drop database AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA; diff --git a/mysql-test/t/rpl000018-master.opt b/mysql-test/t/rpl000018-master.opt new file mode 100644 index 00000000000..ad2c6a647b5 --- /dev/null +++ b/mysql-test/t/rpl000018-master.opt @@ -0,0 +1 @@ +-O max_binlog_size=4096 diff --git a/mysql-test/t/rpl000018-master.sh b/mysql-test/t/rpl000018-master.sh new file mode 100755 index 00000000000..71f0f12d0c5 --- /dev/null +++ b/mysql-test/t/rpl000018-master.sh @@ -0,0 +1,3 @@ +rm -f $MYSQL_TEST_DIR/var/lib/master-bin.* +cp $MYSQL_TEST_DIR/std_data/master-bin.001 $MYSQL_TEST_DIR/var/lib/ +echo ./master-bin.001 > $MYSQL_TEST_DIR/var/lib/master-bin.index diff --git a/mysql-test/t/rpl000018-slave.opt b/mysql-test/t/rpl000018-slave.opt new file mode 100644 index 00000000000..e854f0d0bb2 --- /dev/null +++ b/mysql-test/t/rpl000018-slave.opt @@ -0,0 +1 @@ +--skip-slave-start --abort-slave-event-count=1 diff --git a/mysql-test/t/rpl000018.test b/mysql-test/t/rpl000018.test new file mode 100644 index 00000000000..44236323d1d --- /dev/null +++ b/mysql-test/t/rpl000018.test @@ -0,0 +1,19 @@ +connect (master,localhost,root,,test,0,mysql-master.sock); +connect (slave,localhost,root,,test,0,mysql-slave.sock); +connection slave; +reset slave; +slave start; +connection master; +show master logs; +drop table if exists t1; +create table t1(n int); +insert into t1 values (3351); +save_master_pos; +connection slave; +sync_with_master; +select * from t1; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 2f65f87f29f..7c825469f09 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -1,7 +1,7 @@ connect (con1,localhost,root,,test,0,mysql-master.sock); connect (con2,localhost,root,,test,0,mysql-master.sock); -#don't polute binlog +flush status; show status like 'Table_lock%'; connection con1; SET SQL_LOG_BIN=0; @@ -20,4 +20,4 @@ unlock tables; connection con1; reap; show status like 'Table_lock%'; - +drop table t1; diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 6f5f8afac3c..348c7bae74f 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -387,7 +387,7 @@ static my_bool wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, else { result=0; - ++locks_waited; + statistic_increment(locks_waited, &THR_LOCK_lock); if (data->lock->get_status) (*data->lock->get_status)(data->status_param); check_locks(data->lock,"got wait_for_lock",0); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 36fc5a49148..465a74c2ac5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -260,7 +260,6 @@ ulong query_id=1L,long_query_count,long_query_time,aborted_threads, delayed_queue_size,delayed_insert_threads,delayed_insert_writes, delayed_rows_in_use,delayed_insert_errors,flush_time, thread_created; ulong filesort_rows, filesort_range_count, filesort_scan_count; -extern "C" ulong locks_immediate, locks_waited; ulong filesort_merge_passes; ulong select_range_check_count, select_range_count, select_scan_count; ulong select_full_range_join_count,select_full_join_count; diff --git a/sql/slave.cc b/sql/slave.cc index 22d76c54ecd..5a110b6921b 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1055,9 +1055,12 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len) break; case STOP_EVENT: - close_temporary_tables(thd); - mi->inc_pos(event_len); - flush_master_info(mi); + if(mi->pos > 4) // stop event should be ignored after rotate event + { + close_temporary_tables(thd); + mi->inc_pos(event_len); + flush_master_info(mi); + } delete ev; break; case ROTATE_EVENT: diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ed7a8027079..d69bc905c31 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -32,7 +32,6 @@ TABLE *unused_tables; /* Used by mysql_test */ HASH open_cache; /* Used by mysql_test */ -extern "C" ulong locks_waited, locks_immediate; static int open_unireg_entry(THD *thd,TABLE *entry,const char *db, const char *name, const char *alias, bool locked); @@ -1167,8 +1166,8 @@ bool wait_for_tables(THD *thd) { /* Now we can open all tables without any interference */ thd->proc_info="Reopen tables"; - if(!(result=reopen_tables(thd,0,0))) - ++locks_waited; + result=reopen_tables(thd,0,0); + } pthread_mutex_unlock(&LOCK_open); thd->proc_info=0; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 495b00217ef..2926f59547f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1886,6 +1886,13 @@ check_access(THD *thd,uint want_access,const char *db, uint *save_priv, if (db == any_db) return FALSE; // Allow select on anything + + if (strlen(db) > NAME_LEN || check_db_name(db)) + { + net_printf(&thd->net,ER_WRONG_DB_NAME, db); + return TRUE; + } + if (db && (!thd->db || strcmp(db,thd->db))) db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, thd->priv_user, db); /* purecov: inspected */ diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 4f0112bac26..0598d906aa0 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -392,7 +392,7 @@ sweepstakes if you report the bug"; thd->mysys_var->current_mutex = log_lock; thd->mysys_var->current_cond = &COND_binlog_update; const char* proc_info = thd->proc_info; - thd->proc_info = "Waiting for update"; + thd->proc_info = "Slave connection: waiting for binlog update"; pthread_mutex_unlock(&thd->mysys_var->mutex); bool read_packet = 0, fatal_error = 0; From 75e0c1a858460810dac7187307a65a14fb548d0a Mon Sep 17 00:00:00 2001 From: "sasha@mysql.sashanet.com" <> Date: Sat, 27 Jan 2001 15:49:12 -0700 Subject: [PATCH 10/11] Docs/manual.texi re-added Jeremy's merged out note updated changes section with recent bug fix info --- Docs/manual.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Docs/manual.texi b/Docs/manual.texi index 7b8561d6006..d395e8ec75b 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -40841,6 +40841,13 @@ not yet 100 % confident in this code. @appendixsubsec Changes in release 3.23.33 @itemize bullet @item +Changed clients to use TCP/IP when -P or --port option is specified. +@item +Fixed bug in handling @code{STOP} event after @code{ROTATE} event in +replication +@item +Fixed another buffer overrun in @code{DROP DATABASE} +@item Added @code{Table_locks_immediate} and @code{Table_locks_waited} status variables @item From e47833bc4437808c849507b481b85d6ecff64022 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Sun, 28 Jan 2001 13:20:03 +0100 Subject: [PATCH 11/11] errmsg.c buffer overflow in libmysqlclient fixed --- libmysql/errmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 194542afd7f..00c8910a573 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -36,7 +36,7 @@ const char *client_errors[]= "MySQL client got out of memory", "Wrong host info", "Localhost via UNIX socket", - "%s via TCP/IP", + "%-.64s via TCP/IP", "Error in server handshake", "Lost connection to MySQL server during query", "Commands out of sync; You can't run this command now", @@ -62,11 +62,11 @@ const char *client_errors[]= "MySQL client run out of memory", "Wrong host info", "Localhost via UNIX socket", - "%s via TCP/IP", + "%-.64s via TCP/IP", "Error in server handshake", "Lost connection to MySQL server during query", "Commands out of sync; You can't run this command now", - "%s via named pipe", + "%-.64s via named pipe", "Can't wait for named pipe to host: %-.64s pipe: %-.32s (%lu)", "Can't open named pipe to host: %-.64s pipe: %-.32s (%lu)", "Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)",