From 67891255f5d99c36832e54373fabfcfa758aa979 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Jan 2001 04:57:29 +0200 Subject: Added MYSQL_SERVER_SUFFIX to mysqld Fixed bug in TRIM changed strnmov -> strmake BUILD/SETUP.sh: Removed --disable-shared Docs/manual.texi: Changelog Installing many servers acinclude.m4: Force use of db-3.2.3h client/mysql.cc: cleanup mysql-test/r/func_str.result: Added new TRIM test mysql-test/t/func_str.test: Added new TRIM test mysys/charset.c: change to use strmake instead of strnmov mysys/mf_format.c: change to use strmake instead of strnmov mysys/mf_tempfile.c: change to use strmake instead of strnmov scripts/make_binary_distribution.sh: Removed error messages for missing files sql/handler.cc: More debug sql/item_strfunc.cc: Fixed bug in TRIM() sql/mysqld.cc: Added MYSQL_SERVER_SUFFIX to mysqld --- sql/handler.cc | 4 ++-- sql/item_strfunc.cc | 4 ++-- sql/mysqld.cc | 12 ++++-------- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'sql') diff --git a/sql/handler.cc b/sql/handler.cc index affd9df8f87..3859f496f9a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -375,8 +375,8 @@ int handler::ha_open(const char *name, int mode, int test_if_locked) { int error; DBUG_ENTER("handler::open"); - DBUG_PRINT("enter",("db_type: %d db_stat: %d mode: %d lock_test: %d", - table->db_type, table->db_stat, mode, test_if_locked)); + DBUG_PRINT("enter",("name: %s db_type: %d db_stat: %d mode: %d lock_test: %d", + name, table->db_type, table->db_stat, mode, test_if_locked)); if ((error=open(name,mode,test_if_locked))) { diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 103d82f36aa..c00a7aabe66 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -930,7 +930,7 @@ String *Item_func_trim::val_str(String *str) char *ptr=(char*) res->ptr(); char *end=ptr+res->length(); const char *r_ptr=remove_str->ptr(); - while (ptr+remove_length < end && !memcmp(ptr,r_ptr,remove_length)) + while (ptr+remove_length <= end && !memcmp(ptr,r_ptr,remove_length)) ptr+=remove_length; #ifdef USE_MB if (use_mb(default_charset_info) && !binary) @@ -954,7 +954,7 @@ String *Item_func_trim::val_str(String *str) else #endif /* USE_MB */ { - while (ptr + remove_length < end && + while (ptr + remove_length <= end && !memcmp(end-remove_length,r_ptr,remove_length)) end-=remove_length; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b6caa6c492c..528e7d8a919 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -275,7 +275,7 @@ char mysql_real_data_home[FN_REFLEN], blob_newline,f_fyllchar,max_sort_char,*mysqld_user,*mysqld_chroot, *opt_init_file; char *opt_bin_logname = 0; // this one needs to be seen in sql_parse.cc -char server_version[50]=MYSQL_SERVER_VERSION; +char server_version[60]=MYSQL_SERVER_VERSION; const char *first_keyword="first"; const char **errmesg; /* Error messages */ const char *myisam_recover_options_str="OFF"; @@ -1471,14 +1471,10 @@ int main(int argc, char **argv) strmov(glob_hostname,"mysql"); strmov(pidfile_name,glob_hostname); strmov(strcend(pidfile_name,'.'),".pid"); // Add extension -#ifdef DEMO_VERSION - strcat(server_version,"-demo"); -#endif -#ifdef SHAREWARE_VERSION - strcat(server_version,"-shareware"); -#endif #ifndef DBUG_OFF - strcat(server_version,"-debug"); + strxmov(strend(server_version),MYSQL_SERVER_SUFFIX,"-debug",NullS); +#else + strmov(strend(server_version),MYSQL_SERVER_SUFFIX); #endif #ifdef _CUSTOMSTARTUPCONFIG_ if (_cust_check_startup()) -- cgit v1.2.1