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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7159900e
Commit
7159900e
authored
Jun 03, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents
b558c415
13047f45
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
56 deletions
+51
-56
configure.in
configure.in
+13
-5
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+1
-1
ndb/src/kernel/error/ErrorReporter.cpp
ndb/src/kernel/error/ErrorReporter.cpp
+9
-21
ndb/src/kernel/error/ErrorReporter.hpp
ndb/src/kernel/error/ErrorReporter.hpp
+1
-9
ndb/src/kernel/vm/Emulator.cpp
ndb/src/kernel/vm/Emulator.cpp
+5
-5
ndb/src/kernel/vm/Emulator.hpp
ndb/src/kernel/vm/Emulator.hpp
+11
-8
ndb/src/kernel/vm/pc.hpp
ndb/src/kernel/vm/pc.hpp
+8
-7
ndb/src/ndbapi/Makefile.am
ndb/src/ndbapi/Makefile.am
+3
-0
No files found.
configure.in
View file @
7159900e
...
...
@@ -1614,19 +1614,15 @@ then
# Medium debug.
CFLAGS
=
"
$DEBUG_CFLAGS
$DEBUG_OPTIMIZE_CC
-DDBUG_ON -DSAFE_MUTEX
$CFLAGS
"
CXXFLAGS
=
"
$DEBUG_CXXFLAGS
$DEBUG_OPTIMIZE_CXX
-DSAFE_MUTEX
$CXXFLAGS
"
#NDB_DEFS="-DNDB_RELEASE -DUSE_EMULATED_JAM -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
NDB_DEFS
=
"-DNDB_DEBUG -DUSE_EMULATED_JAM -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
elif
test
"
$with_debug
"
=
"full"
then
# Full debug. Very slow in some cases
CFLAGS
=
"
$DEBUG_CFLAGS
-DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC
$CFLAGS
"
CXXFLAGS
=
"
$DEBUG_CXXFLAGS
-DSAFE_MUTEX -DSAFEMALLOC
$CXXFLAGS
"
NDB_DEFS
=
"-DNDB_DEBUG -DUSE_EMULATED_JAM -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
else
# Optimized version. No debug
CFLAGS
=
"
$OPTIMIZE_CFLAGS
-DDBUG_OFF
$CFLAGS
"
CXXFLAGS
=
"
$OPTIMIZE_CXXFLAGS
-DDBUG_OFF
$CXXFLAGS
"
NDB_DEFS
=
"-DNDB_RELEASE -DUSE_EMULATED_JAM -DNDEBUG"
fi
# Force static compilation to avoid linking problems/get more speed
...
...
@@ -2863,7 +2859,19 @@ if test X"$have_ndbcluster" = Xyes
then
MAKE_BINARY_DISTRIBUTION_OPTIONS="
$MAKE_BINARY_DISTRIBUTION_OPTIONS
--with-ndbcluster
"
CXXFLAGS="
$CXXFLAGS
\$
(
NDB_CXXFLAGS
)
"
if test "
$with_debug
" = "
yes
"
then
# Medium debug.
NDB_DEFS="
-DVM_TRACE
-DERROR_INSERT
-DARRAY_GUARD
"
CXXFLAGS="
$CXXFLAGS
\$
(
NDB_CXXFLAGS
)
\$
(
NDB_CXXFLAGS_LOC
)
\$
(
NDB_CXXFLAGS_DEBUG_LOC
)
"
elif test "
$with_debug
" = "
full
"
then
NDB_DEFS="
-DVM_TRACE
-DERROR_INSERT
-DARRAY_GUARD
"
CXXFLAGS="
$CXXFLAGS
\$
(
NDB_CXXFLAGS
)
\$
(
NDB_CXXFLAGS_LOC
)
\$
(
NDB_CXXFLAGS_DEBUG_LOC
)
"
else
NDB_DEFS="
-DNDEBUG
"
CXXFLAGS="
$CXXFLAGS
\$
(
NDB_CXXFLAGS
)
\$
(
NDB_CXXFLAGS_LOC
)
\$
(
NDB_CXXFLAGS_RELEASE_LOC
)
"
fi
fi
AC_SUBST([NDB_DEFS])
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
7159900e
...
...
@@ -111,7 +111,7 @@ Dbdict::execDUMP_STATE_ORD(Signal* signal)
{
jamEntry
();
#ifdef
NDB_DEBUG
#ifdef
VM_TRACE
if
(
signal
->
theData
[
0
]
==
1222
){
const
Uint32
tab
=
signal
->
theData
[
1
];
PrepDropTabReq
*
req
=
(
PrepDropTabReq
*
)
signal
->
getDataPtr
();
...
...
ndb/src/kernel/error/ErrorReporter.cpp
View file @
7159900e
...
...
@@ -40,8 +40,8 @@ const char* errorType[] = {
static
int
WriteMessage
(
ErrorCategory
thrdType
,
int
thrdMessageID
,
const
char
*
thrdProblemData
,
const
char
*
thrdObjRef
,
Uint32
thrdTheEmulatedJamIndex
=
0
,
Uint8
thrdTheEmulatedJam
[]
=
0
);
Uint32
thrdTheEmulatedJamIndex
,
Uint8
thrdTheEmulatedJam
[]);
static
void
dumpJam
(
FILE
*
jamStream
,
Uint32
thrdTheEmulatedJamIndex
,
...
...
@@ -157,21 +157,18 @@ ErrorReporter::handleAssert(const char* message, const char* file, int line)
{
char
refMessage
[
100
];
#ifdef USE_EMULATED_JAM
#ifdef NO_EMULATED_JAM
snprintf
(
refMessage
,
100
,
"file: %s lineNo: %d"
,
file
,
line
);
#else
const
Uint32
blockNumber
=
theEmulatedJamBlockNumber
;
const
char
*
blockName
=
getBlockName
(
blockNumber
);
snprintf
(
refMessage
,
100
,
"%s line: %d (block: %s)"
,
file
,
line
,
blockName
);
#endif
WriteMessage
(
assert
,
ERR_ERROR_PRGERR
,
message
,
refMessage
,
theEmulatedJamIndex
,
theEmulatedJam
);
#else
snprintf
(
refMessage
,
100
,
"file: %s lineNo: %d"
,
file
,
line
);
WriteMessage
(
assert
,
ERR_ERROR_PRGERR
,
message
,
refMessage
);
#endif
NdbShutdown
(
NST_ErrorHandler
);
}
...
...
@@ -199,12 +196,8 @@ ErrorReporter::handleError(ErrorCategory type, int messageID,
// The value for type is not always set correctly in the calling function.
// So, to correct this, we set it set it to the value corresponding to
// the function that is called.
#ifdef USE_EMULATED_JAM
WriteMessage
(
type
,
messageID
,
problemData
,
objRef
,
theEmulatedJamIndex
,
theEmulatedJam
);
#else
WriteMessage
(
type
,
messageID
,
problemData
,
objRef
);
#endif
if
(
messageID
==
ERR_ERROR_INSERT
){
NdbShutdown
(
NST_ErrorInsert
);
}
else
{
...
...
@@ -212,9 +205,6 @@ ErrorReporter::handleError(ErrorCategory type, int messageID,
}
}
// This is the function to write the error-message,
// when the USE_EMULATED_JAM-flag is set
// during compilation.
int
WriteMessage
(
ErrorCategory
thrdType
,
int
thrdMessageID
,
const
char
*
thrdProblemData
,
const
char
*
thrdObjRef
,
...
...
@@ -302,9 +292,7 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID,
// ...and "dump the jam" there.
// ErrorReporter::dumpJam(jamStream);
if
(
thrdTheEmulatedJam
!=
0
){
#ifdef USE_EMULATED_JAM
dumpJam
(
jamStream
,
thrdTheEmulatedJamIndex
,
thrdTheEmulatedJam
);
#endif
}
/* Dont print the jobBuffers until a way to copy them,
...
...
@@ -325,7 +313,7 @@ void
dumpJam
(
FILE
*
jamStream
,
Uint32
thrdTheEmulatedJamIndex
,
Uint8
thrdTheEmulatedJam
[])
{
#if
def USE
_EMULATED_JAM
#if
ndef NO
_EMULATED_JAM
// print header
const
int
maxaddr
=
8
;
fprintf
(
jamStream
,
"JAM CONTENTS up->down left->right ?=not block entry
\n
"
);
...
...
@@ -392,5 +380,5 @@ dumpJam(FILE *jamStream,
}
fprintf
(
jamStream
,
"
\n
"
);
fflush
(
jamStream
);
#endif //
USE
_EMULATED_JAM
#endif //
ifndef NO
_EMULATED_JAM
}
ndb/src/kernel/error/ErrorReporter.hpp
View file @
7159900e
...
...
@@ -37,21 +37,13 @@
ErrorReporter::handleThreadAssert(message, __FILE__, __LINE__); }
#ifdef NDEBUG
#define NDB_ASSERT(trueToContinue, message)
#define THREAD_ASSERT(trueToContinue, message)
#else
#define NDB_ASSERT(trueToContinue, message) \
if ( !(trueToContinue) ) { \
ErrorReporter::handleAssert(message, __FILE__, __LINE__); }
#define THREAD_ASSERT(trueToContinue, message) \
if ( !(trueToContinue) ) { \
ErrorReporter::handleThreadAssert(message, __FILE__, __LINE__); }
#endif
// Description:
// This macro is used to report programming errors.
// Parameters:
...
...
ndb/src/kernel/vm/Emulator.cpp
View file @
7159900e
...
...
@@ -43,11 +43,11 @@ extern "C" {
* Declare the global variables
*/
#if
def USE
_EMULATED_JAM
Uint8
theEmulatedJam
[
EMULATED_JAM_SIZE
*
4
];
Uint32
theEmulatedJamIndex
=
0
;
Uint32
theEmulatedJamBlockNumber
=
0
;
#endif
// USE_EMULATED_JAM
#if
ndef NO
_EMULATED_JAM
Uint8
theEmulatedJam
[
EMULATED_JAM_SIZE
*
4
];
Uint32
theEmulatedJamIndex
=
0
;
Uint32
theEmulatedJamBlockNumber
=
0
;
#endif
GlobalData
globalData
;
...
...
ndb/src/kernel/vm/Emulator.hpp
View file @
7159900e
...
...
@@ -36,15 +36,18 @@ extern struct GlobalData globalData;
extern
class
SignalLoggerManager
globalSignalLoggers
;
#endif
#if
def USE
_EMULATED_JAM
#define EMULATED_JAM_SIZE 1024
#define JAM_MASK ((EMULATED_JAM_SIZE * 4) - 1)
#if
ndef NO
_EMULATED_JAM
#define EMULATED_JAM_SIZE 1024
#define JAM_MASK ((EMULATED_JAM_SIZE * 4) - 1)
extern
Uint8
theEmulatedJam
[];
extern
Uint32
theEmulatedJamIndex
;
// last block entry, used in dumpJam() if jam contains no block entries
extern
Uint32
theEmulatedJamBlockNumber
;
#endif // USE_EMULATED_JAM
extern
Uint8
theEmulatedJam
[];
extern
Uint32
theEmulatedJamIndex
;
// last block entry, used in dumpJam() if jam contains no block entries
extern
Uint32
theEmulatedJamBlockNumber
;
#else
const
Uint8
theEmulatedJam
[]
=
0
;
const
Uint32
theEmulatedJamIndex
=
0
;
#endif
struct
EmulatorData
{
class
Configuration
*
theConfiguration
;
...
...
ndb/src/kernel/vm/pc.hpp
View file @
7159900e
...
...
@@ -22,8 +22,14 @@
#include <NdbOut.hpp>
#include <ndb_limits.h>
#ifdef
USE
_EMULATED_JAM
#ifdef
NO
_EMULATED_JAM
#define jam()
#define jamLine(line)
#define jamEntry()
#define jamEntryLine(line)
#else
#ifdef NDB_WIN32
#define jam() { \
...
...
@@ -72,11 +78,6 @@
#endif
#else
#define jam()
#define jamLine(line)
#define jamEntry()
#define jamEntryLine(line)
#endif
#ifndef NDB_OPT
#define ptrCheck(ptr, limit, rec) if (ptr.i < (limit)) ptr.p = &rec[ptr.i]; else ptr.p = NULL
...
...
@@ -184,7 +185,7 @@
*
* NOTE these may only be used within blocks
*/
#if defined VM_TRACE
|| defined NDB_DEBUG
#if defined VM_TRACE
#define ndbassert(check) \
if((check)){ \
} else { \
...
...
ndb/src/ndbapi/Makefile.am
View file @
7159900e
...
...
@@ -41,6 +41,9 @@ libndbapi_la_SOURCES = \
INCLUDES_LOC
=
-I
$(top_srcdir)
/ndb/src/mgmapi
# Ndbapi cannot handle -O3
NDB_CXXFLAGS_RELEASE_LOC
=
-O2
include
$(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/type_ndbapi.mk.am
...
...
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