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
d863b895
Commit
d863b895
authored
Feb 21, 2005
by
tulin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected errors in how ndbcluster handler closes down in case of error
parent
5d1fff6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+19
-4
No files found.
sql/ha_ndbcluster.cc
View file @
d863b895
...
...
@@ -4616,7 +4616,11 @@ ndbcluster_init()
(
opt_ndb_optimized_node_selection
);
// Create a Ndb object to open the connection to NDB
g_ndb
=
new
Ndb
(
g_ndb_cluster_connection
,
"sys"
);
if
(
(
g_ndb
=
new
Ndb
(
g_ndb_cluster_connection
,
"sys"
))
==
0
)
{
DBUG_PRINT
(
"error"
,
(
"failed to create global ndb object"
));
goto
ndbcluster_init_error
;
}
g_ndb
->
getDictionary
()
->
set_local_table_data_size
(
sizeof
(
Ndb_table_local_info
));
if
(
g_ndb
->
init
()
!=
0
)
{
...
...
@@ -4669,6 +4673,10 @@ ndbcluster_init()
if
(
pthread_create
(
&
tmp
,
&
connection_attrib
,
ndb_util_thread_func
,
0
))
{
DBUG_PRINT
(
"error"
,
(
"Could not create ndb utility thread"
));
hash_free
(
&
ndbcluster_open_tables
);
pthread_mutex_destroy
(
&
ndbcluster_mutex
);
pthread_mutex_destroy
(
&
LOCK_ndb_util_thread
);
pthread_cond_destroy
(
&
COND_ndb_util_thread
);
goto
ndbcluster_init_error
;
}
...
...
@@ -4676,7 +4684,12 @@ ndbcluster_init()
DBUG_RETURN
(
&
ndbcluster_hton
);
ndbcluster_init_error:
ndbcluster_end
();
if
(
g_ndb
)
delete
g_ndb
;
g_ndb
=
NULL
;
if
(
g_ndb_cluster_connection
)
delete
g_ndb_cluster_connection
;
g_ndb_cluster_connection
=
NULL
;
DBUG_RETURN
(
NULL
);
}
...
...
@@ -4691,6 +4704,9 @@ bool ndbcluster_end()
{
DBUG_ENTER
(
"ndbcluster_end"
);
if
(
!
ndbcluster_inited
)
DBUG_RETURN
(
0
);
// Kill ndb utility thread
(
void
)
pthread_mutex_lock
(
&
LOCK_ndb_util_thread
);
DBUG_PRINT
(
"exit"
,(
"killing ndb util thread: %lx"
,
ndb_util_thread
));
...
...
@@ -4703,8 +4719,7 @@ bool ndbcluster_end()
if
(
g_ndb_cluster_connection
)
delete
g_ndb_cluster_connection
;
g_ndb_cluster_connection
=
NULL
;
if
(
!
ndbcluster_inited
)
DBUG_RETURN
(
0
);
hash_free
(
&
ndbcluster_open_tables
);
pthread_mutex_destroy
(
&
ndbcluster_mutex
);
pthread_mutex_destroy
(
&
LOCK_ndb_util_thread
);
...
...
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