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
7540feca
Commit
7540feca
authored
Sep 07, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed NdbConnection::restart and made use of it in ha_ndbcluster
added testcase
parent
b8f24215
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
23 deletions
+13
-23
mysql-test/r/ndb_alter_table.result
mysql-test/r/ndb_alter_table.result
+1
-0
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+1
-0
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+2
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+9
-23
No files found.
mysql-test/r/ndb_alter_table.result
View file @
7540feca
...
...
@@ -75,6 +75,7 @@ drop table t1;
DROP TABLE IF EXISTS t2;
create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam;
alter table t2 engine=ndbcluster;
alter table t2 add c int;
delete from t2;
ERROR HY000: Got temporary error 1217 '1217' from ndbcluster
select count(*) from t2 where a+0 > 0;
...
...
mysql-test/t/ndb_alter_table.test
View file @
7540feca
...
...
@@ -62,6 +62,7 @@ while ($1)
}
enable_query_log
;
alter
table
t2
engine
=
ndbcluster
;
alter
table
t2
add
c
int
;
--
error
1297
delete
from
t2
;
#to make sure we do a full table scan
...
...
ndb/src/ndbapi/NdbConnection.cpp
View file @
7540feca
...
...
@@ -201,7 +201,9 @@ NdbConnection::restart(){
}
else
{
theNdb
->
theFirstTransId
=
tTransid
+
1
;
}
theCommitStatus
=
Started
;
theCompletionStatus
=
NotCompleted
;
theTransactionIsStarted
=
false
;
DBUG_RETURN
(
0
);
}
DBUG_PRINT
(
"error"
,(
"theCompletionStatus != CompletedSuccess"
));
...
...
sql/ha_ndbcluster.cc
View file @
7540feca
...
...
@@ -1451,7 +1451,8 @@ int ha_ndbcluster::write_row(byte *record)
(
int
)
rows_inserted
,
(
int
)
bulk_insert_rows
));
bulk_insert_not_flushed
=
false
;
if
(
thd
->
transaction
.
on
)
{
if
(
thd
->
transaction
.
on
)
{
if
(
trans
->
execute
(
NoCommit
)
!=
0
)
{
skip_auto_increment
=
true
;
...
...
@@ -1465,22 +1466,7 @@ int ha_ndbcluster::write_row(byte *record)
skip_auto_increment
=
true
;
DBUG_RETURN
(
ndb_err
(
trans
));
}
#if 0 // this is what we want to use but it is not functional
trans
->
restart
();
#else
m_ndb
->
closeTransaction
(
m_active_trans
);
m_active_trans
=
m_ndb
->
startTransaction
();
if
(
thd
->
transaction
.
all
.
ndb_tid
)
thd
->
transaction
.
all
.
ndb_tid
=
m_active_trans
;
else
thd
->
transaction
.
stmt
.
ndb_tid
=
m_active_trans
;
if
(
m_active_trans
==
NULL
)
{
skip_auto_increment
=
true
;
ERR_RETURN
(
m_ndb
->
getNdbError
());
}
trans
=
m_active_trans
;
#endif
}
}
if
((
has_auto_increment
)
&&
(
skip_auto_increment
))
...
...
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