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
d8edb88c
Commit
d8edb88c
authored
Jun 06, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert tokudb changes that caused crashes
parent
e27c3386
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
15 deletions
+14
-15
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+2
-2
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+3
-4
storage/tokudb/tokudb_card.h
storage/tokudb/tokudb_card.h
+2
-2
storage/tokudb/tokudb_status.h
storage/tokudb/tokudb_status.h
+7
-7
No files found.
storage/tokudb/ha_tokudb.cc
View file @
d8edb88c
...
@@ -2110,8 +2110,8 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) {
...
@@ -2110,8 +2110,8 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) {
TOKUDB_HANDLER_DBUG_ENTER
(
"%s"
,
frm_name
);
TOKUDB_HANDLER_DBUG_ENTER
(
"%s"
,
frm_name
);
uchar
*
mysql_frm_data
=
NULL
;
uchar
*
mysql_frm_data
=
NULL
;
size_t
mysql_frm_len
=
0
;
size_t
mysql_frm_len
=
0
;
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
DBT
key
=
{}
;
DBT
stored_frm
;
LINT_INIT_STRUCT
(
stored_frm
)
;
DBT
stored_frm
=
{}
;
int
error
=
0
;
int
error
=
0
;
HA_METADATA_KEY
curr_key
=
hatoku_frm_data
;
HA_METADATA_KEY
curr_key
=
hatoku_frm_data
;
...
...
storage/tokudb/hatoku_hton.cc
View file @
d8edb88c
...
@@ -972,8 +972,8 @@ static int tokudb_discover3(handlerton *hton, THD* thd, const char *db, const ch
...
@@ -972,8 +972,8 @@ static int tokudb_discover3(handlerton *hton, THD* thd, const char *db, const ch
DB
*
status_db
=
NULL
;
DB
*
status_db
=
NULL
;
DB_TXN
*
txn
=
NULL
;
DB_TXN
*
txn
=
NULL
;
HA_METADATA_KEY
curr_key
=
hatoku_frm_data
;
HA_METADATA_KEY
curr_key
=
hatoku_frm_data
;
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
DBT
key
=
{}
;
DBT
value
;
LINT_INIT_STRUCT
(
value
)
;
DBT
value
=
{}
;
bool
do_commit
;
bool
do_commit
;
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099
...
@@ -1713,8 +1713,7 @@ static int tokudb_report_fractal_tree_block_map_iterator(uint64_t checkpoint_cou
...
@@ -1713,8 +1713,7 @@ static int tokudb_report_fractal_tree_block_map_iterator(uint64_t checkpoint_cou
static
int
tokudb_report_fractal_tree_block_map_for_db
(
const
DBT
*
dname
,
const
DBT
*
iname
,
TABLE
*
table
,
THD
*
thd
)
{
static
int
tokudb_report_fractal_tree_block_map_for_db
(
const
DBT
*
dname
,
const
DBT
*
iname
,
TABLE
*
table
,
THD
*
thd
)
{
int
error
;
int
error
;
DB
*
db
;
DB
*
db
;
struct
tokudb_report_fractal_tree_block_map_iterator_extra
e
;
// avoid struct initializers so that we can compile with older gcc versions
struct
tokudb_report_fractal_tree_block_map_iterator_extra
e
=
{};
// avoid struct initializers so that we can compile with older gcc versions
LINT_INIT_STRUCT
(
e
);
error
=
db_create
(
&
db
,
db_env
,
0
);
error
=
db_create
(
&
db
,
db_env
,
0
);
if
(
error
)
{
if
(
error
)
{
...
...
storage/tokudb/tokudb_card.h
View file @
d8edb88c
...
@@ -233,8 +233,8 @@ namespace tokudb {
...
@@ -233,8 +233,8 @@ namespace tokudb {
for
(
uint64_t
i
=
0
;
i
<
num_key_parts
;
i
++
)
for
(
uint64_t
i
=
0
;
i
<
num_key_parts
;
i
++
)
unique_rows
[
i
]
=
1
;
unique_rows
[
i
]
=
1
;
// stop looking when the entire dictionary was analyzed, or a cap on execution time was reached, or the analyze was killed.
// stop looking when the entire dictionary was analyzed, or a cap on execution time was reached, or the analyze was killed.
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
key
.
flags
=
DB_DBT_REALLOC
;
DBT
key
=
{}
;
key
.
flags
=
DB_DBT_REALLOC
;
DBT
prev_key
;
LINT_INIT_STRUCT
(
prev_key
)
;
prev_key
.
flags
=
DB_DBT_REALLOC
;
DBT
prev_key
=
{}
;
prev_key
.
flags
=
DB_DBT_REALLOC
;
while
(
1
)
{
while
(
1
)
{
error
=
cursor
->
c_get
(
cursor
,
&
key
,
0
,
DB_NEXT
);
error
=
cursor
->
c_get
(
cursor
,
&
key
,
0
,
DB_NEXT
);
if
(
error
!=
0
)
{
if
(
error
!=
0
)
{
...
...
storage/tokudb/tokudb_status.h
View file @
d8edb88c
...
@@ -112,8 +112,8 @@ namespace tokudb {
...
@@ -112,8 +112,8 @@ namespace tokudb {
// get the value for a given key in the status dictionary. copy the value to the supplied buffer.
// get the value for a given key in the status dictionary. copy the value to the supplied buffer.
// returns 0 if successful.
// returns 0 if successful.
int
get_status
(
DB
*
status_db
,
DB_TXN
*
txn
,
HA_METADATA_KEY
k
,
void
*
p
,
size_t
s
,
size_t
*
sp
)
{
int
get_status
(
DB
*
status_db
,
DB_TXN
*
txn
,
HA_METADATA_KEY
k
,
void
*
p
,
size_t
s
,
size_t
*
sp
)
{
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
key
.
data
=
&
k
;
key
.
size
=
sizeof
k
;
DBT
key
=
{}
;
key
.
data
=
&
k
;
key
.
size
=
sizeof
k
;
DBT
val
;
LINT_INIT_STRUCT
(
val
)
;
val
.
data
=
p
;
val
.
ulen
=
(
uint32_t
)
s
;
val
.
flags
=
DB_DBT_USERMEM
;
DBT
val
=
{}
;
val
.
data
=
p
;
val
.
ulen
=
(
uint32_t
)
s
;
val
.
flags
=
DB_DBT_USERMEM
;
int
error
=
status_db
->
get
(
status_db
,
txn
,
&
key
,
&
val
,
0
);
int
error
=
status_db
->
get
(
status_db
,
txn
,
&
key
,
&
val
,
0
);
if
(
error
==
0
)
{
if
(
error
==
0
)
{
*
sp
=
val
.
size
;
*
sp
=
val
.
size
;
...
@@ -124,8 +124,8 @@ namespace tokudb {
...
@@ -124,8 +124,8 @@ namespace tokudb {
// get the value for a given key in the status dictionary. put the value in a realloced buffer.
// get the value for a given key in the status dictionary. put the value in a realloced buffer.
// returns 0 if successful.
// returns 0 if successful.
int
get_status_realloc
(
DB
*
status_db
,
DB_TXN
*
txn
,
HA_METADATA_KEY
k
,
void
**
pp
,
size_t
*
sp
)
{
int
get_status_realloc
(
DB
*
status_db
,
DB_TXN
*
txn
,
HA_METADATA_KEY
k
,
void
**
pp
,
size_t
*
sp
)
{
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
key
.
data
=
&
k
;
key
.
size
=
sizeof
k
;
DBT
key
=
{}
;
key
.
data
=
&
k
;
key
.
size
=
sizeof
k
;
DBT
val
;
LINT_INIT_STRUCT
(
val
)
;
val
.
data
=
*
pp
;
val
.
size
=
(
uint32_t
)
*
sp
;
val
.
flags
=
DB_DBT_REALLOC
;
DBT
val
=
{}
;
val
.
data
=
*
pp
;
val
.
size
=
(
uint32_t
)
*
sp
;
val
.
flags
=
DB_DBT_REALLOC
;
int
error
=
status_db
->
get
(
status_db
,
txn
,
&
key
,
&
val
,
0
);
int
error
=
status_db
->
get
(
status_db
,
txn
,
&
key
,
&
val
,
0
);
if
(
error
==
0
)
{
if
(
error
==
0
)
{
*
pp
=
val
.
data
;
*
pp
=
val
.
data
;
...
@@ -138,8 +138,8 @@ namespace tokudb {
...
@@ -138,8 +138,8 @@ namespace tokudb {
// auto create a txn if necessary.
// auto create a txn if necessary.
// returns 0 if successful.
// returns 0 if successful.
int
write_metadata
(
DB
*
status_db
,
void
*
key_data
,
uint
key_size
,
void
*
val_data
,
uint
val_size
,
DB_TXN
*
txn
)
{
int
write_metadata
(
DB
*
status_db
,
void
*
key_data
,
uint
key_size
,
void
*
val_data
,
uint
val_size
,
DB_TXN
*
txn
)
{
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
key
.
data
=
key_data
;
key
.
size
=
key_size
;
DBT
key
=
{}
;
key
.
data
=
key_data
;
key
.
size
=
key_size
;
DBT
value
;
LINT_INIT_STRUCT
(
value
)
;
value
.
data
=
val_data
;
value
.
size
=
val_size
;
DBT
value
=
{}
;
value
.
data
=
val_data
;
value
.
size
=
val_size
;
int
error
=
status_db
->
put
(
status_db
,
txn
,
&
key
,
&
value
,
0
);
int
error
=
status_db
->
put
(
status_db
,
txn
,
&
key
,
&
value
,
0
);
return
error
;
return
error
;
}
}
...
@@ -155,7 +155,7 @@ namespace tokudb {
...
@@ -155,7 +155,7 @@ namespace tokudb {
// auto create a txn if necessary.
// auto create a txn if necessary.
// returns 0 if successful.
// returns 0 if successful.
int
remove_metadata
(
DB
*
status_db
,
void
*
key_data
,
uint
key_size
,
DB_TXN
*
txn
)
{
int
remove_metadata
(
DB
*
status_db
,
void
*
key_data
,
uint
key_size
,
DB_TXN
*
txn
)
{
DBT
key
;
LINT_INIT_STRUCT
(
key
)
;
key
.
data
=
key_data
;
key
.
size
=
key_size
;
DBT
key
=
{}
;
key
.
data
=
key_data
;
key
.
size
=
key_size
;
int
error
=
status_db
->
del
(
status_db
,
txn
,
&
key
,
DB_DELETE_ANY
);
int
error
=
status_db
->
del
(
status_db
,
txn
,
&
key
,
DB_DELETE_ANY
);
return
error
;
return
error
;
}
}
...
...
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