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
7832f1bb
Commit
7832f1bb
authored
Jun 10, 2014
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6314 - Compile/run MariaDB with ASan
Fixed some compilation errors/warnings with ASan.
parent
55b01023
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
27 deletions
+34
-27
libmysql/CMakeLists.txt
libmysql/CMakeLists.txt
+4
-0
mysys/ma_dyncol.c
mysys/ma_dyncol.c
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+26
-23
sql/rpl_gtid.cc
sql/rpl_gtid.cc
+1
-2
sql/sql_statistics.cc
sql/sql_statistics.cc
+1
-0
sql/table_cache.cc
sql/table_cache.cc
+1
-1
No files found.
libmysql/CMakeLists.txt
View file @
7832f1bb
...
@@ -447,6 +447,10 @@ IF(NOT DISABLE_SHARED)
...
@@ -447,6 +447,10 @@ IF(NOT DISABLE_SHARED)
SOVERSION
"
${
SHARED_LIB_MAJOR_VERSION
}
"
)
SOVERSION
"
${
SHARED_LIB_MAJOR_VERSION
}
"
)
IF
(
LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS
)
IF
(
LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS
)
GET_TARGET_PROPERTY
(
libmysql_link_flags libmysql LINK_FLAGS
)
GET_TARGET_PROPERTY
(
libmysql_link_flags libmysql LINK_FLAGS
)
IF
(
NOT libmysql_link_flags
)
# Avoid libmysql_link_flags-NOTFOUND
SET
(
libmysql_link_flags
)
ENDIF
()
SET_TARGET_PROPERTIES
(
libmysql PROPERTIES LINK_FLAGS
SET_TARGET_PROPERTIES
(
libmysql PROPERTIES LINK_FLAGS
"
${
libmysql_link_flags
}
${
LINK_FLAG_NO_UNDEFINED
}
${
VERSION_SCRIPT_LINK_FLAGS
}
"
)
"
${
libmysql_link_flags
}
${
LINK_FLAG_NO_UNDEFINED
}
${
VERSION_SCRIPT_LINK_FLAGS
}
"
)
ENDIF
()
ENDIF
()
...
...
mysys/ma_dyncol.c
View file @
7832f1bb
...
@@ -1610,7 +1610,7 @@ dynamic_new_column_store(DYNAMIC_COLUMN *str,
...
@@ -1610,7 +1610,7 @@ dynamic_new_column_store(DYNAMIC_COLUMN *str,
my_bool
new_str
)
my_bool
new_str
)
{
{
struct
st_service_funcs
*
fmt
=
fmt_data
+
hdr
->
format
;
struct
st_service_funcs
*
fmt
=
fmt_data
+
hdr
->
format
;
void
**
columns_order
;
void
**
UNINIT_VAR
(
columns_order
)
;
uchar
*
element
;
uchar
*
element
;
uint
i
;
uint
i
;
enum
enum_dyncol_func_result
rc
=
ER_DYNCOL_RESOURCE
;
enum
enum_dyncol_func_result
rc
=
ER_DYNCOL_RESOURCE
;
...
...
sql/item_strfunc.cc
View file @
7832f1bb
...
@@ -514,39 +514,42 @@ void Item_func_from_base64::fix_length_and_dec()
...
@@ -514,39 +514,42 @@ void Item_func_from_base64::fix_length_and_dec()
String
*
Item_func_from_base64
::
val_str
(
String
*
str
)
String
*
Item_func_from_base64
::
val_str
(
String
*
str
)
{
{
String
*
res
=
args
[
0
]
->
val_str_ascii
(
str
);
String
*
res
=
args
[
0
]
->
val_str_ascii
(
str
);
bool
too_long
=
false
;
int
length
;
int
length
;
const
char
*
end_ptr
;
const
char
*
end_ptr
;
if
(
!
res
||
if
(
!
res
)
res
->
length
()
>
(
uint
)
base64_decode_max_arg_length
()
||
goto
err
;
(
too_long
=
if
(
res
->
length
()
>
(
uint
)
base64_decode_max_arg_length
()
||
((
uint
)
(
length
=
base64_needed_decoded_length
((
int
)
res
->
length
()))
>
((
uint
)
(
length
=
base64_needed_decoded_length
((
int
)
res
->
length
()))
>
current_thd
->
variables
.
max_allowed_packet
))
||
current_thd
->
variables
.
max_allowed_packet
))
tmp_value
.
alloc
((
uint
)
length
)
||
(
length
=
base64_decode
(
res
->
ptr
(),
(
int
)
res
->
length
(),
(
char
*
)
tmp_value
.
ptr
(),
&
end_ptr
,
0
))
<
0
||
end_ptr
<
res
->
ptr
()
+
res
->
length
())
{
null_value
=
1
;
// NULL input, too long input, OOM, or badly formed input
if
(
too_long
)
{
{
push_warning_printf
(
current_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
push_warning_printf
(
current_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
ER_WARN_ALLOWED_PACKET_OVERFLOWED
,
ER_WARN_ALLOWED_PACKET_OVERFLOWED
,
ER
(
ER_WARN_ALLOWED_PACKET_OVERFLOWED
),
func_name
(),
ER
(
ER_WARN_ALLOWED_PACKET_OVERFLOWED
),
func_name
(),
current_thd
->
variables
.
max_allowed_packet
);
current_thd
->
variables
.
max_allowed_packet
);
goto
err
;
}
}
else
if
(
res
&&
length
<
0
)
if
(
tmp_value
.
alloc
((
uint
)
length
))
goto
err
;
if
((
length
=
base64_decode
(
res
->
ptr
(),
(
int
)
res
->
length
(),
(
char
*
)
tmp_value
.
ptr
(),
&
end_ptr
,
0
))
<
0
||
end_ptr
<
res
->
ptr
()
+
res
->
length
())
{
{
push_warning_printf
(
current_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
push_warning_printf
(
current_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
ER_BAD_BASE64_DATA
,
ER
(
ER_BAD_BASE64_DATA
),
ER_BAD_BASE64_DATA
,
ER
(
ER_BAD_BASE64_DATA
),
end_ptr
-
res
->
ptr
());
end_ptr
-
res
->
ptr
());
goto
err
;
}
}
return
0
;
}
tmp_value
.
length
((
uint
)
length
);
tmp_value
.
length
((
uint
)
length
);
null_value
=
0
;
null_value
=
0
;
return
&
tmp_value
;
return
&
tmp_value
;
err:
null_value
=
1
;
// NULL input, too long input, OOM, or badly formed input
return
0
;
}
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
...
...
sql/rpl_gtid.cc
View file @
7832f1bb
...
@@ -120,7 +120,7 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
...
@@ -120,7 +120,7 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
uint32
seq_no
=
gtid
->
seq_no
;
uint32
seq_no
=
gtid
->
seq_no
;
rpl_slave_state
::
element
*
elem
;
rpl_slave_state
::
element
*
elem
;
int
res
;
int
res
;
bool
did_enter_cond
;
bool
did_enter_cond
=
false
;
PSI_stage_info
old_stage
;
PSI_stage_info
old_stage
;
THD
*
thd
;
THD
*
thd
;
Relay_log_info
*
rli
=
rgi
->
rli
;
Relay_log_info
*
rli
=
rgi
->
rli
;
...
@@ -138,7 +138,6 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
...
@@ -138,7 +138,6 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
each lock release and re-take.
each lock release and re-take.
*/
*/
did_enter_cond
=
false
;
for
(;;)
for
(;;)
{
{
if
(
elem
->
highest_seq_no
>=
seq_no
)
if
(
elem
->
highest_seq_no
>=
seq_no
)
...
...
sql/sql_statistics.cc
View file @
7832f1bb
...
@@ -1550,6 +1550,7 @@ public:
...
@@ -1550,6 +1550,7 @@ public:
uint
key_parts
=
table
->
actual_n_key_parts
(
key_info
);
uint
key_parts
=
table
->
actual_n_key_parts
(
key_info
);
empty
=
TRUE
;
empty
=
TRUE
;
prefixes
=
0
;
prefixes
=
0
;
LINT_INIT
(
calc_state
);
is_single_comp_pk
=
FALSE
;
is_single_comp_pk
=
FALSE
;
uint
pk
=
table
->
s
->
primary_key
;
uint
pk
=
table
->
s
->
primary_key
;
...
...
sql/table_cache.cc
View file @
7832f1bb
...
@@ -267,7 +267,7 @@ void tc_add_table(THD *thd, TABLE *table)
...
@@ -267,7 +267,7 @@ void tc_add_table(THD *thd, TABLE *table)
TABLE_SHARE
*
purge_share
=
0
;
TABLE_SHARE
*
purge_share
=
0
;
TABLE_SHARE
*
share
;
TABLE_SHARE
*
share
;
TABLE
*
entry
;
TABLE
*
entry
;
ulonglong
purge_time
;
ulonglong
UNINIT_VAR
(
purge_time
)
;
TDC_iterator
tdc_it
;
TDC_iterator
tdc_it
;
tdc_it
.
init
();
tdc_it
.
init
();
...
...
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