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
f003b324
Commit
f003b324
authored
Sep 13, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dict error code on list tables
Check g_ndb before deleting it Wait until ready(10) if get mgm connection
parent
4d44bea8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+22
-7
No files found.
sql/ha_ndbcluster.cc
View file @
f003b324
...
...
@@ -3492,7 +3492,7 @@ int ndb_discover_tables()
dict
=
g_ndb
->
getDictionary
();
if
(
dict
->
listObjects
(
list
,
NdbDictionary
::
Object
::
UserTable
)
!=
0
)
ERR_RETURN
(
g_ndb
->
getNdbError
());
ERR_RETURN
(
dict
->
getNdbError
());
for
(
i
=
0
;
i
<
list
.
count
;
i
++
)
{
...
...
@@ -3514,6 +3514,7 @@ int ndb_discover_tables()
bool
ndbcluster_init
()
{
int
res
;
DBUG_ENTER
(
"ndbcluster_init"
);
// Set connectstring if specified
if
(
ndbcluster_connectstring
!=
0
)
...
...
@@ -3524,11 +3525,7 @@ bool ndbcluster_init()
DBUG_PRINT
(
"error"
,(
"Ndb_cluster_connection(%s)"
,
ndbcluster_connectstring
));
DBUG_RETURN
(
TRUE
);
}
if
(
g_ndb_cluster_connection
->
start_connect_thread
())
{
DBUG_PRINT
(
"error"
,
(
"g_ndb_cluster_connection->start_connect_thread()"
));
DBUG_RETURN
(
TRUE
);
}
// Create a Ndb object to open the connection to NDB
g_ndb
=
new
Ndb
(
g_ndb_cluster_connection
,
"sys"
);
if
(
g_ndb
->
init
()
!=
0
)
...
...
@@ -3536,6 +3533,23 @@ bool ndbcluster_init()
ERR_PRINT
(
g_ndb
->
getNdbError
());
DBUG_RETURN
(
TRUE
);
}
if
((
res
=
g_ndb_cluster_connection
->
connect
(
1
))
==
0
)
{
g_ndb
->
waitUntilReady
(
10
);
}
else
if
(
res
==
1
&&
g_ndb_cluster_connection
->
start_connect_thread
())
{
DBUG_PRINT
(
"error"
,
(
"g_ndb_cluster_connection->start_connect_thread()"
));
DBUG_RETURN
(
TRUE
);
}
else
{
DBUG_ASSERT
(
res
==
-
1
);
DBUG_PRINT
(
"error"
,
(
"permanent error"
));
DBUG_RETURN
(
TRUE
);
}
(
void
)
hash_init
(
&
ndbcluster_open_tables
,
system_charset_info
,
32
,
0
,
0
,
(
hash_get_key
)
ndbcluster_get_key
,
0
,
0
);
pthread_mutex_init
(
&
ndbcluster_mutex
,
MY_MUTEX_INIT_FAST
);
...
...
@@ -3558,6 +3572,7 @@ bool ndbcluster_end()
{
DBUG_ENTER
(
"ndbcluster_end"
);
if
(
g_ndb
)
delete
g_ndb
;
g_ndb
=
NULL
;
if
(
g_ndb_cluster_connection
)
...
...
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