|
|||||||||||
|
bk commit into 5.0 tree (tnurnberg:1.2504) BUG#10776
From: Tatjana A Nuernberg <azundris(at)mysql.com>
Date: Tue Jul 31 2007 - 22:45:08 EDT
ChangeSet@1.2504, 2007-08-01 04:45:02+02:00, tnurnberg@sin.intern.azundris.com +16 -0 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 mysqld hasn't been built on AIX with ndb-everything in quite a while. this allowed a variety of changes to be added that broke the AIX build for both the GNU and IBM compilers (but the IBM suite in particular). Changeset lets build to complete on AIX 5.2 for users of the GNU and the IBM suite both. Tudo bem? config/ac-macros/large_file.m4@1.3, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +3 -8 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (2) we no longer declare anything large-file on AIX. the GNU C++ compiler declares _LARGE_FILE_API all of its own, and either way we're now pulling in <standards.h> when on AIX, which defines _LARGE_FILE_API (if not already defined). configure.in@1.451, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +6 -0 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (1) build NDB binaries as static on AIX. because that actually *works*. when building dynamic, with the IBM compiler (xlC_r), and the build breaks on AIX due to missing symbols (__vec__delete2 et al.), try adding -lhC to the Makefile. include/mysql.h@1.171, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +4 -0 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (2) we're now pulling in <standards.h> when on AIX, which defines _LARGE_FILE_API (if not already defined). ndb/src/common/util/File.cpp@1.18, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +2 -2 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (3) do not de-scope the standards, for they may be funky macros ndb/src/mgmclient/Makefile.am@1.20, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +1 -0 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (4) make IBM C++ compiler happy on AIX ndb/src/mgmsrv/Makefile.am@1.25, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +1 -1 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (5) GNU compiler has no sense of humour about this ndb/test/ndbapi/benchronja.cpp@1.8, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +13 -6 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/flexAsynch.cpp@1.14, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +13 -6 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/flexHammer.cpp@1.13, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +11 -4 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/flexScan.cpp@1.13, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +9 -2 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/flexTT.cpp@1.13, 2007-08-01 04:44:54+02:00, tnurnberg@sin.intern.azundris.com +13 -6 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/flexTimedAsynch.cpp@1.6, 2007-08-01 04:44:55+02:00, tnurnberg@sin.intern.azundris.com +15 -8 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/initronja.cpp@1.7, 2007-08-01 04:44:55+02:00, tnurnberg@sin.intern.azundris.com +8 -1 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX ndb/test/ndbapi/testOperations.cpp@1.14, 2007-08-01 04:44:55+02:00, tnurnberg@sin.intern.azundris.com +0 -5 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (7) IBM C compiler on AIX is not happy with the re-def. Please choose one. ndb/test/ndbapi/testScanFilter.cpp@1.4, 2007-08-01 04:44:55+02:00, tnurnberg@sin.intern.azundris.com +10 -2 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (8) The IBM C++ compiler on AIX doesn't like initializing from pow(). This works, but breaks a VAL (bool res_cal[TUPLE_NUM] ...) later on. ndb/test/odbc/SQL99_test/SQL99_test.cpp@1.3, 2007-08-01 04:44:55+02:00, tnurnberg@sin.intern.azundris.com +10 -3 Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2 (6) MAXTHREADS is already defined in includes for IBM C compiler on AIX diff -Nrup a/config/ac-macros/large_file.m4 b/config/ac-macros/large_file.m4 --- a/config/ac-macros/large_file.m4 2004-12-04 19:48:50 +01:00 +++ b/config/ac-macros/large_file.m4 2007-08-01 04:44:54 +02:00
fi
diff -Nrup a/configure.in b/configure.in --- a/configure.in 2007-06-21 18:28:48 +02:00 +++ b/configure.in 2007-08-01 04:44:54 +02:00 @@ -2890,6 +2890,12 @@ then
ndb_opt_subdirs="$ndb_opt_subdirs docs"
ndb_bin_am_ldflags=""
+# building dynamic breaks on AIX. (If you want to try it and get unresolved +# __vec__delete2 and some such, try linking against libhC.) +case "$host_os" in + aix3.* | aix4.0.* | aix4.1.*) ;; + *) ndb_bin_am_ldflags="-static";; +esac AC_SUBST([ndb_bin_am_ldflags]) AC_SUBST([ndb_opt_subdirs]) diff -Nrup a/include/mysql.h b/include/mysql.h --- a/include/mysql.h 2007-01-22 13:10:36 +01:00 +++ b/include/mysql.h 2007-08-01 04:44:54 +02:00 @@ -27,6 +27,10 @@ #ifndef _mysql_h #define _mysql_h +#ifdef _AIX /* large-file support will break without this */ +#include#undef WIN #undef _WIN diff -Nrup a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp --- a/ndb/src/common/util/File.cpp 2007-02-21 12:04:56 +01:00 +++ b/ndb/src/common/util/File.cpp 2007-08-01 04:44:54 +02:00 @@ -50,7 +50,7 @@ File_class::size(FILE* f) MY_STAT s; // Note that my_fstat behaves *differently* than my_stat. ARGGGHH! - if(my_fstat(::fileno(f), &s, MYF(0))) + if(my_fstat(fileno(f), &s, MYF(0))) return 0;
return s.st_size;
--- a/ndb/src/mgmclient/Makefile.am 2007-06-14 13:40:43 +02:00 +++ b/ndb/src/mgmclient/Makefile.am 2007-08-01 04:44:54 +02:00 @@ -36,6 +36,7 @@ INCLUDES += -I$(top_srcdir)/ndb/include/ LDADD_LOC = $(noinst_LTLIBRARIES) \
../common/portlib/libportlib.la \
@readline_link@ \
+ $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
diff -Nrup a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am
--- a/ndb/src/mgmsrv/Makefile.am 2006-12-30 22:07:31 +01:00
+++ b/ndb/src/mgmsrv/Makefile.am 2007-08-01 04:44:54 +02:00
@@ -41,7 +41,14 @@ #define MAXSTRLEN 16 #define MAXATTR 64 #define MAXTABLES 64 -#define MAXTHREADS 256 +#define NDB_MAXTHREADS 256 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from+*/ +#undef MAXTHREADS #define MAXATTRSIZE 8000 #define START_TIMER NdbTimer timer; timer.doStart(); #define STOP_TIMER timer.doStop(); @@ -56,18 +63,18 @@ struct ThreadNdb
Ndb* NdbRef;
-static NdbThread* threadLife[MAXTHREADS];
+static NdbThread* threadLife[NDB_MAXTHREADS];
static unsigned int tNoOfThreads;
-static int ThreadReady[MAXTHREADS]; -static int ThreadStart[MAXTHREADS]; +static int ThreadReady[NDB_MAXTHREADS]; +static int ThreadStart[NDB_MAXTHREADS]; NDB_COMMAND(benchronja, "benchronja", "benchronja", "benchronja", 65535){ ndb_init();
-static NdbThread* threadLife[MAXTHREADS]; +static NdbThread* threadLife[NDB_MAXTHREADS]; static int tNodeId; -static int ThreadReady[MAXTHREADS]; -static StartType ThreadStart[MAXTHREADS]; +static int ThreadReady[NDB_MAXTHREADS]; +static StartType ThreadStart[NDB_MAXTHREADS]; static char tableName[MAXTABLES][MAXSTRLEN+1]; static char attrName[MAXATTR][MAXSTRLEN+1];}
ndbout << endl << "FLEXASYNCH - Starting normal mode" << endl;
ndbout << "Perform benchmark of insert, update and delete transactions";
while (argc > 1){
if (strcmp(argv[i], "-t") == 0){
tNoOfThreads = atoi(argv[i+1]);
- if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS)){
+ if ((tNoOfThreads < 1) || (tNoOfThreads > NDB_MAXTHREADS)){
ndbout_c("Invalid no of threads");
return -1;
}
diff -Nrup a/ndb/test/ndbapi/flexHammer.cpp b/ndb/test/ndbapi/flexHammer.cpp
--- a/ndb/test/ndbapi/flexHammer.cpp 2006-12-23 20:04:19 +01:00
+++ b/ndb/test/ndbapi/flexHammer.cpp 2007-08-01 04:44:54 +02:00
@@ -69,7 +69,14 @@ ErrorData * flexHammerErrorData; #define MAXSTRLEN 16 #define MAXATTR 64 #define MAXTABLES 64 -#define MAXTHREADS 256 +#define NDB_MAXTHREADS 256 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from+*/ +#undef MAXTHREADS #define MAXATTRSIZE 100 // Max number of retries if something fails #define MaxNoOfAttemptsC 10 @@ -122,8 +129,8 @@ static int tAttributeSize; static int tNoOfOperations; static int tNoOfRecords; static int tNoOfLoops; -static ReadyType ThreadReady[MAXTHREADS]; -static StartType ThreadStart[MAXTHREADS]; +static ReadyType ThreadReady[NDB_MAXTHREADS]; +static StartType ThreadStart[NDB_MAXTHREADS]; static char tableName[MAXTABLES][MAXSTRLEN]; static char attrName[MAXATTR][MAXSTRLEN]; static int theSimpleFlag = 0; @@ -643,7 +650,7 @@ readArguments (int argc, const char** ar while (argc > 1) {
if (strcmp(argv[i], "-t") == 0) {
tNoOfThreads = atoi(argv[i+1]);
- if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS))
+ if ((tNoOfThreads < 1) || (tNoOfThreads > NDB_MAXTHREADS))
return(1);
}
else if (strcmp(argv[i], "-o") == 0) {
diff -Nrup a/ndb/test/ndbapi/flexScan.cpp b/ndb/test/ndbapi/flexScan.cpp
--- a/ndb/test/ndbapi/flexScan.cpp 2006-12-23 20:04:19 +01:00
+++ b/ndb/test/ndbapi/flexScan.cpp 2007-08-01 04:44:54 +02:00
@@ -68,7 +68,14 @@ #define MAXSTRLEN 16 #define MAXATTR 64 #define MAXTABLES 64 -#define MAXTHREADS 256 +#define NDB_MAXTHREADS 256 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from+*/ +#undef MAXTHREADS #define MAXATTRSIZE 64
enum StartType {
if (strcmp(argv[i], "-t") == 0) {
if (argv[i + 1] != NULL) {
tNoOfThreads = atoi(argv[i + 1]);
- if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS)) {
+ if ((tNoOfThreads < 1) || (tNoOfThreads > NDB_MAXTHREADS)) {
retValue = -1;
} // if
} // if
diff -Nrup a/ndb/test/ndbapi/flexTT.cpp b/ndb/test/ndbapi/flexTT.cpp
--- a/ndb/test/ndbapi/flexTT.cpp 2006-12-23 20:04:19 +01:00
+++ b/ndb/test/ndbapi/flexTT.cpp 2007-08-01 04:44:54 +02:00
@@ -35,7 +35,14 @@ #define MAXSTRLEN 16 #define MAXATTR 64 #define MAXTABLES 64 -#define MAXTHREADS 128 +#define NDB_MAXTHREADS 128 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from+*/ +#undef MAXTHREADS #define MAXPAR 1024 #define MAXATTRSIZE 1000 #define PKSIZE 1 ErrorData * flexTTErrorData; -static NdbThread* threadLife[MAXTHREADS]; +static NdbThread* threadLife[NDB_MAXTHREADS]; static int tNodeId; -static int ThreadReady[MAXTHREADS]; -static StartType ThreadStart[MAXTHREADS]; +static int ThreadReady[NDB_MAXTHREADS]; +static StartType ThreadStart[NDB_MAXTHREADS]; static char tableName[1][MAXSTRLEN+1]; static char attrName[5][MAXSTRLEN+1];}
ndbout << endl << "FLEXTT - Starting normal mode" << endl;
ndbout << "Perform TimesTen benchmark" << endl;
while (argc > 1){
if (strcmp(argv[i], "-t") == 0){
tNoOfThreads = atoi(argv[i+1]);
- if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS)){
+ if ((tNoOfThreads < 1) || (tNoOfThreads > NDB_MAXTHREADS)){
ndbout_c("Invalid no of threads");
return -1;
}
diff -Nrup a/ndb/test/ndbapi/flexTimedAsynch.cpp b/ndb/test/ndbapi/flexTimedAsynch.cpp
--- a/ndb/test/ndbapi/flexTimedAsynch.cpp 2006-12-23 20:04:19 +01:00
+++ b/ndb/test/ndbapi/flexTimedAsynch.cpp 2007-08-01 04:44:55 +02:00
@@ -57,7 +57,14 @@ #define MAXSTRLEN 16 #define MAXATTR 64 #define MAXTABLES 64 -#define MAXTHREADS 256 +#define NDB_MAXTHREADS 256 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from+*/ +#undef MAXTHREADS #define MAXATTRSIZE 1000 #define PKSIZE 1
-static NdbThread* threadLife[MAXTHREADS];
+static NdbThread* threadLife[NDB_MAXTHREADS];
static int tNodeId;
- ThreadNdb tabThread[MAXTHREADS]; + ThreadNdb tabThread[NDB_MAXTHREADS]; int tLoops=0; int returnValue; //NdbOut flexTimedAsynchNdbOut; @@ -615,8 +622,8 @@ void readArguments(int argc, const char*
if (strcmp(argv[i], "-t") == 0)
{
tNoOfThreads = atoi(argv[i+1]);
- // if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS))
- if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS))
+ // if ((tNoOfThreads < 1) || (tNoOfThreads > NDB_MAXTHREADS))
+ if ((tNoOfThreads < 1) || (tNoOfThreads > NDB_MAXTHREADS))
exit(-1);
}
else if (strcmp(argv[i], "-i") == 0)
@@ -29,7 +29,14 @@ #define MAXSTRLEN 16 #define MAXATTR 64 #define MAXTABLES 64 -#define MAXTHREADS 256 +#define NDB_MAXTHREADS 256 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from+*/ +#undef MAXTHREADS #define MAXATTRSIZE 8000 static unsigned int tNoOfRecords; diff -Nrup a/ndb/test/ndbapi/testOperations.cpp b/ndb/test/ndbapi/testOperations.cpp --- a/ndb/test/ndbapi/testOperations.cpp 2006-12-23 20:04:19 +01:00 +++ b/ndb/test/ndbapi/testOperations.cpp 2007-08-01 04:44:55 +02:00 @@ -98,11 +98,6 @@ OperationTestCase matrix[] = { break; } #define C3(b) if (!(b)) { \ - g_err << "ERR: "<< step->getName() \ - << " failed on line " << __LINE__ << endl; \ - abort(); return NDBT_FAILED; } - -#define C3(b) if (!(b)) { \ g_err << "ERR: failed on line " << __LINE__ << endl; \ return NDBT_FAILED; } diff -Nrup a/ndb/test/ndbapi/testScanFilter.cpp b/ndb/test/ndbapi/testScanFilter.cpp --- a/ndb/test/ndbapi/testScanFilter.cpp 2007-04-26 16:48:50 +02:00 +++ b/ndb/test/ndbapi/testScanFilter.cpp 2007-08-01 04:44:55 +02:00 @@ -49,7 +49,15 @@ const char COL_LEN = 7;
/*
-#define MAXTHREADS 24 +/* + NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a + #define from -- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Tue Jul 31 22:42:30 2007 This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:20:25 EDT |
||||||||||
|
|||||||||||