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
ee74d3a5
Commit
ee74d3a5
authored
Oct 14, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
parents
9e3df6cc
e268eaca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+13
-15
No files found.
sql/ha_ndbcluster.cc
View file @
ee74d3a5
...
@@ -3224,7 +3224,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -3224,7 +3224,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
if
(
!
thd_ndb
->
lock_count
++
)
if
(
!
thd_ndb
->
lock_count
++
)
{
{
PRINT_OPTION_FLAGS
(
thd
);
PRINT_OPTION_FLAGS
(
thd
);
if
(
!
(
thd
->
options
&
(
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
|
OPTION_TABLE_LOCK
)))
if
(
!
(
thd
->
options
&
(
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
)))
{
{
// Autocommit transaction
// Autocommit transaction
DBUG_ASSERT
(
!
thd_ndb
->
stmt
);
DBUG_ASSERT
(
!
thd_ndb
->
stmt
);
...
@@ -3398,11 +3398,11 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -3398,11 +3398,11 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
}
}
/*
/*
When using LOCK TABLE's external_lock is only called when the actual
Start a transaction for running a statement if one is not
TABLE LOCK is done.
already running in a transaction. This will be the case in
Under LOCK TABLES, each used tables will force a call to start_stmt.
a BEGIN; COMMIT; block
Ndb doesn't currently support table locks, and will do ordinary
When using LOCK TABLE's external_lock will start a transaction
s
tartTransaction for each transaction/statement.
s
ince ndb does not currently does not support table locking
*/
*/
int
ha_ndbcluster
::
start_stmt
(
THD
*
thd
,
thr_lock_type
lock_type
)
int
ha_ndbcluster
::
start_stmt
(
THD
*
thd
,
thr_lock_type
lock_type
)
...
@@ -3412,17 +3412,10 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
...
@@ -3412,17 +3412,10 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
PRINT_OPTION_FLAGS
(
thd
);
PRINT_OPTION_FLAGS
(
thd
);
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
NdbTransaction
*
trans
=
thd_ndb
->
stmt
;
NdbTransaction
*
trans
=
(
thd_ndb
->
stmt
)
?
thd_ndb
->
stmt
:
thd_ndb
->
all
;
if
(
!
trans
){
if
(
!
trans
){
Ndb
*
ndb
=
thd_ndb
->
ndb
;
Ndb
*
ndb
=
thd_ndb
->
ndb
;
DBUG_PRINT
(
"trans"
,(
"Starting transaction stmt"
));
DBUG_PRINT
(
"trans"
,(
"Starting transaction stmt"
));
#if 0
NdbTransaction *tablock_trans= thd_ndb->all;
DBUG_PRINT("info", ("tablock_trans: %x", (UintPtr)tablock_trans));
DBUG_ASSERT(tablock_trans);
// trans= ndb->hupp(tablock_trans);
#endif
trans
=
ndb
->
startTransaction
();
trans
=
ndb
->
startTransaction
();
if
(
trans
==
NULL
)
if
(
trans
==
NULL
)
ERR_RETURN
(
ndb
->
getNdbError
());
ERR_RETURN
(
ndb
->
getNdbError
());
...
@@ -4187,7 +4180,12 @@ ulonglong ha_ndbcluster::get_auto_increment()
...
@@ -4187,7 +4180,12 @@ ulonglong ha_ndbcluster::get_auto_increment()
--
retries
&&
--
retries
&&
ndb
->
getNdbError
().
status
==
NdbError
::
TemporaryError
);
ndb
->
getNdbError
().
status
==
NdbError
::
TemporaryError
);
if
(
auto_value
==
NDB_FAILED_AUTO_INCREMENT
)
if
(
auto_value
==
NDB_FAILED_AUTO_INCREMENT
)
ERR_RETURN
(
ndb
->
getNdbError
());
{
const
NdbError
err
=
ndb
->
getNdbError
();
sql_print_error
(
"Error %lu in ::get_auto_increment(): %s"
,
(
ulong
)
err
.
code
,
err
.
message
);
DBUG_RETURN
(
~
(
ulonglong
)
0
);
}
DBUG_RETURN
((
longlong
)
auto_value
);
DBUG_RETURN
((
longlong
)
auto_value
);
}
}
...
...
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