From 981b4747538c742932561d278919fc4b57bd37eb Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 20 Nov 2015 09:57:58 +0200 Subject: Updated configure.pl to new plugin syntax --with-plugin-name=xxxx --with-plugins= now uses =AUTO instead of =1 --- cmake/configure.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/configure.pl b/cmake/configure.pl index b298ab11076..68baf436c1c 100644 --- a/cmake/configure.pl +++ b/cmake/configure.pl @@ -125,7 +125,7 @@ foreach my $option (@ARGV) foreach my $p (@plugins) { $p =~ s/-/_/g; - $cmakeargs = $cmakeargs." -DWITH_".uc($p)."=1"; + $cmakeargs = $cmakeargs." -DWITH_".uc($p)."=AUTO"; } next; } @@ -137,7 +137,12 @@ foreach my $option (@ARGV) } 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; } if($option =~ /with-zlib-dir=bundled/) -- cgit v1.2.1 From 1e156e1436f931625b7a5573584a786388979de2 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 20 Nov 2015 10:00:06 +0200 Subject: Fixed compile warnings on Solaris --- .../example_key_management/example_key_management_plugin.cc | 11 ++++++----- sql/mdl.cc | 2 +- sql/sql_acl.cc | 2 +- sql/sql_analyze_stmt.cc | 10 +++++----- sql/sql_explain.cc | 4 ++-- sql/sql_select.cc | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/plugin/example_key_management/example_key_management_plugin.cc b/plugin/example_key_management/example_key_management_plugin.cc index fb19710c0ef..2b417866406 100644 --- a/plugin/example_key_management/example_key_management_plugin.cc +++ b/plugin/example_key_management/example_key_management_plugin.cc @@ -36,24 +36,25 @@ #define KEY_ROTATION_MAX 90 static struct my_rnd_struct seed; -static unsigned int key_version = 0; -static unsigned int next_key_version = 0; +static time_t key_version = 0; +static time_t next_key_version = 0; static pthread_mutex_t mutex; static unsigned int get_latest_key_version(unsigned int key_id) { - uint now = time(0); + time_t now = time(0); pthread_mutex_lock(&mutex); if (now >= next_key_version) { key_version = now; 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); - return key_version; + return (unsigned int) key_version; } static unsigned int diff --git a/sql/mdl.cc b/sql/mdl.cc index ec380aa7432..2d61f6a5e2e 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -2036,7 +2036,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) find_deadlock(); 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); wait_status= MDL_wait::EMPTY; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 679bd152a39..21d0a989a05 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -12526,7 +12526,7 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len) thd->variables.max_statement_time_double= acl_user->user_resource.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 diff --git a/sql/sql_analyze_stmt.cc b/sql/sql_analyze_stmt.cc index 5e6774bd539..d11c93229b0 100644 --- a/sql/sql_analyze_stmt.cc +++ b/sql/sql_analyze_stmt.cc @@ -39,7 +39,7 @@ void Filesort_tracker::print_json_members(Json_writer *writer) if (r_limit == 0) writer->add_str(varied_str); 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"); @@ -50,13 +50,13 @@ void Filesort_tracker::print_json_members(Json_writer *writer) else writer->add_str(varied_str); - writer->add_member("r_output_rows").add_ll(rint(r_output_rows / - get_r_loops())); + writer->add_member("r_output_rows").add_ll((longlong) rint(r_output_rows / + get_r_loops())); if (sort_passes) { - writer->add_member("r_sort_passes").add_ll(rint(sort_passes / - get_r_loops())); + writer->add_member("r_sort_passes").add_ll((longlong) rint(sort_passes / + get_r_loops())); } if (sort_buffer_size != 0) diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index f16ab92e0d6..8b3e6724c76 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -1122,7 +1122,7 @@ void Explain_index_use::set_pseudo_key(MEM_ROOT *root, const char* key_name_arg) } else key_name= NULL; - key_len= -1; + key_len= ~(uint) 0; } @@ -2252,7 +2252,7 @@ void Explain_update::print_explain_json(Explain_query *query, if (is_using_filesort()) { 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 r_rows= 0; r_filtered= filesort_tracker->get_r_filtered() * 100.0; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index bc5cf2df0ca..a8a953c20fd 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -25388,7 +25388,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab, if (kp == table->quick_key_parts[keynr]) ref_rows= table->quick_rows[keynr]; 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) { -- cgit v1.2.1