pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/mysql5-server Add patches refering link prov...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ae9d3ee97674
branches:  trunk
changeset: 591057:ae9d3ee97674
user:      taca <taca%pkgsrc.org@localhost>
date:      Tue Aug 02 16:15:08 2011 +0000

description:
Add patches refering link provided from PR pkg/45185 by Andras Horvath.
And minor update of comments in patches.

Bump PKGREVISION.

diffstat:

 databases/mysql5-server/Makefile                                     |   3 +-
 databases/mysql5-server/distinfo                                     |  15 +++-
 databases/mysql5-server/patches/patch-ca                             |  31 +++++++--
 databases/mysql5-server/patches/patch-cb                             |   6 +-
 databases/mysql5-server/patches/patch-cc                             |   6 +-
 databases/mysql5-server/patches/patch-include_my__time.h             |  24 +++++++
 databases/mysql5-server/patches/patch-mysql-test_r_func__time.result |  22 ++++++
 databases/mysql5-server/patches/patch-mysql-test_t_func__time.test   |  26 +++++++
 databases/mysql5-server/patches/patch-sql-common_my__time.c          |  24 +++++++
 databases/mysql5-server/patches/patch-sql_mysqld.cc                  |  34 ++++++++++
 databases/mysql5-server/patches/patch-sql_set__var.cc                |  18 +++++
 databases/mysql5-server/patches/patch-sql_sql__class.h               |  15 ++++
 12 files changed, 208 insertions(+), 16 deletions(-)

diffs (297 lines):

diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/Makefile
--- a/databases/mysql5-server/Makefile  Tue Aug 02 14:16:12 2011 +0000
+++ b/databases/mysql5-server/Makefile  Tue Aug 02 16:15:08 2011 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2010/02/18 15:46:10 taca Exp $
+# $NetBSD: Makefile,v 1.32 2011/08/02 16:15:08 taca Exp $
 
 PKGNAME=               ${DISTNAME:S/-/-server-/}
+PKGREVISION=           1
 SVR4_PKGNAME=          mysqs
 COMMENT=               MySQL 5, a free SQL database (server)
 
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/distinfo
--- a/databases/mysql5-server/distinfo  Tue Aug 02 14:16:12 2011 +0000
+++ b/databases/mysql5-server/distinfo  Tue Aug 02 16:15:08 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2011/02/26 02:58:56 taca Exp $
+$NetBSD: distinfo,v 1.27 2011/08/02 16:15:08 taca Exp $
 
 SHA1 (mysql-5.0.92.tar.gz) = 10fffc7672a469af4a7fd980922b04d7ba0143ba
 RMD160 (mysql-5.0.92.tar.gz) = 24a373a1b124acf39d0c0726e5cb6f47dc1bef08
@@ -18,6 +18,13 @@
 SHA1 (patch-ap) = 70049d00e30d89201dd8d9fc0ace4e6edfcffae7
 SHA1 (patch-aq) = e63b5be7cb1cb2e8ca8ee52e7e42632c05804959
 SHA1 (patch-bf) = 180aefb012a0d17269654ba0aeb71ec74ea98e6c
