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
df278bd6
Commit
df278bd6
authored
Mar 23, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#27254: Single User Mode.Mysql hangs if it tries delete a ndb table
parent
aadd161d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+17
-8
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+1
-1
No files found.
sql/ha_ndbcluster.cc
View file @
df278bd6
...
...
@@ -4742,6 +4742,7 @@ int ha_ndbcluster::create(const char *name,
bool
create_from_engine
=
(
create_info
->
table_options
&
HA_OPTION_CREATE_FROM_ENGINE
);
bool
is_truncate
=
(
thd
->
lex
->
sql_command
==
SQLCOM_TRUNCATE
);
char
tablespace
[
FN_LEN
];
NdbDictionary
::
Table
::
SingleUserMode
single_user_mode
=
NdbDictionary
::
Table
::
SingleUserModeLocked
;
DBUG_ENTER
(
"ha_ndbcluster::create"
);
DBUG_PRINT
(
"enter"
,
(
"name: %s"
,
name
));
...
...
@@ -4793,19 +4794,23 @@ int ha_ndbcluster::create(const char *name,
schema distribution table is setup
( unless it is a creation of the schema dist table itself )
*/
if
(
!
ndb_schema_share
&&
!
(
strcmp
(
m_dbname
,
NDB_REP_DB
)
==
0
&&
strcmp
(
m_tabname
,
NDB_SCHEMA_TABLE
)
==
0
))
if
(
!
ndb_schema_share
)
{
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
if
(
!
(
strcmp
(
m_dbname
,
NDB_REP_DB
)
==
0
&&
strcmp
(
m_tabname
,
NDB_SCHEMA_TABLE
)
==
0
))
{
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
}
single_user_mode
=
NdbDictionary
::
Table
::
SingleUserModeReadWrite
;
}
#endif
/* HAVE_NDB_BINLOG */
DBUG_PRINT
(
"table"
,
(
"name: %s"
,
m_tabname
));
tab
.
setName
(
m_tabname
);
tab
.
setLogging
(
!
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
));
tab
.
setSingleUserMode
(
single_user_mode
);
// Save frm data for this table
if
(
readfrm
(
name
,
&
data
,
&
length
))
DBUG_RETURN
(
1
);
...
...
@@ -5569,6 +5574,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
{
ndb_table_id
=
h
->
m_table
->
getObjectId
();
ndb_table_version
=
h
->
m_table
->
getObjectVersion
();
DBUG_PRINT
(
"info"
,
(
"success 1"
));
}
else
{
...
...
@@ -5582,6 +5588,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
break
;
}
res
=
ndb_to_mysql_error
(
&
dict
->
getNdbError
());
DBUG_PRINT
(
"info"
,
(
"error(1) %u"
,
res
));
}
h
->
release_metadata
(
thd
,
ndb
);
}
...
...
@@ -5598,6 +5605,8 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
{
ndb_table_id
=
ndbtab_g
.
get_table
()
->
getObjectId
();
ndb_table_version
=
ndbtab_g
.
get_table
()
->
getObjectVersion
();
DBUG_PRINT
(
"info"
,
(
"success 2"
));
break
;
}
else
{
...
...
@@ -5617,8 +5626,8 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
}
}
}
else
res
=
ndb_to_mysql_error
(
&
dict
->
getNdbError
(
));
res
=
ndb_to_mysql_error
(
&
dict
->
getNdbError
());
DBUG_PRINT
(
"info"
,
(
"error(2) %u"
,
res
));
break
;
}
}
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
df278bd6
...
...
@@ -51,7 +51,7 @@
#define ERR_RETURN(a,b) \
{\
DBUG_PRINT("exit", ("error %d
", (a).code
));\
DBUG_PRINT("exit", ("error %d
return %d", (a).code, b
));\
DBUG_RETURN(b);\
}
...
...
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