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
edba345e
Commit
edba345e
authored
Apr 26, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #19202 Incorrect errorhandling in select count(*) wrt temporary error
- added retry handling of temporary transaction errors
parent
103df5b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+27
-5
No files found.
sql/ha_ndbcluster.cc
View file @
edba345e
...
...
@@ -5650,11 +5650,23 @@ ndb_get_table_statistics(Ndb* ndb, const char * table,
{
DBUG_ENTER
(
"ndb_get_table_statistics"
);
DBUG_PRINT
(
"enter"
,
(
"table: %s"
,
table
));
NdbTransaction
*
pTrans
=
ndb
->
startTransaction
();
NdbTransaction
*
pTrans
;
int
retries
=
10
;
int
retry_sleep
=
30
*
1000
;
/* 30 milliseconds */
do
{
pTrans
=
ndb
->
startTransaction
();
if
(
pTrans
==
NULL
)
{
if
(
ndb
->
getNdbError
().
status
==
NdbError
::
TemporaryError
&&
retries
--
)
{
my_sleep
(
retry_sleep
);
continue
;
}
break
;
}
NdbScanOperation
*
pOp
=
pTrans
->
getNdbScanOperation
(
table
);
if
(
pOp
==
NULL
)
...
...
@@ -5678,7 +5690,17 @@ ndb_get_table_statistics(Ndb* ndb, const char * table,
NdbTransaction
::
AbortOnError
,
TRUE
);
if
(
check
==
-
1
)
{
if
(
pTrans
->
getNdbError
().
status
==
NdbError
::
TemporaryError
&&
retries
--
)
{
ndb
->
closeTransaction
(
pTrans
);
pTrans
=
0
;
my_sleep
(
retry_sleep
);
continue
;
}
break
;
}
Uint32
count
=
0
;
Uint64
sum_rows
=
0
;
...
...
@@ -5713,7 +5735,7 @@ ndb_get_table_statistics(Ndb* ndb, const char * table,
sum_mem
,
count
));
DBUG_RETURN
(
0
);
}
while
(
0
);
}
while
(
1
);
if
(
pTrans
)
ndb
->
closeTransaction
(
pTrans
);
...
...
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