Skip to content

Commit 2fc3dc3

Browse files
committed
Merge branch '10.1' into bb-10.1-serg
2 parents e52c753 + 1e156e1 commit 2fc3dc3

File tree

7 files changed

+23
-17
lines changed

7 files changed

+23
-17
lines changed

cmake/configure.pl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ sub check_compiler
125125
foreach my $p (@plugins)
126126
{
127127
$p =~ s/-/_/g;
128-
$cmakeargs = $cmakeargs." -DWITH_".uc($p)."=1";
128+
$cmakeargs = $cmakeargs." -DWITH_".uc($p)."=AUTO";
129129
}
130130
next;
131131
}
@@ -137,7 +137,12 @@ sub check_compiler
137137
}
138138
if($option =~ /without-plugin=/ || $option =~ /without-plugin-/)
139139
{
140-
$cmakeargs = $cmakeargs." -DWITHOUT_".uc(substr($option,15))."=1";
140+
$cmakeargs = $cmakeargs." -DPLUGIN_".uc(substr($option,15))."=NO";
141+
next;
142+
}
143+
if($option =~ /with-plugin-(.*)=(.*)/)
144+
{
145+
$cmakeargs = $cmakeargs." -DPLUGIN_".uc($1)."=".uc($2);
141146
next;
142147
}
143148
if($option =~ /with-zlib-dir=bundled/)

plugin/example_key_management/example_key_management_plugin.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,25 @@
3636
#define KEY_ROTATION_MAX 90
3737

3838
static struct my_rnd_struct seed;
39-
static unsigned int key_version = 0;
40-
static unsigned int next_key_version = 0;
39+
static time_t key_version = 0;
40+
static time_t next_key_version = 0;
4141
static pthread_mutex_t mutex;
4242

4343
static unsigned int
4444
get_latest_key_version(unsigned int key_id)
4545
{
46-
uint now = time(0);
46+
time_t now = time(0);
4747
pthread_mutex_lock(&mutex);
4848
if (now >= next_key_version)
4949
{
5050
key_version = now;
5151
unsigned int interval = KEY_ROTATION_MAX - KEY_ROTATION_MIN;
52-
next_key_version = now + KEY_ROTATION_MIN + my_rnd(&seed) * interval;
52+
next_key_version = (time_t) (now + KEY_ROTATION_MIN +
53+
my_rnd(&seed) * interval);
5354
}
5455
pthread_mutex_unlock(&mutex);
5556

56-
return key_version;
57+
return (unsigned int) key_version;
5758
}
5859

5960
static unsigned int

sql/mdl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
20372037
find_deadlock();
20382038

20392039
struct timespec abs_timeout, abs_shortwait;
2040-
set_timespec(abs_timeout, lock_wait_timeout);
2040+
set_timespec(abs_timeout, (ulonglong) lock_wait_timeout);
20412041
set_timespec(abs_shortwait, 1);
20422042
wait_status= MDL_wait::EMPTY;
20432043

sql/sql_acl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12527,7 +12527,7 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
1252712527
thd->variables.max_statement_time_double=
1252812528
acl_user->user_resource.max_statement_time;
1252912529
thd->variables.max_statement_time=
12530-
(thd->variables.max_statement_time_double * 1e6 + 0.1);
12530+
(ulonglong) (thd->variables.max_statement_time_double * 1e6 + 0.1);
1253112531
}
1253212532
}
1253312533
else

sql/sql_analyze_stmt.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void Filesort_tracker::print_json_members(Json_writer *writer)
3939
if (r_limit == 0)
4040
writer->add_str(varied_str);
4141
else
42-
writer->add_ll(rint(r_limit/get_r_loops()));
42+
writer->add_ll((longlong) rint(r_limit/get_r_loops()));
4343
}
4444

4545
writer->add_member("r_used_priority_queue");
@@ -50,13 +50,13 @@ void Filesort_tracker::print_json_members(Json_writer *writer)
5050
else
5151
writer->add_str(varied_str);
5252

53-
writer->add_member("r_output_rows").add_ll(rint(r_output_rows /
54-
get_r_loops()));
53+
writer->add_member("r_output_rows").add_ll((longlong) rint(r_output_rows /
54+
get_r_loops()));
5555

5656
if (sort_passes)
5757
{
58-
writer->add_member("r_sort_passes").add_ll(rint(sort_passes /
59-
get_r_loops()));
58+
writer->add_member("r_sort_passes").add_ll((longlong) rint(sort_passes /
59+
get_r_loops()));
6060
}
6161

6262
if (sort_buffer_size != 0)

sql/sql_explain.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ void Explain_index_use::set_pseudo_key(MEM_ROOT *root, const char* key_name_arg)
11221122
}
11231123
else
11241124
key_name= NULL;
1125-
key_len= -1;
1125+
key_len= ~(uint) 0;
11261126
}
11271127

11281128

@@ -2252,7 +2252,7 @@ void Explain_update::print_explain_json(Explain_query *query,
22522252
if (is_using_filesort())
22532253
{
22542254
if (filesort_tracker->get_r_loops())
2255-
r_rows= filesort_tracker->get_avg_examined_rows();
2255+
r_rows= (ha_rows) filesort_tracker->get_avg_examined_rows();
22562256
else
22572257
r_rows= 0;
22582258
r_filtered= filesort_tracker->get_r_filtered() * 100.0;

sql/sql_select.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25394,7 +25394,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab,
2539425394
if (kp == table->quick_key_parts[keynr])
2539525395
ref_rows= table->quick_rows[keynr];
2539625396
else
25397-
ref_rows= table->key_info[keynr].actual_rec_per_key(kp-1);
25397+
ref_rows= (ha_rows) table->key_info[keynr].actual_rec_per_key(kp-1);
2539825398

2539925399
if (ref_rows > 0)
2540025400
{

0 commit comments

Comments
 (0)