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
66905f6d
Commit
66905f6d
authored
Mar 17, 2017
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several compile warnings on Windows
parent
7668a79a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
16 deletions
+27
-16
mysys/stacktrace.c
mysys/stacktrace.c
+11
-0
sql/item_sum.cc
sql/item_sum.cc
+6
-6
sql/sql_plugin.cc
sql/sql_plugin.cc
+3
-3
sql/sql_select.cc
sql/sql_select.cc
+2
-2
sql/sys_vars.cc
sql/sys_vars.cc
+1
-1
storage/innobase/btr/btr0scrub.cc
storage/innobase/btr/btr0scrub.cc
+1
-1
storage/sequence/sequence.cc
storage/sequence/sequence.cc
+3
-3
No files found.
mysys/stacktrace.c
View file @
66905f6d
...
...
@@ -483,7 +483,18 @@ void my_write_core(int sig)
#else
/* __WIN__*/
#ifdef _MSC_VER
/* Silence warning in OS header dbghelp.h */
#pragma warning(push)
#pragma warning(disable : 4091)
#endif
#include <dbghelp.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#include <tlhelp32.h>
#include <my_sys.h>
#if _MSC_VER
...
...
sql/item_sum.cc
View file @
66905f6d
...
...
@@ -2218,10 +2218,10 @@ bool Item_sum_bit::remove_as_window(ulonglong value)
if
(
!
bit_counters
[
i
])
{
// Don't attempt to remove values that were never added.
DBUG_ASSERT
((
value
&
(
1
<<
i
))
==
0
);
DBUG_ASSERT
((
value
&
(
1
ULL
<<
i
))
==
0
);
continue
;
}
bit_counters
[
i
]
-=
(
value
&
(
1
<<
i
))
?
1
:
0
;
bit_counters
[
i
]
-=
(
value
&
(
1
ULL
<<
i
))
?
1
:
0
;
}
// Prevent overflow;
...
...
@@ -2235,7 +2235,7 @@ bool Item_sum_bit::add_as_window(ulonglong value)
DBUG_ASSERT
(
as_window_function
);
for
(
int
i
=
0
;
i
<
NUM_BIT_COUNTERS
;
i
++
)
{
bit_counters
[
i
]
+=
(
value
&
(
1
<<
i
))
?
1
:
0
;
bit_counters
[
i
]
+=
(
value
&
(
1
ULL
<<
i
))
?
1
:
0
;
}
// Prevent overflow;
num_values_added
=
std
::
max
(
num_values_added
,
num_values_added
+
1
);
...
...
@@ -2306,7 +2306,7 @@ void Item_sum_and::set_bits_from_counters()
{
// We've only added values of 1 for this bit.
if
(
bit_counters
[
i
]
==
num_values_added
)
value
|=
(
1
<<
i
);
value
|=
(
1
ULL
<<
i
);
}
bits
=
value
&
reset_bits
;
}
...
...
@@ -3490,9 +3490,9 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
result
.
set_charset
(
collation
.
collation
);
result_field
=
0
;
null_value
=
1
;
max_length
=
thd
->
variables
.
group_concat_max_len
max_length
=
(
uint32
)(
thd
->
variables
.
group_concat_max_len
/
collation
.
collation
->
mbminlen
*
collation
.
collation
->
mbmaxlen
;
*
collation
.
collation
->
mbmaxlen
)
;
uint32
offset
;
if
(
separator
->
needs_conversion
(
separator
->
length
(),
separator
->
charset
(),
...
...
sql/sql_plugin.cc
View file @
66905f6d
...
...
@@ -3302,14 +3302,14 @@ uchar* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type)
{
switch
(
plugin_var
->
flags
&
PLUGIN_VAR_TYPEMASK
)
{
case
PLUGIN_VAR_BOOL
:
thd
->
sys_var_tmp
.
my_bool_value
=
option
.
def_value
;
thd
->
sys_var_tmp
.
my_bool_value
=
(
my_bool
)
option
.
def_value
;
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
my_bool_value
;
case
PLUGIN_VAR_INT
:
thd
->
sys_var_tmp
.
int_value
=
option
.
def_value
;
thd
->
sys_var_tmp
.
int_value
=
(
int
)
option
.
def_value
;
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
int_value
;
case
PLUGIN_VAR_LONG
:
case
PLUGIN_VAR_ENUM
:
thd
->
sys_var_tmp
.
long_value
=
option
.
def_value
;
thd
->
sys_var_tmp
.
long_value
=
(
long
)
option
.
def_value
;
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
long_value
;
case
PLUGIN_VAR_LONGLONG
:
case
PLUGIN_VAR_SET
:
...
...
sql/sql_select.cc
View file @
66905f6d
...
...
@@ -6017,7 +6017,7 @@ double matching_candidates_in_table(JOIN_TAB *s, bool with_found_constraint,
{
TABLE
*
table
=
s
->
table
;
double
sel
=
table
->
cond_selectivity
;
double
table_records
=
table
->
stat_records
();
double
table_records
=
(
double
)
table
->
stat_records
();
dbl_records
=
table_records
*
sel
;
return
dbl_records
;
}
...
...
@@ -6043,7 +6043,7 @@ double matching_candidates_in_table(JOIN_TAB *s, bool with_found_constraint,
if
(
s
->
table
->
quick_condition_rows
!=
s
->
found_records
)
records
=
s
->
table
->
quick_condition_rows
;
dbl_records
=
records
;
dbl_records
=
(
double
)
records
;
return
dbl_records
;
}
...
...
sql/sys_vars.cc
View file @
66905f6d
...
...
@@ -5206,7 +5206,7 @@ int default_regex_flags_pcre(const THD *thd)
int
i
,
res
;
for
(
i
=
res
=
0
;
default_regex_flags_to_pcre
[
i
];
i
++
)
{
if
(
src
&
(
1
<<
i
))
if
(
src
&
(
1
ULL
<<
i
))
res
|=
default_regex_flags_to_pcre
[
i
];
}
return
res
;
...
...
storage/innobase/btr/btr0scrub.cc
View file @
66905f6d
...
...
@@ -143,7 +143,7 @@ btr_scrub_lock_dict_func(ulint space, bool lock_to_close_table,
"WARNING: %s:%u waited %lu seconds for"
" dict_sys lock, space: %lu"
" lock_to_close_table: %u
\n
"
,
file
,
line
,
now
-
start
,
space
,
file
,
line
,
(
unsigned
long
)(
now
-
start
)
,
space
,
lock_to_close_table
);
last
=
now
;
...
...
storage/sequence/sequence.cc
View file @
66905f6d
...
...
@@ -95,9 +95,9 @@ class ha_seq: public handler
ha_rows
records_in_range
(
uint
inx
,
key_range
*
min_key
,
key_range
*
max_key
);
double
scan_time
()
{
return
nvalues
();
}
double
read_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
{
return
rows
;
}
double
keyread_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
{
return
rows
;
}
double
scan_time
()
{
return
(
double
)
nvalues
();
}
double
read_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
{
return
(
double
)
rows
;
}
double
keyread_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
{
return
(
double
)
rows
;
}
private:
void
set
(
uchar
*
buf
);
...
...
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