Replace kluge fix for ndbd sparc crash with a real fix (mysql bug 48132)
This commit is contained in:
parent
996358c08e
commit
2d9b4653c6
38
mysql-signal-align.patch
Normal file
38
mysql-signal-align.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Fix a bit of silliness; the original coding not only computes the required
|
||||
size of the temp variable incorrectly, but doesn't guarantee the correct
|
||||
alignment. This demonstrably leads to ndbd crashing at launch on sparc64,
|
||||
and is probably bad news for performance on other 64-bit machines even
|
||||
if they don't give an actual SIGBUS.
|
||||
|
||||
Filed upstream at http://bugs.mysql.com/bug.php?id=48132
|
||||
|
||||
|
||||
diff -Naur mysql-5.1.39.orig/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp mysql-5.1.39/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
|
||||
--- mysql-5.1.39.orig/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2009-09-04 12:21:18.000000000 -0400
|
||||
+++ mysql-5.1.39/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2009-10-17 14:24:56.000000000 -0400
|
||||
@@ -1144,8 +1144,9 @@
|
||||
KeyReqStruct *req_struct,
|
||||
Uint32* outBuffer)
|
||||
{
|
||||
- Uint32 tmp[sizeof(SignalHeader)+25];
|
||||
- Signal * signal = (Signal*)&tmp;
|
||||
+ SignalT<25> signalT;
|
||||
+ Signal *signal= (Signal*)&signalT;
|
||||
+
|
||||
switch(attrId){
|
||||
case AttributeHeader::FRAGMENT:
|
||||
* outBuffer = fragptr.p->fragmentId;
|
||||
diff -Naur mysql-5.1.39.orig/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp mysql-5.1.39/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
|
||||
--- mysql-5.1.39.orig/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2009-09-04 12:21:19.000000000 -0400
|
||||
+++ mysql-5.1.39/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2009-10-17 14:26:21.000000000 -0400
|
||||
@@ -529,8 +529,8 @@
|
||||
{
|
||||
off_t off = 0;
|
||||
const off_t sz = request->par.open.file_size;
|
||||
- Uint32 tmp[sizeof(SignalHeader)+25];
|
||||
- Signal * signal = (Signal*)(&tmp[0]);
|
||||
+ SignalT<25> signalT;
|
||||
+ Signal *signal= (Signal*)&signalT;
|
||||
FsReadWriteReq* req = (FsReadWriteReq*)signal->getDataPtrSend();
|
||||
|
||||
Uint32 index = 0;
|
@ -1,22 +0,0 @@
|
||||
This is a temporary workaround for what is surely a gcc bug on Sparc.
|
||||
Submitted as bz #529299
|
||||
|
||||
|
||||
diff -Naur mysql-5.1.39.orig/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp mysql-5.1.39/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
|
||||
--- mysql-5.1.39.orig/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp 2009-09-04 12:21:16.000000000 -0400
|
||||
+++ mysql-5.1.39/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp 2009-10-15 22:19:07.000000000 -0400
|
||||
@@ -8538,11 +8538,7 @@
|
||||
default:
|
||||
tmp = 0;
|
||||
}
|
||||
- memcpy(signal->theData, &tmp, 8); /* must be memcpy, gives strange results on
|
||||
- * ithanium gcc (GCC) 3.4.1 smp linux 2.4
|
||||
- * otherwise
|
||||
- */
|
||||
- // Uint32 * src = (Uint32*)&tmp;
|
||||
- // signal->theData[0] = src[0];
|
||||
- // signal->theData[1] = src[1];
|
||||
+ Uint32 * src = (Uint32*)&tmp;
|
||||
+ signal->theData[0] = src[0];
|
||||
+ signal->theData[1] = src[1];
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
Name: mysql
|
||||
Version: 5.1.39
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: MySQL client programs and shared libraries
|
||||
Group: Applications/Databases
|
||||
URL: http://www.mysql.com
|
||||
@ -33,7 +33,7 @@ Patch7: mysql-plugin-bug.patch
|
||||
Patch8: mysql-setschedparam.patch
|
||||
Patch9: mysql-ndb-stacksize.patch
|
||||
Patch10: mysql-strmov.patch
|
||||
Patch11: mysql-sparc-gcc-bug.patch
|
||||
Patch11: mysql-signal-align.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
BuildRequires: gperf, perl, readline-devel, openssl-devel
|
||||
@ -649,6 +649,9 @@ fi
|
||||
%{_mandir}/man1/mysql_client_test.1*
|
||||
|
||||
%changelog
|
||||
* Sat Oct 17 2009 Tom Lane <tgl@redhat.com> 5.1.39-4
|
||||
- Replace kluge fix for ndbd sparc crash with a real fix (mysql bug 48132)
|
||||
|
||||
* Thu Oct 15 2009 Tom Lane <tgl@redhat.com> 5.1.39-3
|
||||
- Work around two different compiler bugs on sparc, one by backing off
|
||||
optimization from -O2 to -O1, and the other with a klugy patch
|
||||
|
Loading…
Reference in New Issue
Block a user