[debian-mysql] Bug#452558: mysql-dfsg-5.0: mysql-test 'mysql_client_test' fails due to gcc 4.x optimizations

Mathias Gug mathiaz at ubuntu.com
Fri Nov 23 15:38:25 UTC 2007


Package: mysql-dfsg-5.0
Version: 5.0.45-3
Severity: normal
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu hardy ubuntu-patch

In Ubuntu, we've applied the attached patch to achieve the following:

    - debian/patches/91_bug29389.dpatch:
        fix for mysql bug 27383 which causes mysql-test 'mysql_client_test'
        to fail due to gcc 4.x optimizations.

We thought you might be interested in doing the same. 

See http://bugs.mysql.com/bug.php?id=27383 for more information.                

-- System Information:
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy-backports'), (500, 'hardy')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-14-server (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
diff -u mysql-dfsg-5.0-5.0.45/debian/patches/00list mysql-dfsg-5.0-5.0.45/debian/patches/00list
--- mysql-dfsg-5.0-5.0.45/debian/patches/00list
+++ mysql-dfsg-5.0-5.0.45/debian/patches/00list
@@ -15,0 +16 @@
+91_bug29389.dpatch
only in patch2:
unchanged:
--- mysql-dfsg-5.0-5.0.45.orig/debian/patches/91_bug29389.dpatch
+++ mysql-dfsg-5.0-5.0.45/debian/patches/91_bug29389.dpatch
@@ -0,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 91_bug29389.dpatch by Jamie Strandboge <jamie at ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix for bug29389
+
+ at DPATCH@
+
+diff -Nru mysql-dfsg-5.0-5.0.45.orig/libmysql/libmysql.c mysql-dfsg-5.0-5.0.45/libmysql/libmysql.c
+--- mysql-dfsg-5.0-5.0.45.orig/libmysql/libmysql.c	2007-07-04 13:05:53.000000000 +0000
++++ mysql-dfsg-5.0-5.0.45/libmysql/libmysql.c	2007-10-02 19:28:49.000000000 +0000
+@@ -3678,33 +3678,38 @@
+   case MYSQL_TYPE_FLOAT:
+   {
+     /*
+-      We need to store data in the buffer before the truncation check to
++      We need to mark the local variable volatile to
+       workaround Intel FPU executive precision feature.
+       (See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details)
+-      AFAIU it does not guarantee to work.
+     */
+-    float data;
++    volatile float data;
+     if (is_unsigned)
++    {
+       data= (float) ulonglong2double(value);
++      *param->error= ((ulonglong) value) != ((ulonglong) data);
++    }
+     else
+-      data= (float) value;
++    {
++      data= (float)value;
++      *param->error= value != ((longlong) data);
++    }
+     floatstore(buffer, data);
+-    *param->error= is_unsigned ?
+-                   ((ulonglong) value) != ((ulonglong) (*(float*) buffer)) :
+-                   ((longlong) value) != ((longlong) (*(float*) buffer));
+     break;
+   }
+   case MYSQL_TYPE_DOUBLE:
+   {
+-    double data;
++    volatile double data;
+     if (is_unsigned)
++    {
+       data= ulonglong2double(value);
++      *param->error= ((ulonglong) value) != ((ulonglong) data);
++    }
+     else
++    {
+       data= (double)value;
++      *param->error= value != ((longlong) data);
++    }
+     doublestore(buffer, data);
+-    *param->error= is_unsigned ?
+-                   ((ulonglong) value) != ((ulonglong) (*(double*) buffer)) :
+-                   ((longlong) value) != ((longlong) (*(double*) buffer));
+     break;
+   }
+   case MYSQL_TYPE_TIME:


More information about the pkg-mysql-maint mailing list