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
3c889df5
Commit
3c889df5
authored
Oct 25, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed usage od NDB_MUTEX_INITIALIZER
parent
95a11206
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
ndb/test/ndbapi/testDeadlock.cpp
ndb/test/ndbapi/testDeadlock.cpp
+5
-3
ndb/test/ndbapi/testOIBasic.cpp
ndb/test/ndbapi/testOIBasic.cpp
+5
-3
No files found.
ndb/test/ndbapi/testDeadlock.cpp
View file @
3c889df5
...
...
@@ -48,14 +48,14 @@ printusage()
static
Opt
g_opt
;
static
NdbMutex
ndbout_mutex
=
NDB_MUTEX_INITIALIZER
;
static
NdbMutex
*
ndbout_mutex
=
NULL
;
#define DBG(x) \
do { \
if (! g_opt.m_dbg) break; \
NdbMutex_Lock(
&
ndbout_mutex); \
NdbMutex_Lock(ndbout_mutex); \
ndbout << "line " << __LINE__ << " " << x << endl; \
NdbMutex_Unlock(
&
ndbout_mutex); \
NdbMutex_Unlock(ndbout_mutex); \
} while (0)
#define CHK(x) \
...
...
@@ -492,6 +492,8 @@ wl1822_main(char scantx)
NDB_COMMAND
(
testOdbcDriver
,
"testDeadlock"
,
"testDeadlock"
,
"testDeadlock"
,
65535
)
{
ndb_init
();
if
(
ndbout_mutex
==
NULL
)
ndbout_mutex
=
NdbMutex_Create
();
while
(
++
argv
,
--
argc
>
0
)
{
const
char
*
arg
=
argv
[
0
];
if
(
strcmp
(
arg
,
"-scan"
)
==
0
)
{
...
...
ndb/test/ndbapi/testOIBasic.cpp
View file @
3c889df5
...
...
@@ -137,7 +137,7 @@ static const bool g_compare_null = true;
// log and error macros
static
NdbMutex
ndbout_mutex
=
NDB_MUTEX_INITIALIZER
;
static
NdbMutex
*
ndbout_mutex
=
NULL
;
static
unsigned
getthrno
();
...
...
@@ -160,9 +160,9 @@ getthrstr()
#define LLN(n, s) \
do { \
if ((n) > g_opt.m_v) break; \
if (g_opt.m_msglock) NdbMutex_Lock(
&
ndbout_mutex); \
if (g_opt.m_msglock) NdbMutex_Lock(ndbout_mutex); \
ndbout << getthrstr() << s << endl; \
if (g_opt.m_msglock) NdbMutex_Unlock(
&
ndbout_mutex); \
if (g_opt.m_msglock) NdbMutex_Unlock(ndbout_mutex); \
} while(0)
#define LL0(s) LLN(0, s)
...
...
@@ -3349,6 +3349,8 @@ runtest(Par par)
NDB_COMMAND
(
testOIBasic
,
"testOIBasic"
,
"testOIBasic"
,
"testOIBasic"
,
65535
)
{
ndb_init
();
if
(
ndbout_mutex
==
NULL
)
ndbout_mutex
=
NdbMutex_Create
();
while
(
++
argv
,
--
argc
>
0
)
{
const
char
*
arg
=
argv
[
0
];
if
(
*
arg
!=
'-'
)
{
...
...
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