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
ccf21c99
Commit
ccf21c99
authored
Sep 28, 2017
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some conversion warnings
parent
7354dc67
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
18 deletions
+18
-18
sql/item_sum.cc
sql/item_sum.cc
+2
-2
sql/item_sum.h
sql/item_sum.h
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_cache.h
sql/sql_cache.h
+2
-2
sql/sql_table.cc
sql/sql_table.cc
+1
-1
sql/sql_test.cc
sql/sql_test.cc
+1
-1
sql/uniques.cc
sql/uniques.cc
+3
-3
sql/uniques.h
sql/uniques.h
+6
-6
storage/myisam/myisamchk.c
storage/myisam/myisamchk.c
+1
-1
No files found.
sql/item_sum.cc
View file @
ccf21c99
...
...
@@ -36,9 +36,9 @@
used in Item_sum_*
*/
ulonglong
Item_sum
::
ram_limitation
(
THD
*
thd
)
size_t
Item_sum
::
ram_limitation
(
THD
*
thd
)
{
return
MY_MIN
(
thd
->
variables
.
tmp_memory_table_size
,
return
(
size_t
)
MY_MIN
(
thd
->
variables
.
tmp_memory_table_size
,
thd
->
variables
.
max_heap_table_size
);
}
...
...
sql/item_sum.h
View file @
ccf21c99
...
...
@@ -382,7 +382,7 @@ class Item_sum :public Item_func_or_sum
*/
Item
**
orig_args
,
*
tmp_orig_args
[
2
];
static
ulonglong
ram_limitation
(
THD
*
thd
);
static
size_t
ram_limitation
(
THD
*
thd
);
public:
...
...
sql/opt_range.cc
View file @
ccf21c99
...
...
@@ -10912,7 +10912,7 @@ int read_keys_and_merge_scans(THD *thd,
unique
=
new
Unique
(
refpos_order_cmp
,
(
void
*
)
file
,
file
->
ref_length
,
thd
->
variables
.
sortbuff_size
,
(
size_t
)
thd
->
variables
.
sortbuff_size
,
intersection
?
quick_selects
.
elements
:
0
);
if
(
!
unique
)
goto
err
;
...
...
sql/sql_cache.h
View file @
ccf21c99
...
...
@@ -557,8 +557,8 @@ struct Query_cache_query_flags
ha_rows
limit
;
Time_zone
*
time_zone
;
sql_mode_t
sql_mode
;
ulong
max_sort_length
;
ulong
group_concat_max_len
;
ulong
long
max_sort_length
;
ulong
long
group_concat_max_len
;
ulong
default_week_format
;
ulong
div_precision_increment
;
MY_LOCALE
*
lc_time_names
;
...
...
sql/sql_table.cc
View file @
ccf21c99
...
...
@@ -4352,7 +4352,7 @@ static bool prepare_blob_field(THD *thd, Column_definition *sql_field)
sql_field
->
sql_type
==
FIELD_TYPE_MEDIUM_BLOB
)
{
/* The user has given a length to the blob column */
sql_field
->
sql_type
=
get_blob_type_from_length
(
sql_field
->
length
);
sql_field
->
sql_type
=
get_blob_type_from_length
(
(
ulong
)
sql_field
->
length
);
sql_field
->
pack_length
=
calc_pack_length
(
sql_field
->
sql_type
,
0
);
}
sql_field
->
length
=
0
;
...
...
sql/sql_test.cc
View file @
ccf21c99
...
...
@@ -432,7 +432,7 @@ static void push_locks_into_array(DYNAMIC_ARRAY *ar, THR_LOCK_DATA *data,
if
(
table
&&
table
->
s
->
tmp_table
==
NO_TMP_TABLE
)
{
TABLE_LOCK_INFO
table_lock_info
;
table_lock_info
.
thread_id
=
table
->
in_use
->
thread_id
;
table_lock_info
.
thread_id
=
(
ulong
)
table
->
in_use
->
thread_id
;
memcpy
(
table_lock_info
.
table_name
,
table
->
s
->
table_cache_key
.
str
,
table
->
s
->
table_cache_key
.
length
);
table_lock_info
.
table_name
[
strlen
(
table_lock_info
.
table_name
)]
=
'.'
;
...
...
sql/uniques.cc
View file @
ccf21c99
...
...
@@ -79,7 +79,7 @@ int unique_intersect_write_to_ptrs(uchar* key, element_count count, Unique *uniq
Unique
::
Unique
(
qsort_cmp2
comp_func
,
void
*
comp_func_fixed_arg
,
uint
size_arg
,
ulonglong
max_in_memory_size_arg
,
uint
size_arg
,
size_t
max_in_memory_size_arg
,
uint
min_dupl_count_arg
)
:
max_in_memory_size
(
max_in_memory_size_arg
),
size
(
size_arg
),
...
...
@@ -91,7 +91,7 @@ Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg,
if
(
min_dupl_count_arg
)
full_size
+=
sizeof
(
element_count
);
with_counters
=
MY_TEST
(
min_dupl_count_arg
);
init_tree
(
&
tree
,
(
ulong
)
(
max_in_memory_size
/
16
),
0
,
size
,
comp_func
,
init_tree
(
&
tree
,
(
max_in_memory_size
/
16
),
0
,
size
,
comp_func
,
NULL
,
comp_func_fixed_arg
,
MYF
(
MY_THREAD_SPECIFIC
));
/* If the following fail's the next add will also fail */
my_init_dynamic_array
(
&
file_ptrs
,
sizeof
(
BUFFPEK
),
16
,
16
,
...
...
@@ -306,7 +306,7 @@ static double get_merge_many_buffs_cost(uint *buffer,
*/
double
Unique
::
get_use_cost
(
uint
*
buffer
,
size_t
nkeys
,
uint
key_size
,
ulonglong
max_in_memory_size
,
size_t
max_in_memory_size
,
uint
compare_factor
,
bool
intersect_fl
,
bool
*
in_memory
)
{
...
...
sql/uniques.h
View file @
ccf21c99
...
...
@@ -30,7 +30,7 @@ class Unique :public Sql_alloc
{
DYNAMIC_ARRAY
file_ptrs
;
ulong
max_elements
;
ulonglong
max_in_memory_size
;
size_t
max_in_memory_size
;
IO_CACHE
file
;
TREE
tree
;
ulong
filtered_out_elems
;
...
...
@@ -46,7 +46,7 @@ class Unique :public Sql_alloc
ulong
elements
;
SORT_INFO
sort
;
Unique
(
qsort_cmp2
comp_func
,
void
*
comp_func_fixed_arg
,
uint
size_arg
,
ulonglong
max_in_memory_size_arg
,
uint
size_arg
,
size_t
max_in_memory_size_arg
,
uint
min_dupl_count_arg
=
0
);
~
Unique
();
ulong
elements_in_tree
()
{
return
tree
.
elements_in_tree
;
}
...
...
@@ -72,12 +72,12 @@ class Unique :public Sql_alloc
}
static
double
get_use_cost
(
uint
*
buffer
,
size_t
nkeys
,
uint
key_size
,
ulonglong
max_in_memory_size
,
uint
compare_factor
,
size_t
max_in_memory_size
,
uint
compare_factor
,
bool
intersect_fl
,
bool
*
in_memory
);
inline
static
int
get_cost_calc_buff_size
(
size_t
nkeys
,
uint
key_size
,
ulonglong
max_in_memory_size
)
size_t
max_in_memory_size
)
{
register
ulonglong
max_elems_in_tree
=
register
size_t
max_elems_in_tree
=
max_in_memory_size
/
ALIGN_SIZE
(
sizeof
(
TREE_ELEMENT
)
+
key_size
);
return
(
int
)
(
sizeof
(
uint
)
*
(
1
+
nkeys
/
max_elems_in_tree
));
}
...
...
@@ -86,7 +86,7 @@ class Unique :public Sql_alloc
bool
walk
(
TABLE
*
table
,
tree_walk_action
action
,
void
*
walk_action_arg
);
uint
get_size
()
const
{
return
size
;
}
ulonglong
get_max_in_memory_size
()
const
{
return
max_in_memory_size
;
}
size_t
get_max_in_memory_size
()
const
{
return
max_in_memory_size
;
}
friend
int
unique_write_to_file
(
uchar
*
key
,
element_count
count
,
Unique
*
unique
);
friend
int
unique_write_to_ptrs
(
uchar
*
key
,
element_count
count
,
Unique
*
unique
);
...
...
storage/myisam/myisamchk.c
View file @
ccf21c99
...
...
@@ -1116,7 +1116,7 @@ static int myisamchk(HA_CHECK *param, char * filename)
{
if
(
param
->
testflag
&
(
T_EXTEND
|
T_MEDIUM
))
(
void
)
init_key_cache
(
dflt_key_cache
,
opt_key_cache_block_size
,
param
->
use_buffers
,
0
,
0
,
0
,
0
);
(
size_t
)
param
->
use_buffers
,
0
,
0
,
0
,
0
);
(
void
)
init_io_cache
(
&
param
->
read_cache
,
datafile
,
(
uint
)
param
->
read_buffer_length
,
READ_CACHE
,
...
...
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