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
02c6f5bb
Commit
02c6f5bb
authored
May 13, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#221 fix tokudb::estimate_num_rows
parent
cae1d71b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+2
-12
No files found.
storage/tokudb/ha_tokudb.cc
View file @
02c6f5bb
...
...
@@ -1706,7 +1706,7 @@ int ha_tokudb::initialize_share(
}
share
->
ref_length
=
ref_length
;
error
=
estimate_num_rows
(
share
->
file
,
&
num_rows
,
txn
);
error
=
estimate_num_rows
(
share
->
file
,
&
num_rows
,
txn
);
//
// estimate_num_rows should not fail under normal conditions
//
...
...
@@ -1916,7 +1916,6 @@ exit:
//
int
ha_tokudb
::
estimate_num_rows
(
DB
*
db
,
uint64_t
*
num_rows
,
DB_TXN
*
txn
)
{
int
error
=
ENOSYS
;
DBC
*
crsr
=
NULL
;
bool
do_commit
=
false
;
DB_BTREE_STAT64
dict_stats
;
DB_TXN
*
txn_to_use
=
NULL
;
...
...
@@ -1930,21 +1929,12 @@ int ha_tokudb::estimate_num_rows(DB* db, uint64_t* num_rows, DB_TXN* txn) {
txn_to_use
=
txn
;
}
error
=
db
->
stat64
(
share
->
file
,
txn_to_use
,
&
dict_stats
);
error
=
db
->
stat64
(
db
,
txn_to_use
,
&
dict_stats
);
if
(
error
)
{
goto
cleanup
;
}
*
num_rows
=
dict_stats
.
bt_ndata
;
error
=
0
;
cleanup:
if
(
crsr
!=
NULL
)
{
int
r
=
crsr
->
c_close
(
crsr
);
assert
(
r
==
0
);
crsr
=
NULL
;
}
if
(
do_commit
)
{
commit_txn
(
txn_to_use
,
0
);
txn_to_use
=
NULL
;
...
...
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