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
db1604a7
Commit
db1604a7
authored
Sep 14, 2004
by
tomas@poseidon.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix to make transaction failure also affect select count() on other tables in thread
parent
457dfbe7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+9
-2
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+1
-0
No files found.
sql/ha_ndbcluster.cc
View file @
db1604a7
...
...
@@ -147,6 +147,7 @@ Thd_ndb::Thd_ndb()
ndb
=
new
Ndb
(
g_ndb_cluster_connection
,
""
);
lock_count
=
0
;
count
=
0
;
error
=
0
;
}
Thd_ndb
::~
Thd_ndb
()
...
...
@@ -179,6 +180,11 @@ void ha_ndbcluster::records_update()
info
->
records
=
rows
;
}
}
{
THD
*
thd
=
current_thd
;
if
(((
Thd_ndb
*
)(
thd
->
transaction
.
thd_ndb
))
->
error
)
info
->
no_uncommitted_rows_count
=
0
;
}
records
=
info
->
records
+
info
->
no_uncommitted_rows_count
;
DBUG_VOID_RETURN
;
}
...
...
@@ -186,8 +192,8 @@ void ha_ndbcluster::records_update()
void
ha_ndbcluster
::
no_uncommitted_rows_execute_failure
()
{
DBUG_ENTER
(
"ha_ndbcluster::no_uncommitted_rows_execute_failure"
);
struct
Ndb_table_local_info
*
info
=
(
struct
Ndb_table_local_info
*
)
m_table_info
;
info
->
no_uncommitted_rows_count
=
0
;
THD
*
thd
=
current_thd
;
((
Thd_ndb
*
)(
thd
->
transaction
.
thd_ndb
))
->
error
=
1
;
DBUG_VOID_RETURN
;
}
...
...
@@ -223,6 +229,7 @@ void ha_ndbcluster::no_uncommitted_rows_reset(THD *thd)
{
DBUG_ENTER
(
"ha_ndbcluster::no_uncommitted_rows_reset"
);
((
Thd_ndb
*
)(
thd
->
transaction
.
thd_ndb
))
->
count
++
;
((
Thd_ndb
*
)(
thd
->
transaction
.
thd_ndb
))
->
error
=
0
;
DBUG_VOID_RETURN
;
}
...
...
sql/ha_ndbcluster.h
View file @
db1604a7
...
...
@@ -74,6 +74,7 @@ class Thd_ndb {
Ndb
*
ndb
;
ulong
count
;
uint
lock_count
;
int
error
;
};
class
ha_ndbcluster
:
public
handler
...
...
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