Commit 2fc3dc39 authored by Sergei Golubchik's avatar Sergei Golubchik

Merge branch '10.1' into bb-10.1-serg

parents e52c753a 1e156e14
...@@ -125,7 +125,7 @@ foreach my $option (@ARGV) ...@@ -125,7 +125,7 @@ foreach my $option (@ARGV)
foreach my $p (@plugins) foreach my $p (@plugins)
{ {
$p =~ s/-/_/g; $p =~ s/-/_/g;
$cmakeargs = $cmakeargs." -DWITH_".uc($p)."=1"; $cmakeargs = $cmakeargs." -DWITH_".uc($p)."=AUTO";
} }
next; next;
} }
...@@ -137,7 +137,12 @@ foreach my $option (@ARGV) ...@@ -137,7 +137,12 @@ foreach my $option (@ARGV)
} }
if($option =~ /without-plugin=/ || $option =~ /without-plugin-/) if($option =~ /without-plugin=/ || $option =~ /without-plugin-/)
{ {
$cmakeargs = $cmakeargs." -DWITHOUT_".uc(substr($option,15))."=1"; $cmakeargs = $cmakeargs." -DPLUGIN_".uc(substr($option,15))."=NO";
next;
}
if($option =~ /with-plugin-(.*)=(.*)/)
{
$cmakeargs = $cmakeargs." -DPLUGIN_".uc($1)."=".uc($2);
next; next;
} }
if($option =~ /with-zlib-dir=bundled/) if($option =~ /with-zlib-dir=bundled/)
......
...@@ -36,24 +36,25 @@ ...@@ -36,24 +36,25 @@
#define KEY_ROTATION_MAX 90 #define KEY_ROTATION_MAX 90
static struct my_rnd_struct seed; static struct my_rnd_struct seed;
static unsigned int key_version = 0; static time_t key_version = 0;
static unsigned int next_key_version = 0; static time_t next_key_version = 0;
static pthread_mutex_t mutex; static pthread_mutex_t mutex;
static unsigned int static unsigned int
get_latest_key_version(unsigned int key_id) get_latest_key_version(unsigned int key_id)
{ {
uint now = time(0); time_t now = time(0);
pthread_mutex_lock(&mutex); pthread_mutex_lock(&mutex);
if (now >= next_key_version) if (now >= next_key_version)
{ {
key_version = now; key_version = now;
unsigned int interval = KEY_ROTATION_MAX - KEY_ROTATION_MIN; unsigned int interval = KEY_ROTATION_MAX - KEY_ROTATION_MIN;
next_key_version = now + KEY_ROTATION_MIN + my_rnd(&seed) * interval; next_key_version = (time_t) (now + KEY_ROTATION_MIN +
my_rnd(&seed) * interval);
} }
pthread_mutex_unlock(&mutex); pthread_mutex_unlock(&mutex);
return key_version; return (unsigned int) key_version;
} }
static unsigned int static unsigned int
......
...@@ -2037,7 +2037,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) ...@@ -2037,7 +2037,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
find_deadlock(); find_deadlock();
struct timespec abs_timeout, abs_shortwait; struct timespec abs_timeout, abs_shortwait;
set_timespec(abs_timeout, lock_wait_timeout); set_timespec(abs_timeout, (ulonglong) lock_wait_timeout);
set_timespec(abs_shortwait, 1); set_timespec(abs_shortwait, 1);
wait_status= MDL_wait::EMPTY; wait_status= MDL_wait::EMPTY;
......
...@@ -12527,7 +12527,7 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len) ...@@ -12527,7 +12527,7 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
thd->variables.max_statement_time_double= thd->variables.max_statement_time_double=
acl_user->user_resource.max_statement_time; acl_user->user_resource.max_statement_time;
thd->variables.max_statement_time= thd->variables.max_statement_time=
(thd->variables.max_statement_time_double * 1e6 + 0.1); (ulonglong) (thd->variables.max_statement_time_double * 1e6 + 0.1);
} }
} }
else else
......
...@@ -39,7 +39,7 @@ void Filesort_tracker::print_json_members(Json_writer *writer) ...@@ -39,7 +39,7 @@ void Filesort_tracker::print_json_members(Json_writer *writer)
if (r_limit == 0) if (r_limit == 0)
writer->add_str(varied_str); writer->add_str(varied_str);
else else
writer->add_ll(rint(r_limit/get_r_loops())); writer->add_ll((longlong) rint(r_limit/get_r_loops()));
} }
writer->add_member("r_used_priority_queue"); writer->add_member("r_used_priority_queue");
...@@ -50,13 +50,13 @@ void Filesort_tracker::print_json_members(Json_writer *writer) ...@@ -50,13 +50,13 @@ void Filesort_tracker::print_json_members(Json_writer *writer)
else else
writer->add_str(varied_str); writer->add_str(varied_str);
writer->add_member("r_output_rows").add_ll(rint(r_output_rows / writer->add_member("r_output_rows").add_ll((longlong) rint(r_output_rows /
get_r_loops())); get_r_loops()));
if (sort_passes) if (sort_passes)
{ {
writer->add_member("r_sort_passes").add_ll(rint(sort_passes / writer->add_member("r_sort_passes").add_ll((longlong) rint(sort_passes /
get_r_loops())); get_r_loops()));
} }
if (sort_buffer_size != 0) if (sort_buffer_size != 0)
......
...@@ -1122,7 +1122,7 @@ void Explain_index_use::set_pseudo_key(MEM_ROOT *root, const char* key_name_arg) ...@@ -1122,7 +1122,7 @@ void Explain_index_use::set_pseudo_key(MEM_ROOT *root, const char* key_name_arg)
} }
else else
key_name= NULL; key_name= NULL;
key_len= -1; key_len= ~(uint) 0;
} }
...@@ -2252,7 +2252,7 @@ void Explain_update::print_explain_json(Explain_query *query, ...@@ -2252,7 +2252,7 @@ void Explain_update::print_explain_json(Explain_query *query,
if (is_using_filesort()) if (is_using_filesort())
{ {
if (filesort_tracker->get_r_loops()) if (filesort_tracker->get_r_loops())
r_rows= filesort_tracker->get_avg_examined_rows(); r_rows= (ha_rows) filesort_tracker->get_avg_examined_rows();
else else
r_rows= 0; r_rows= 0;
r_filtered= filesort_tracker->get_r_filtered() * 100.0; r_filtered= filesort_tracker->get_r_filtered() * 100.0;
......
...@@ -25394,7 +25394,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab, ...@@ -25394,7 +25394,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab,
if (kp == table->quick_key_parts[keynr]) if (kp == table->quick_key_parts[keynr])
ref_rows= table->quick_rows[keynr]; ref_rows= table->quick_rows[keynr];
else else
ref_rows= table->key_info[keynr].actual_rec_per_key(kp-1); ref_rows= (ha_rows) table->key_info[keynr].actual_rec_per_key(kp-1);
if (ref_rows > 0) if (ref_rows > 0)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment