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
957881df
Commit
957881df
authored
Apr 12, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#194 fix gcc 4.8 warnings
parent
55455214
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
34 deletions
+18
-34
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+12
-17
storage/tokudb/hatoku_cmp.h
storage/tokudb/hatoku_cmp.h
+4
-14
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+2
-3
No files found.
storage/tokudb/ha_tokudb.cc
View file @
957881df
...
@@ -2082,8 +2082,7 @@ int ha_tokudb::remove_frm_data(DB *db, DB_TXN *txn) {
...
@@ -2082,8 +2082,7 @@ int ha_tokudb::remove_frm_data(DB *db, DB_TXN *txn) {
return
remove_from_status
(
db
,
hatoku_frm_data
,
txn
);
return
remove_from_status
(
db
,
hatoku_frm_data
,
txn
);
}
}
static
int
static
int
smart_dbt_callback_verify_frm
(
DBT
const
*
key
,
DBT
const
*
row
,
void
*
context
)
{
smart_dbt_callback_verify_frm
(
DBT
const
*
key
,
DBT
const
*
row
,
void
*
context
)
{
DBT
*
stored_frm
=
(
DBT
*
)
context
;
DBT
*
stored_frm
=
(
DBT
*
)
context
;
stored_frm
->
size
=
row
->
size
;
stored_frm
->
size
=
row
->
size
;
stored_frm
->
data
=
(
uchar
*
)
tokudb_my_malloc
(
row
->
size
,
MYF
(
MY_WME
));
stored_frm
->
data
=
(
uchar
*
)
tokudb_my_malloc
(
row
->
size
,
MYF
(
MY_WME
));
...
@@ -2096,19 +2095,22 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) {
...
@@ -2096,19 +2095,22 @@ 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
,
stored_frm
;
DBT
key
=
{};
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
;
memset
(
&
key
,
0
,
sizeof
(
key
));
memset
(
&
stored_frm
,
0
,
sizeof
(
&
stored_frm
));
// get the frm data from MySQL
// get the frm data from MySQL
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099
error
=
table_share
->
read_frm_image
((
const
uchar
**
)
&
mysql_frm_data
,
&
mysql_frm_len
);
error
=
table_share
->
read_frm_image
((
const
uchar
**
)
&
mysql_frm_data
,
&
mysql_frm_len
);
if
(
error
)
{
goto
cleanup
;
}
if
(
error
)
{
goto
cleanup
;
}
#else
#else
error
=
readfrm
(
frm_name
,
&
mysql_frm_data
,
&
mysql_frm_len
);
error
=
readfrm
(
frm_name
,
&
mysql_frm_data
,
&
mysql_frm_len
);
if
(
error
)
{
goto
cleanup
;
}
if
(
error
)
{
goto
cleanup
;
}
#endif
#endif
key
.
data
=
&
curr_key
;
key
.
data
=
&
curr_key
;
...
@@ -2123,20 +2125,13 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) {
...
@@ -2123,20 +2125,13 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) {
);
);
if
(
error
==
DB_NOTFOUND
)
{
if
(
error
==
DB_NOTFOUND
)
{
// if not found, write it
// if not found, write it
error
=
write_frm_data
(
error
=
write_frm_data
(
share
->
status_block
,
txn
,
frm_name
);
share
->
status_block
,
txn
,
frm_name
);
goto
cleanup
;
goto
cleanup
;
}
}
else
if
(
error
)
{
else
if
(
error
)
{
goto
cleanup
;
goto
cleanup
;
}
}
if
(
stored_frm
.
size
!=
mysql_frm_len
||
if
(
stored_frm
.
size
!=
mysql_frm_len
||
memcmp
(
stored_frm
.
data
,
mysql_frm_data
,
stored_frm
.
size
))
{
memcmp
(
stored_frm
.
data
,
mysql_frm_data
,
stored_frm
.
size
))
{
error
=
HA_ERR_TABLE_DEF_CHANGED
;
error
=
HA_ERR_TABLE_DEF_CHANGED
;
goto
cleanup
;
goto
cleanup
;
}
}
...
...
storage/tokudb/hatoku_cmp.h
View file @
957881df
...
@@ -229,11 +229,7 @@ static void get_blob_field_info(
...
@@ -229,11 +229,7 @@ static void get_blob_field_info(
uint32_t
num_offset_bytes
uint32_t
num_offset_bytes
);
);
static
inline
uint32_t
get_blob_field_len
(
static
inline
uint32_t
get_blob_field_len
(
const
uchar
*
from_tokudb
,
uint32_t
len_bytes
)
{
const
uchar
*
from_tokudb
,
uint32_t
len_bytes
)
{
uint32_t
length
=
0
;
uint32_t
length
=
0
;
switch
(
len_bytes
)
{
switch
(
len_bytes
)
{
case
(
1
):
case
(
1
):
...
@@ -255,13 +251,7 @@ static inline uint32_t get_blob_field_len(
...
@@ -255,13 +251,7 @@ static inline uint32_t get_blob_field_len(
}
}
static
inline
const
uchar
*
unpack_toku_field_blob
(
static
inline
const
uchar
*
unpack_toku_field_blob
(
uchar
*
to_mysql
,
const
uchar
*
from_tokudb
,
uint32_t
len_bytes
,
bool
skip
)
{
uchar
*
to_mysql
,
const
uchar
*
from_tokudb
,
uint32_t
len_bytes
,
bool
skip
)
{
uint32_t
length
=
0
;
uint32_t
length
=
0
;
const
uchar
*
data_ptr
=
NULL
;
const
uchar
*
data_ptr
=
NULL
;
if
(
!
skip
)
{
if
(
!
skip
)
{
...
@@ -271,9 +261,9 @@ static inline const uchar* unpack_toku_field_blob(
...
@@ -271,9 +261,9 @@ static inline const uchar* unpack_toku_field_blob(
data_ptr
=
from_tokudb
+
len_bytes
;
data_ptr
=
from_tokudb
+
len_bytes
;
if
(
!
skip
)
{
if
(
!
skip
)
{
memcpy
(
to_mysql
+
len_bytes
,
(
uchar
*
)(
&
data_ptr
),
sizeof
(
uchar
*
)
);
memcpy
(
to_mysql
+
len_bytes
,
(
uchar
*
)(
&
data_ptr
),
sizeof
data_ptr
);
}
}
return
(
from_tokudb
+
len_bytes
+
length
)
;
return
from_tokudb
+
len_bytes
+
length
;
}
}
static
inline
uint
get_null_offset
(
TABLE
*
table
,
Field
*
field
)
{
static
inline
uint
get_null_offset
(
TABLE
*
table
,
Field
*
field
)
{
...
...
storage/tokudb/hatoku_hton.cc
View file @
957881df
...
@@ -974,9 +974,8 @@ static int tokudb_discover3(handlerton *hton, THD* thd, const char *db, const ch
...
@@ -974,9 +974,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
,
value
;
DBT
key
=
{};
memset
(
&
key
,
0
,
sizeof
(
key
));
DBT
value
=
{};
memset
(
&
value
,
0
,
sizeof
(
&
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
...
...
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