From ce890a1dcd7927777d2bf666975615f0dfed8923 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 19 Jul 2003 10:34:41 +0200 Subject: [PATCH 1/7] typo fixed --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index e0b28874892..69cd1a82108 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -623,7 +623,7 @@ main() FILE *file=fopen("conftestval", "w"); f = (float) ll; fprintf(file,"%g\n",f); - close(file); + fclose(file); exit (0); }], ac_cv_conv_longlong_to_float=`cat conftestval`, ac_cv_conv_longlong_to_float=0, ifelse([$2], , , ac_cv_conv_longlong_to_float=$2))])dnl if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes" From 0f85fb676c1ecf7b148af3ca92402099eb179e62 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jul 2003 17:50:06 +0200 Subject: [PATCH 2/7] Followup to Jim's changes in mysqldoc tree. Unfortunately, it's too late for 4.0.14 :( --- Docs/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/Makefile.am b/Docs/Makefile.am index 26249028539..17450c3b072 100644 --- a/Docs/Makefile.am +++ b/Docs/Makefile.am @@ -40,10 +40,10 @@ paper: manual_a4.ps manual_letter.ps $(PDFMANUAL) # The Makefile contains the previous version so we can not use that include.texi: ../configure.in echo "@c This file is autogenerated by the Makefile" > $@ - echo -n "@set mysql_version " >> $@ + echo -n "@set mysqlversion " >> $@ grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \ sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> $@ - echo -n "@set default_port " >> $@ + echo -n "@set defaultport " >> $@ grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \ sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> $@ From 2c3f6568797ecc269371b7d20eecdf4993905cec Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Aug 2003 22:29:38 +0200 Subject: [PATCH 3/7] Backporting the changeset below from 4.0, because a customer hits the bug with 3.23. ChangeSet@1.1416.113.1, 2003-03-22 15:22:59+01:00, guilhem@mysql.com Fix for #178 Replicating INSERT VALUES(USER()) crashes (SEGV) the slave Now it does not SEGV, but USER() is still badly replicated (it is replicated to ""), which is a lower priority bug. sql/item_strfunc.cc: Don't segfault in USER() if thd->user == 0 (system thread). --- sql/item_strfunc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 323810398ec..9e37a5a18e5 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1094,7 +1094,8 @@ String *Item_func_database::val_str(String *str) String *Item_func_user::val_str(String *str) { THD *thd=current_thd; - if (str->copy((const char*) thd->user,(uint) strlen(thd->user)) || + if (!(thd->user) || // for system threads (e.g. replication thread) + str->copy((const char*) thd->user,(uint) strlen(thd->user)) || str->append('@') || str->append(thd->host ? thd->host : thd->ip ? thd->ip : "")) return &empty_string; From e2a4c4a5d25c5f628415113c3fb12ea87905914a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Aug 2003 16:33:04 +0300 Subject: [PATCH 4/7] Cleaned up code comment --- sql/item_strfunc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 9e37a5a18e5..ff01d841e78 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1094,7 +1094,8 @@ String *Item_func_database::val_str(String *str) String *Item_func_user::val_str(String *str) { THD *thd=current_thd; - if (!(thd->user) || // for system threads (e.g. replication thread) + // For a replication thread user may be a null pointer (To be fixed) + if (!thd->user || str->copy((const char*) thd->user,(uint) strlen(thd->user)) || str->append('@') || str->append(thd->host ? thd->host : thd->ip ? thd->ip : "")) From 89dad4c9b47aa0e0e5678075d1de5b1ebdfa1403 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Aug 2003 09:44:26 -0300 Subject: [PATCH 5/7] Fix VC++ compiler error --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b9e9c0a14fa..728810fcf7f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5333,7 +5333,7 @@ create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit) Impossible range (for example lookup on NULL on not null field) Create empty result set */ - if (!(table->record_pointers= my_malloc(1, MYF(MY_WME)))) + if (!(table->record_pointers= (uchar*) my_malloc(1, MYF(MY_WME)))) goto err; table->found_records= 0; goto end; From 79e560162bc3ed5f3963b56cf5fa177a59b68fbb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Aug 2003 22:57:44 -0300 Subject: [PATCH 6/7] Fix an erronous cast for GCC introduced for to fix VC++ compiler error sql/sql_select.cc: Fix the GCC compiler error introduced for the cast for VC++ --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 728810fcf7f..1230dffcaa9 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5333,7 +5333,7 @@ create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit) Impossible range (for example lookup on NULL on not null field) Create empty result set */ - if (!(table->record_pointers= (uchar*) my_malloc(1, MYF(MY_WME)))) + if (!(table->record_pointers= (byte*) my_malloc(1, MYF(MY_WME)))) goto err; table->found_records= 0; goto end; From 61f953e88a30169c084e22aa620dcb4f4b73a49a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Aug 2003 11:16:34 +0200 Subject: [PATCH 7/7] fixed password buffer overflow --- sql/sql_acl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index f36e39b0645..554417322a4 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -206,10 +206,10 @@ int acl_init(bool dont_read_acl_tables) "Found old style password for user '%s'. Ignoring user. (You may want to restart using --old-protocol)", user.user ? user.user : ""); /* purecov: tested */ } - else if (length % 8) // This holds true for passwords + else if (length % 8 || length > 16) { sql_print_error( - "Found invalid password for user: '%s@%s'; Ignoring user", + "Found invalid password for user: '%s'@'%s'; Ignoring user", user.user ? user.user : "", user.host.hostname ? user.host.hostname : ""); /* purecov: tested */ continue; /* purecov: tested */