-SHA1 (patch-ca) = 8d3f658a44a8d225a362b7f6135c772ee53ba5e3
-SHA1 (patch-cb) = b3a6bcc6f201b3ba1068ebe2d0cef3fbb22ab621
-SHA1 (patch-cc) = 2d1347ba57e35da484edd4fa3c764441ec6a80ed
+SHA1 (patch-ca) = a1620b5ebad72bcf9265ec0f9b44ecebb2ee22c7
+SHA1 (patch-cb) = 3e6e3e5aeb0476b399ce80d7af58564cdad7da7a
+SHA1 (patch-cc) = 5dc7423892271cf9be86be71de10d275532a8541
+SHA1 (patch-include_my__time.h) = 369fb468388bdec4e8449927e2109a8839fdde8a
+SHA1 (patch-mysql-test_r_func__time.result) = c85c6ff7981adf9dd10a4d1724e0b94616dcbe1c
+SHA1 (patch-mysql-test_t_func__time.test) = 5ff59d3fb9486a34ab23f33a942c2bd16be87776
+SHA1 (patch-sql-common_my__time.c) = 7056ca896030d26a30ba2c34a6adcd335fadfdb6
+SHA1 (patch-sql_mysqld.cc) = ae26b56f5ede21ed975005f47994b685b2c8083e
+SHA1 (patch-sql_set__var.cc) = 5dbbeeb5e3db648da395b372535e780da8ef294f
+SHA1 (patch-sql_sql__class.h) = 27fc6cc1684288b7ca517915af69a4ef8447c691
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-ca
--- a/databases/mysql5-server/patches/patch-ca  Tue Aug 02 14:16:12 2011 +0000
+++ b/databases/mysql5-server/patches/patch-ca  Tue Aug 02 16:15:08 2011 +0000
@@ -1,12 +1,29 @@
-$NetBSD: patch-ca,v 1.3 2010/02/18 15:46:10 taca Exp $
+$NetBSD: patch-ca,v 1.4 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+* Before calling sigsend(), make sure the function actuall exists.
+  Fixes the build on NetBSD >= 4.99.49, in which the macro P_MYID
+  is defined somewhere unrelated to signals.
 
-Before calling sigsend(), make sure the function actuall exists. Fixes
-the build on NetBSD >= 4.99.49, in which the macro P_MYID is defined
-somewhere unrelated to signals.
-
---- configure.in.orig  2010-01-15 09:47:42.000000000 +0000
+--- configure.in.orig  2011-01-25 11:27:51.000000000 +0000
 +++ configure.in
