Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d02dd251
Commit
d02dd251
authored
Aug 01, 2007
by
tnurnberg@sin.intern.azundris.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge sin.intern.azundris.com:/home/tnurnberg/10776/50-10776
into sin.intern.azundris.com:/home/tnurnberg/10776/51-10776
parents
8e22343c
8dd4751b
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
111 additions
and
52 deletions
+111
-52
config/ac-macros/large_file.m4
config/ac-macros/large_file.m4
+3
-8
include/mysql.h
include/mysql.h
+4
-0
storage/ndb/src/mgmclient/Makefile.am
storage/ndb/src/mgmclient/Makefile.am
+1
-0
storage/ndb/src/mgmsrv/Makefile.am
storage/ndb/src/mgmsrv/Makefile.am
+1
-1
storage/ndb/test/ndbapi/benchronja.cpp
storage/ndb/test/ndbapi/benchronja.cpp
+13
-6
storage/ndb/test/ndbapi/flexAsynch.cpp
storage/ndb/test/ndbapi/flexAsynch.cpp
+13
-6
storage/ndb/test/ndbapi/flexHammer.cpp
storage/ndb/test/ndbapi/flexHammer.cpp
+11
-4
storage/ndb/test/ndbapi/flexScan.cpp
storage/ndb/test/ndbapi/flexScan.cpp
+9
-2
storage/ndb/test/ndbapi/flexTT.cpp
storage/ndb/test/ndbapi/flexTT.cpp
+13
-6
storage/ndb/test/ndbapi/flexTimedAsynch.cpp
storage/ndb/test/ndbapi/flexTimedAsynch.cpp
+15
-8
storage/ndb/test/ndbapi/initronja.cpp
storage/ndb/test/ndbapi/initronja.cpp
+8
-1
storage/ndb/test/ndbapi/testOperations.cpp
storage/ndb/test/ndbapi/testOperations.cpp
+0
-5
storage/ndb/test/ndbapi/testScanFilter.cpp
storage/ndb/test/ndbapi/testScanFilter.cpp
+10
-2
storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp
storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp
+10
-3
No files found.
config/ac-macros/large_file.m4
View file @
d02dd251
...
@@ -127,14 +127,9 @@ AC_DEFUN([MYSQL_SYS_LARGEFILE],
...
@@ -127,14 +127,9 @@ AC_DEFUN([MYSQL_SYS_LARGEFILE],
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
ac_cv_sys_largefile_source=1 ;;
ac_cv_sys_largefile_source=1 ;;
esac])
esac])
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
ac_cv_sys_large_files,
# AIX 4.2 and later -- do nothing, include standards.h instead.
[Large files support on AIX-style hosts.],
# this goes for both GNU and IBM C and C++ compilers.
[case "$host_os" in
# AIX 4.2 and later
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
ac_cv_sys_large_files=1 ;;
esac])
fi
fi
])
])
include/mysql.h
View file @
d02dd251
...
@@ -27,6 +27,10 @@
...
@@ -27,6 +27,10 @@
#ifndef _mysql_h
#ifndef _mysql_h
#define _mysql_h
#define _mysql_h
#ifdef _AIX
/* large-file support will break without this */
#include <standards.h>
#endif
#ifdef __CYGWIN__
/* CYGWIN implements a UNIX API */
#ifdef __CYGWIN__
/* CYGWIN implements a UNIX API */
#undef WIN
#undef WIN
#undef _WIN
#undef _WIN
...
...
storage/ndb/src/mgmclient/Makefile.am
View file @
d02dd251
...
@@ -36,6 +36,7 @@ INCLUDES += -I$(top_srcdir)/storage/ndb/include/mgmapi \
...
@@ -36,6 +36,7 @@ INCLUDES += -I$(top_srcdir)/storage/ndb/include/mgmapi \
LDADD_LOC
=
$(noinst_LTLIBRARIES)
\
LDADD_LOC
=
$(noinst_LTLIBRARIES)
\
../common/portlib/libportlib.la
\
../common/portlib/libportlib.la
\
@readline_link@
\
@readline_link@
\
$(top_builddir)
/ndb/src/libndbclient.la
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/strings/libmystrings.a
\
$(top_builddir)
/strings/libmystrings.a
\
...
...
storage/ndb/src/mgmsrv/Makefile.am
View file @
d02dd251
...
@@ -38,7 +38,7 @@ INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/ndbapi \
...
@@ -38,7 +38,7 @@ INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/ndbapi \
-I
$(top_srcdir)
/storage/ndb/src/common/mgmcommon
\
-I
$(top_srcdir)
/storage/ndb/src/common/mgmcommon
\
-I
$(top_srcdir)
/storage/ndb/src/mgmclient
-I
$(top_srcdir)
/storage/ndb/src/mgmclient
LDADD_LOC
=
$(top_builddir)
/storage/ndb/src/mgmclient/CommandInterpreter.o
\
LDADD_LOC
=
$(top_builddir)
/storage/ndb/src/mgmclient/CommandInterpreter.
l
o
\
$(top_builddir)
/storage/ndb/src/libndbclient.la
\
$(top_builddir)
/storage/ndb/src/libndbclient.la
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/mysys/libmysys.a
\
...
...
storage/ndb/test/ndbapi/benchronja.cpp
View file @
d02dd251
...
@@ -41,7 +41,14 @@
...
@@ -41,7 +41,14 @@
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 256
#define NDB_MAXTHREADS 256
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXATTRSIZE 8000
#define MAXATTRSIZE 8000
#define START_TIMER NdbTimer timer; timer.doStart();
#define START_TIMER NdbTimer timer; timer.doStart();
#define STOP_TIMER timer.doStop();
#define STOP_TIMER timer.doStop();
...
@@ -56,18 +63,18 @@ struct ThreadNdb
...
@@ -56,18 +63,18 @@ struct ThreadNdb
Ndb
*
NdbRef
;
Ndb
*
NdbRef
;
};
};
static
NdbThread
*
threadLife
[
MAXTHREADS
];
static
NdbThread
*
threadLife
[
NDB_
MAXTHREADS
];
static
unsigned
int
tNoOfThreads
;
static
unsigned
int
tNoOfThreads
;
static
unsigned
int
tNoOfOpsPerExecute
;
static
unsigned
int
tNoOfOpsPerExecute
;
static
unsigned
int
tNoOfRecords
;
static
unsigned
int
tNoOfRecords
;
static
unsigned
int
tNoOfOperations
;
static
unsigned
int
tNoOfOperations
;
static
int
ThreadReady
[
MAXTHREADS
];
static
int
ThreadReady
[
NDB_
MAXTHREADS
];
static
int
ThreadStart
[
MAXTHREADS
];
static
int
ThreadStart
[
NDB_
MAXTHREADS
];
NDB_COMMAND
(
benchronja
,
"benchronja"
,
"benchronja"
,
"benchronja"
,
65535
){
NDB_COMMAND
(
benchronja
,
"benchronja"
,
"benchronja"
,
"benchronja"
,
65535
){
ndb_init
();
ndb_init
();
ThreadNdb
tabThread
[
MAXTHREADS
];
ThreadNdb
tabThread
[
NDB_
MAXTHREADS
];
int
i
=
0
;
int
i
=
0
;
int
cont
=
0
;
int
cont
=
0
;
Ndb
*
pMyNdb
=
NULL
;
//( "TEST_DB" );
Ndb
*
pMyNdb
=
NULL
;
//( "TEST_DB" );
...
@@ -84,7 +91,7 @@ NDB_COMMAND(benchronja, "benchronja", "benchronja", "benchronja", 65535){
...
@@ -84,7 +91,7 @@ NDB_COMMAND(benchronja, "benchronja", "benchronja", "benchronja", 65535){
{
{
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
){
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
){
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
MAXTHREADS
))
goto
error_input
;
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
NDB_
MAXTHREADS
))
goto
error_input
;
}
else
if
(
strcmp
(
argv
[
i
],
"-o"
)
==
0
){
}
else
if
(
strcmp
(
argv
[
i
],
"-o"
)
==
0
){
tNoOfOperations
=
atoi
(
argv
[
i
+
1
]);
tNoOfOperations
=
atoi
(
argv
[
i
+
1
]);
if
(
tNoOfOperations
<
1
)
goto
error_input
;
if
(
tNoOfOperations
<
1
)
goto
error_input
;
...
...
storage/ndb/test/ndbapi/flexAsynch.cpp
View file @
d02dd251
...
@@ -35,7 +35,14 @@
...
@@ -35,7 +35,14 @@
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 128
#define NDB_MAXTHREADS 128
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXPAR 1024
#define MAXPAR 1024
#define MAXATTRSIZE 1000
#define MAXATTRSIZE 1000
#define PKSIZE 2
#define PKSIZE 2
...
@@ -76,10 +83,10 @@ struct ThreadNdb
...
@@ -76,10 +83,10 @@ struct ThreadNdb
int
ThreadNo
;
int
ThreadNo
;
};
};
static
NdbThread
*
threadLife
[
MAXTHREADS
];
static
NdbThread
*
threadLife
[
NDB_
MAXTHREADS
];
static
int
tNodeId
;
static
int
tNodeId
;
static
int
ThreadReady
[
MAXTHREADS
];
static
int
ThreadReady
[
NDB_
MAXTHREADS
];
static
StartType
ThreadStart
[
MAXTHREADS
];
static
StartType
ThreadStart
[
NDB_
MAXTHREADS
];
static
char
tableName
[
MAXTABLES
][
MAXSTRLEN
+
1
];
static
char
tableName
[
MAXTABLES
][
MAXSTRLEN
+
1
];
static
char
attrName
[
MAXATTR
][
MAXSTRLEN
+
1
];
static
char
attrName
[
MAXATTR
][
MAXSTRLEN
+
1
];
...
@@ -160,7 +167,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
...
@@ -160,7 +167,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
}
}
pThreadData
=
new
ThreadNdb
[
MAXTHREADS
];
pThreadData
=
new
ThreadNdb
[
NDB_
MAXTHREADS
];
ndbout
<<
endl
<<
"FLEXASYNCH - Starting normal mode"
<<
endl
;
ndbout
<<
endl
<<
"FLEXASYNCH - Starting normal mode"
<<
endl
;
ndbout
<<
"Perform benchmark of insert, update and delete transactions"
;
ndbout
<<
"Perform benchmark of insert, update and delete transactions"
;
...
@@ -844,7 +851,7 @@ readArguments(int argc, const char** argv){
...
@@ -844,7 +851,7 @@ readArguments(int argc, const char** argv){
while
(
argc
>
1
){
while
(
argc
>
1
){
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
){
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
){
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
MAXTHREADS
)){
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
NDB_
MAXTHREADS
)){
ndbout_c
(
"Invalid no of threads"
);
ndbout_c
(
"Invalid no of threads"
);
return
-
1
;
return
-
1
;
}
}
...
...
storage/ndb/test/ndbapi/flexHammer.cpp
View file @
d02dd251
...
@@ -66,7 +66,14 @@ ErrorData * flexHammerErrorData;
...
@@ -66,7 +66,14 @@ ErrorData * flexHammerErrorData;
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 256
#define NDB_MAXTHREADS 256
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXATTRSIZE 100
#define MAXATTRSIZE 100
// Max number of retries if something fails
// Max number of retries if something fails
#define MaxNoOfAttemptsC 10
#define MaxNoOfAttemptsC 10
...
@@ -119,8 +126,8 @@ static int tAttributeSize;
...
@@ -119,8 +126,8 @@ static int tAttributeSize;
static
int
tNoOfOperations
;
static
int
tNoOfOperations
;
static
int
tNoOfRecords
;
static
int
tNoOfRecords
;
static
int
tNoOfLoops
;
static
int
tNoOfLoops
;
static
ReadyType
ThreadReady
[
MAXTHREADS
];
static
ReadyType
ThreadReady
[
NDB_
MAXTHREADS
];
static
StartType
ThreadStart
[
MAXTHREADS
];
static
StartType
ThreadStart
[
NDB_
MAXTHREADS
];
static
char
tableName
[
MAXTABLES
][
MAXSTRLEN
];
static
char
tableName
[
MAXTABLES
][
MAXSTRLEN
];
static
char
attrName
[
MAXATTR
][
MAXSTRLEN
];
static
char
attrName
[
MAXATTR
][
MAXSTRLEN
];
static
int
theSimpleFlag
=
0
;
static
int
theSimpleFlag
=
0
;
...
@@ -640,7 +647,7 @@ readArguments (int argc, const char** argv)
...
@@ -640,7 +647,7 @@ readArguments (int argc, const char** argv)
while
(
argc
>
1
)
{
while
(
argc
>
1
)
{
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
{
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
{
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
MAXTHREADS
))
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
NDB_
MAXTHREADS
))
return
(
1
);
return
(
1
);
}
}
else
if
(
strcmp
(
argv
[
i
],
"-o"
)
==
0
)
{
else
if
(
strcmp
(
argv
[
i
],
"-o"
)
==
0
)
{
...
...
storage/ndb/test/ndbapi/flexScan.cpp
View file @
d02dd251
...
@@ -68,7 +68,14 @@
...
@@ -68,7 +68,14 @@
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 256
#define NDB_MAXTHREADS 256
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXATTRSIZE 64
#define MAXATTRSIZE 64
enum
StartType
{
enum
StartType
{
...
@@ -848,7 +855,7 @@ static int readArguments(int argc, const char** argv)
...
@@ -848,7 +855,7 @@ static int readArguments(int argc, const char** argv)
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
{
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
{
if
(
argv
[
i
+
1
]
!=
NULL
)
{
if
(
argv
[
i
+
1
]
!=
NULL
)
{
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
MAXTHREADS
))
{
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
NDB_
MAXTHREADS
))
{
retValue
=
-
1
;
retValue
=
-
1
;
}
// if
}
// if
}
// if
}
// if
...
...
storage/ndb/test/ndbapi/flexTT.cpp
View file @
d02dd251
...
@@ -35,7 +35,14 @@
...
@@ -35,7 +35,14 @@
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 128
#define NDB_MAXTHREADS 128
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXPAR 1024
#define MAXPAR 1024
#define MAXATTRSIZE 1000
#define MAXATTRSIZE 1000
#define PKSIZE 1
#define PKSIZE 1
...
@@ -101,10 +108,10 @@ static void input_error();
...
@@ -101,10 +108,10 @@ static void input_error();
ErrorData
*
flexTTErrorData
;
ErrorData
*
flexTTErrorData
;
static
NdbThread
*
threadLife
[
MAXTHREADS
];
static
NdbThread
*
threadLife
[
NDB_
MAXTHREADS
];
static
int
tNodeId
;
static
int
tNodeId
;
static
int
ThreadReady
[
MAXTHREADS
];
static
int
ThreadReady
[
NDB_
MAXTHREADS
];
static
StartType
ThreadStart
[
MAXTHREADS
];
static
StartType
ThreadStart
[
NDB_
MAXTHREADS
];
static
char
tableName
[
1
][
MAXSTRLEN
+
1
];
static
char
tableName
[
1
][
MAXSTRLEN
+
1
];
static
char
attrName
[
5
][
MAXSTRLEN
+
1
];
static
char
attrName
[
5
][
MAXSTRLEN
+
1
];
...
@@ -184,7 +191,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535)
...
@@ -184,7 +191,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535)
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
}
}
pThreadData
=
new
ThreadNdb
[
MAXTHREADS
];
pThreadData
=
new
ThreadNdb
[
NDB_
MAXTHREADS
];
ndbout
<<
endl
<<
"FLEXTT - Starting normal mode"
<<
endl
;
ndbout
<<
endl
<<
"FLEXTT - Starting normal mode"
<<
endl
;
ndbout
<<
"Perform TimesTen benchmark"
<<
endl
;
ndbout
<<
"Perform TimesTen benchmark"
<<
endl
;
...
@@ -798,7 +805,7 @@ readArguments(int argc, const char** argv){
...
@@ -798,7 +805,7 @@ readArguments(int argc, const char** argv){
while
(
argc
>
1
){
while
(
argc
>
1
){
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
){
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
){
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
MAXTHREADS
)){
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
NDB_
MAXTHREADS
)){
ndbout_c
(
"Invalid no of threads"
);
ndbout_c
(
"Invalid no of threads"
);
return
-
1
;
return
-
1
;
}
}
...
...
storage/ndb/test/ndbapi/flexTimedAsynch.cpp
View file @
d02dd251
...
@@ -57,7 +57,14 @@
...
@@ -57,7 +57,14 @@
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 256
#define NDB_MAXTHREADS 256
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXATTRSIZE 1000
#define MAXATTRSIZE 1000
#define PKSIZE 1
#define PKSIZE 1
...
@@ -95,10 +102,10 @@ static int failed = 0 ; // lame global variable that keeps track of failed trans
...
@@ -95,10 +102,10 @@ static int failed = 0 ; // lame global variable that keeps track of failed trans
// incremented in executeCallback() and reset in main()
// incremented in executeCallback() and reset in main()
/************************************************************* < epaulsa */
/************************************************************* < epaulsa */
static
NdbThread
*
threadLife
[
MAXTHREADS
];
static
NdbThread
*
threadLife
[
NDB_
MAXTHREADS
];
static
int
tNodeId
;
static
int
tNodeId
;
static
int
ThreadReady
[
MAXTHREADS
];
static
int
ThreadReady
[
NDB_
MAXTHREADS
];
static
StartType
ThreadStart
[
MAXTHREADS
];
static
StartType
ThreadStart
[
NDB_
MAXTHREADS
];
static
char
tableName
[
MAXTABLES
][
MAXSTRLEN
+
1
];
static
char
tableName
[
MAXTABLES
][
MAXSTRLEN
+
1
];
static
char
attrName
[
MAXATTR
][
MAXSTRLEN
+
1
];
static
char
attrName
[
MAXATTR
][
MAXSTRLEN
+
1
];
static
int
*
getAttrValueTable
;
static
int
*
getAttrValueTable
;
...
@@ -174,7 +181,7 @@ void deleteAttributeSpace(){
...
@@ -174,7 +181,7 @@ void deleteAttributeSpace(){
NDB_COMMAND
(
flexTimedAsynch
,
"flexTimedAsynch"
,
"flexTimedAsynch [-tpoilcas]"
,
"flexTimedAsynch"
,
65535
)
NDB_COMMAND
(
flexTimedAsynch
,
"flexTimedAsynch"
,
"flexTimedAsynch [-tpoilcas]"
,
"flexTimedAsynch"
,
65535
)
{
{
ndb_init
();
ndb_init
();
ThreadNdb
tabThread
[
MAXTHREADS
];
ThreadNdb
tabThread
[
NDB_
MAXTHREADS
];
int
tLoops
=
0
;
int
tLoops
=
0
;
int
returnValue
;
int
returnValue
;
//NdbOut flexTimedAsynchNdbOut;
//NdbOut flexTimedAsynchNdbOut;
...
@@ -615,8 +622,8 @@ void readArguments(int argc, const char** argv)
...
@@ -615,8 +622,8 @@ void readArguments(int argc, const char** argv)
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
{
{
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
tNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
// if ((tNoOfThreads < 1) || (tNoOfThreads > MAXTHREADS))
// if ((tNoOfThreads < 1) || (tNoOfThreads >
NDB_
MAXTHREADS))
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
MAXTHREADS
))
if
((
tNoOfThreads
<
1
)
||
(
tNoOfThreads
>
NDB_
MAXTHREADS
))
exit
(
-
1
);
exit
(
-
1
);
}
}
else
if
(
strcmp
(
argv
[
i
],
"-i"
)
==
0
)
else
if
(
strcmp
(
argv
[
i
],
"-i"
)
==
0
)
...
@@ -628,7 +635,7 @@ void readArguments(int argc, const char** argv)
...
@@ -628,7 +635,7 @@ void readArguments(int argc, const char** argv)
else
if
(
strcmp
(
argv
[
i
],
"-p"
)
==
0
)
else
if
(
strcmp
(
argv
[
i
],
"-p"
)
==
0
)
{
{
tNoOfTransInBatch
=
atoi
(
argv
[
i
+
1
]);
tNoOfTransInBatch
=
atoi
(
argv
[
i
+
1
]);
//if ((tNoOfTransInBatch < 1) || (tNoOfTransInBatch > MAXTHREADS))
//if ((tNoOfTransInBatch < 1) || (tNoOfTransInBatch >
NDB_
MAXTHREADS))
if
((
tNoOfTransInBatch
<
1
)
||
(
tNoOfTransInBatch
>
10000
))
if
((
tNoOfTransInBatch
<
1
)
||
(
tNoOfTransInBatch
>
10000
))
exit
(
-
1
);
exit
(
-
1
);
}
}
...
...
storage/ndb/test/ndbapi/initronja.cpp
View file @
d02dd251
...
@@ -29,7 +29,14 @@
...
@@ -29,7 +29,14 @@
#define MAXSTRLEN 16
#define MAXSTRLEN 16
#define MAXATTR 64
#define MAXATTR 64
#define MAXTABLES 64
#define MAXTABLES 64
#define MAXTHREADS 256
#define NDB_MAXTHREADS 256
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define MAXATTRSIZE 8000
#define MAXATTRSIZE 8000
static
unsigned
int
tNoOfRecords
;
static
unsigned
int
tNoOfRecords
;
...
...
storage/ndb/test/ndbapi/testOperations.cpp
View file @
d02dd251
...
@@ -98,11 +98,6 @@ OperationTestCase matrix[] = {
...
@@ -98,11 +98,6 @@ OperationTestCase matrix[] = {
result = NDBT_FAILED; \
result = NDBT_FAILED; \
break; }
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)) { \
#define C3(b) if (!(b)) { \
g_err << "ERR: failed on line " << __LINE__ << endl; \
g_err << "ERR: failed on line " << __LINE__ << endl; \
return NDBT_FAILED; }
return NDBT_FAILED; }
...
...
storage/ndb/test/ndbapi/testScanFilter.cpp
View file @
d02dd251
...
@@ -49,7 +49,15 @@ const char COL_LEN = 7;
...
@@ -49,7 +49,15 @@ const char COL_LEN = 7;
* there are six columns, 'i', 'j', 'k', 'l', 'm', 'n', and each on is equal to 1 or 1,
* there are six columns, 'i', 'j', 'k', 'l', 'm', 'n', and each on is equal to 1 or 1,
* Since each tuple should be unique in this case, then TUPLE_NUM = 2 power 6 = 64
* Since each tuple should be unique in this case, then TUPLE_NUM = 2 power 6 = 64
*/
*/
const
int
TUPLE_NUM
=
(
int
)
pow
(
2
,
COL_LEN
-
1
);
#ifdef _AIX
/*
IBM xlC_r breaks on the initialization with pow():
"The expression must be an integral constant expression."
*/
const
int
TUPLE_NUM
=
64
;
#else
const
int
TUPLE_NUM
=
(
int
)
pow
(
2
,
COL_LEN
-
1
);
#endif
/*
/*
* the recursive level of random scan filter, can
* the recursive level of random scan filter, can
...
@@ -479,7 +487,7 @@ int get_column_id(char ch)
...
@@ -479,7 +487,7 @@ int get_column_id(char ch)
*/
*/
bool
check_col_equal_one
(
int
tuple_no
,
int
col_id
)
bool
check_col_equal_one
(
int
tuple_no
,
int
col_id
)
{
{
int
i
=
(
int
)
pow
(
2
,
6
-
col_id
);
int
i
=
(
int
)
pow
(
(
double
)
2
,
(
double
)(
6
-
col_id
)
);
int
j
=
tuple_no
/
i
;
int
j
=
tuple_no
/
i
;
if
(
j
%
2
)
if
(
j
%
2
)
return
true
;
return
true
;
...
...
storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp
View file @
d02dd251
...
@@ -27,7 +27,14 @@ using namespace std; //
...
@@ -27,7 +27,14 @@ using namespace std; //
#define MAXROW 64
#define MAXROW 64
#define DEFROW 8
#define DEFROW 8
#define MAXTHREADS 24
/*
NDB_MAXTHREADS used to be just MAXTHREADS, which collides with a
#define from <sys/thread.h> on AIX (IBM compiler). We explicitly
#undef it here lest someone use it by habit and get really funny
results. K&R says we may #undef non-existent symbols, so let's go.
*/
#undef MAXTHREADS
#define NDB_MAXTHREADS 24
#define DEFTHREADS 2
#define DEFTHREADS 2
#define MAXTABLES 16
#define MAXTABLES 16
...
@@ -83,7 +90,7 @@ int main(int argc, char* argv[]){
...
@@ -83,7 +90,7 @@ int main(int argc, char* argv[]){
char
*
szTableNames
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
nNoOfTables
*
MAX_TABLE_NAME
)
;
char
*
szTableNames
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
nNoOfTables
*
MAX_TABLE_NAME
)
;
memset
(
szTableNames
,
0
,
sizeof
(
char
)
*
nNoOfTables
*
MAX_TABLE_NAME
)
;
memset
(
szTableNames
,
0
,
sizeof
(
char
)
*
nNoOfTables
*
MAX_TABLE_NAME
)
;
UintPtr
pThreadHandles
[
MAXTHREADS
]
=
{
NULL
}
;
UintPtr
pThreadHandles
[
NDB_
MAXTHREADS
]
=
{
NULL
}
;
AssignTableNames
(
szTableNames
,
nNoOfTables
)
;
AssignTableNames
(
szTableNames
,
nNoOfTables
)
;
...
@@ -313,7 +320,7 @@ void ParseArguments(int argc, const char** argv){
...
@@ -313,7 +320,7 @@ void ParseArguments(int argc, const char** argv){
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
)
{
{
nNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
nNoOfThreads
=
atoi
(
argv
[
i
+
1
]);
if
((
nNoOfThreads
<
1
)
||
(
nNoOfThreads
>
MAXTHREADS
))
if
((
nNoOfThreads
<
1
)
||
(
nNoOfThreads
>
NDB_
MAXTHREADS
))
nNoOfThreads
=
DEFTHREADS
;
nNoOfThreads
=
DEFTHREADS
;
}
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment