summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/item_strfunc.cc4
-rw-r--r--sql/mysqld.cc12
3 files changed, 8 insertions, 12 deletions
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())