-@@ -2051,7 +2051,7 @@ AC_CHECK_HEADERS(varargs.h stdarg.h dire
+@@ -1956,6 +1956,15 @@ dnl
+ 
+ MYSQL_CHECK_TIME_T
+ 
++dnl
++dnl check size of time_t
++dnl
++
++AC_CHECK_SIZEOF(time_t, 8)
++if test "$ac_cv_sizeof_time_t" -eq 0
++then
++  AC_MSG_ERROR("MySQL needs a time_t type.")
++fi
+ 
+ # do we need #pragma interface/#pragma implementation ?
+ # yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
+@@ -2051,7 +2060,7 @@ AC_CHECK_HEADERS(varargs.h stdarg.h dire
  paths.h semaphore.h)
  
  # Already-done: strcasecmp
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-cb
--- a/databases/mysql5-server/patches/patch-cb  Tue Aug 02 14:16:12 2011 +0000
+++ b/databases/mysql5-server/patches/patch-cb  Tue Aug 02 16:15:08 2011 +0000
@@ -1,6 +1,8 @@
-$NetBSD: patch-cb,v 1.3 2010/02/18 15:46:10 taca Exp $
+$NetBSD: patch-cb,v 1.4 2011/08/02 16:15:08 taca Exp $
 
-See patch-ca.
+* Before calling sigsend(), make sure the function actuall exists.
+  Fixes the build on NetBSD >= 4.99.49, in which the macro P_MYID
+  is defined somewhere unrelated to signals.
 
 --- libmysqld/stacktrace.c.orig        2010-01-15 09:49:23.000000000 +0000
 +++ libmysqld/stacktrace.c
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-cc
--- a/databases/mysql5-server/patches/patch-cc  Tue Aug 02 14:16:12 2011 +0000
+++ b/databases/mysql5-server/patches/patch-cc  Tue Aug 02 16:15:08 2011 +0000
@@ -1,6 +1,8 @@
-$NetBSD: patch-cc,v 1.3 2010/02/18 15:46:10 taca Exp $
+$NetBSD: patch-cc,v 1.4 2011/08/02 16:15:08 taca Exp $
 
-See patch-ca.
+* Before calling sigsend(), make sure the function actuall exists.
+  Fixes the build on NetBSD >= 4.99.49, in which the macro P_MYID
+  is defined somewhere unrelated to signals.
 
 --- sql/stacktrace.c.orig      2010-01-15 09:49:23.000000000 +0000
 +++ sql/stacktrace.c
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-include_my__time.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-include_my__time.h  Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-include_my__time.h,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- include/my_time.h.orig     2011-01-25 11:28:00.000000000 +0000
++++ include/my_time.h
+@@ -44,6 +44,17 @@ typedef long my_time_t;
+ #define MY_TIME_T_MIN LONG_MIN
+ 
+ 
++/*
++  check for valid times only if the range of time_t is greater than
++  the range of my_time_t
++*/
++#if SIZEOF_TIME_T > SIZEOF_LONG
++# define IS_VALID_TIME_T(x) ((x) <= (time_t) MY_TIME_T_MAX && \
++                           (x) >= (time_t) MY_TIME_T_MIN)
++#else
++# define IS_VALID_TIME_T(x) (1 > 0)
++#endif
++
+ /* Time handling defaults */
+ #define TIMESTAMP_MAX_YEAR 2038
+ #define YY_PART_YEAR     70
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-mysql-test_r_func__time.result
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-mysql-test_r_func__time.result      Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-mysql-test_r_func__time.result,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- mysql-test/r/func_time.result.orig 2011-01-25 11:52:36.000000000 +0000
++++ mysql-test/r/func_time.result
+@@ -1323,4 +1323,15 @@ SELECT '2008-02-18' + INTERVAL 1 FRAC_SE
+ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND' at line 1
+ SELECT '2008-02-18' - INTERVAL 1 FRAC_SECOND;
+ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND' at line 1
++#
++# Bug #52315 part 2 : utc_date() crashes when system time > year 2037
++#
++SET TIMESTAMP=-147490000;
++SELECT UTC_TIMESTAMP();
++SET TIMESTAMP=2147483648;
++SELECT UTC_TIMESTAMP();
++SET TIMESTAMP=2147483646;
++SELECT UTC_TIMESTAMP();
++SET TIMESTAMP=2147483647;
++SELECT UTC_TIMESTAMP();
+ End of 5.0 tests
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-mysql-test_t_func__time.test
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-mysql-test_t_func__time.test        Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-mysql-test_t_func__time.test,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- mysql-test/t/func_time.test.orig   2011-01-25 11:52:35.000000000 +0000
++++ mysql-test/t/func_time.test
+@@ -838,4 +838,19 @@ SELECT '2008-02-18' + INTERVAL 1 FRAC_SE
+ --error ER_PARSE_ERROR
+ SELECT '2008-02-18' - INTERVAL 1 FRAC_SECOND;
+ 
++
++--echo #
++--echo # Bug #52315 part 2 : utc_date() crashes when system time > year 2037
++--echo #
++
++--disable_result_log
++--error ER_UNKNOWN_ERROR
++SET TIMESTAMP=-147490000; SELECT UTC_TIMESTAMP();
++--error ER_UNKNOWN_ERROR
++SET TIMESTAMP=2147483648; SELECT UTC_TIMESTAMP();
++SET TIMESTAMP=2147483646; SELECT UTC_TIMESTAMP();
++SET TIMESTAMP=2147483647; SELECT UTC_TIMESTAMP();
++--enable_result_log
++
++
+ --echo End of 5.0 tests
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-sql-common_my__time.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-sql-common_my__time.c       Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-sql-common_my__time.c,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- sql-common/my_time.c.orig  2011-01-25 11:28:00.000000000 +0000
++++ sql-common/my_time.c
+@@ -984,8 +984,16 @@ my_system_gmt_sec(const MYSQL_TIME *t_sr
+     So, tmp < TIMESTAMP_MIN_VALUE will be triggered. On platfroms
+     with unsigned time_t tmp+= shift*86400L might result in a number,
+     larger then TIMESTAMP_MAX_VALUE, so another check will work.
++
++    tmp being larger than TIMESTAMP_MAX_VALUE can only happen on
++    platforms where the size of time_t is larger than the size of
++    TIMESTAMP_MAX_VALUE (currently INT32 : 4 bytes).
++    #ifdef to avoid the compilation warnings on these platforms (OpenBSD).
+   */
+-  if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
++  if ((tmp < TIMESTAMP_MIN_VALUE)
++#if SIZEOF_TIME_T > 4
++      || (tmp > TIMESTAMP_MAX_VALUE))
++#endif
+     tmp= 0;
+ 
+   return (my_time_t) tmp;
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-sql_mysqld.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-sql_mysqld.cc       Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-sql_mysqld.cc,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- sql/mysqld.cc.orig 2011-01-25 11:27:51.000000000 +0000
++++ sql/mysqld.cc
+@@ -2836,13 +2836,6 @@ static int init_common_variables(const c
+   max_system_variables.pseudo_thread_id= (ulong)~0;
+   server_start_time= flush_status_time= time((time_t*) 0);
+   
+-  /* TODO: remove this when my_time_t is 64 bit compatible */
+-  if (server_start_time >= (time_t) MY_TIME_T_MAX)
+-  {
+-    sql_print_error("This MySQL server doesn't support dates later then 2038");
+-    return 1;
+-  }
+-
+   if (init_thread_environment())
+     return 1;
+   mysql_init_variables();
+@@ -2882,6 +2875,13 @@ static int init_common_variables(const c
+   mysql_slow_log.init_pthread_objects();
+   mysql_bin_log.init_pthread_objects();
+ 
++  /* TODO: remove this when my_time_t is 64 bit compatible */
++  if (!IS_VALID_TIME_T(server_start_time))
++  {
++    sql_print_error("This MySQL server doesn't support dates later then 2038");
++    return 1;
++  }
++
+   if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
+   {
+     strmake(glob_hostname, STRING_WITH_LEN("localhost"));
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-sql_set__var.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-sql_set__var.cc     Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-sql_set__var.cc,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- sql/set_var.cc.orig        2011-01-25 11:27:51.000000000 +0000
++++ sql/set_var.cc
+@@ -2717,7 +2717,10 @@ bool sys_var_timestamp::check(THD *thd, 
+   time_t val;
+   var->save_result.ulonglong_value= var->value->val_int();
+   val= (time_t) var->save_result.ulonglong_value;
+-  if (val < (time_t) MY_TIME_T_MIN || val > (time_t) MY_TIME_T_MAX)
++  if ((val < TIMESTAMP_MIN_VALUE)
++#if SIZEOF_TIME_T > 4
++      || (val > TIMESTAMP_MAX_VALUE))
++#endif)
+   {
+     my_message(ER_UNKNOWN_ERROR, 
+                "This version of MySQL doesn't support dates later than 2038",
diff -r 4472dbf423b9 -r ae9d3ee97674 databases/mysql5-server/patches/patch-sql_sql__class.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql5-server/patches/patch-sql_sql__class.h    Tue Aug 02 16:15:08 2011 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-sql_sql__class.h,v 1.1 2011/08/02 16:15:08 taca Exp $
+
+* Handling of time_t: http://lists.mysql.com/commits/128103
+
+--- sql/sql_class.h.orig       2011-01-25 11:27:51.000000000 +0000
++++ sql/sql_class.h
+@@ -1710,7 +1710,7 @@ public:
+   /*TODO: this will be obsolete when we have support for 64 bit my_time_t */
+   inline bool is_valid_time() 
+   { 
+-    return (start_time < (time_t) MY_TIME_T_MAX); 
++    return (IS_VALID_TIME_T(start_time));
+   }
+   inline void insert_id(ulonglong id_arg)
+   {



Home | Main Index | Thread Index | Old Index