summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-06-28 22:21:50 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-28 22:46:12 +0200
commit1dd3c8f8ba49ec06e550d7376d27ff05ce024bec (patch)
treee9130a52d9bf7218c93e2599959fd6fc371617cf
parent04677f44c7a0faee366de265c92175daadf45bc9 (diff)
parent45cabf10175da1ae2d158ea17ccd6e19f461d6f4 (diff)
downloadmariadb-git-1dd3c8f8ba49ec06e550d7376d27ff05ce024bec.tar.gz
Merge branch '10.1' into 10.2
-rw-r--r--mysql-test/r/max_statement_time.result3
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result2
-rw-r--r--mysql-test/t/max_statement_time.test8
-rw-r--r--plugin/auth_ed25519/server_ed25519.c2
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/sql_class.h2
-rw-r--r--sql/wsrep_sst.cc39
7 files changed, 50 insertions, 10 deletions
diff --git a/mysql-test/r/max_statement_time.result b/mysql-test/r/max_statement_time.result
index 44ee03b813a..a87a899b575 100644
--- a/mysql-test/r/max_statement_time.result
+++ b/mysql-test/r/max_statement_time.result
@@ -181,3 +181,6 @@ ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
set max_statement_time = 0;
drop procedure pr;
drop table t1;
+SET max_statement_time= 1;
+CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_50000;
+ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
index 1baec60da40..ee9320bbc6c 100644
--- a/mysql-test/suite/plugins/r/auth_ed25519.result
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -32,7 +32,7 @@ PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
PLUGIN_LICENSE GPL
LOAD_OPTION ON
-PLUGIN_MATURITY Beta
+PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0-alpha
create user test1@localhost identified via ed25519 using 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
show grants for test1@localhost;
diff --git a/mysql-test/t/max_statement_time.test b/mysql-test/t/max_statement_time.test
index 0882daff139..24b6d9311f2 100644
--- a/mysql-test/t/max_statement_time.test
+++ b/mysql-test/t/max_statement_time.test
@@ -5,6 +5,7 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
+--source include/have_sequence.inc
--source include/not_valgrind.inc
--echo
@@ -226,3 +227,10 @@ call pr();
set max_statement_time = 0;
drop procedure pr;
drop table t1;
+
+#
+# MDEV-16615 ASAN SEGV in handler::print_error or server crash after error upon CREATE TABLE
+#
+SET max_statement_time= 1;
+--error ER_STATEMENT_TIMEOUT
+CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_50000;
diff --git a/plugin/auth_ed25519/server_ed25519.c b/plugin/auth_ed25519/server_ed25519.c
index e3f00409ae3..8870c271b18 100644
--- a/plugin/auth_ed25519/server_ed25519.c
+++ b/plugin/auth_ed25519/server_ed25519.c
@@ -101,7 +101,7 @@ maria_declare_plugin(ed25519)
NULL,
NULL,
"1.0-alpha",
- MariaDB_PLUGIN_MATURITY_BETA
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/sql/handler.cc b/sql/handler.cc
index 87803846010..36babb96415 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3418,8 +3418,8 @@ void handler::print_error(int error, myf errflag)
break;
case HA_ERR_ABORTED_BY_USER:
{
- DBUG_ASSERT(table->in_use->killed);
- table->in_use->send_kill_message();
+ DBUG_ASSERT(ha_thd()->killed);
+ ha_thd()->send_kill_message();
DBUG_VOID_RETURN;
}
case HA_ERR_WRONG_MRG_TABLE_DEF:
diff --git a/sql/sql_class.h b/sql/sql_class.h
index b377d74445f..6663d9e3b34 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -5809,8 +5809,6 @@ inline int handler::ha_ft_read(uchar *buf)
inline int handler::ha_rnd_pos_by_record(uchar *buf)
{
int error= rnd_pos_by_record(buf);
- if (!error)
- update_rows_read();
table->status=error ? STATUS_NOT_FOUND: 0;
return error;
}
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index a4832ce913b..a504d2eafd3 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -30,6 +30,8 @@
#include <cstdio>
#include <cstdlib>
+#include <my_service_manager.h>
+
static char wsrep_defaults_file[FN_REFLEN * 2 + 10 + 30 +
sizeof(WSREP_SST_OPT_CONF) +
sizeof(WSREP_SST_OPT_CONF_SUFFIX) +
@@ -177,6 +179,9 @@ bool wsrep_before_SE()
static bool sst_complete = false;
static bool sst_needed = false;
+#define WSREP_EXTEND_TIMEOUT_INTERVAL 30
+#define WSREP_TIMEDWAIT_SECONDS 10
+
void wsrep_sst_grab ()
{
WSREP_INFO("wsrep_sst_grab()");
@@ -188,11 +193,25 @@ void wsrep_sst_grab ()
// Wait for end of SST
bool wsrep_sst_wait ()
{
- if (mysql_mutex_lock (&LOCK_wsrep_sst)) abort();
+ struct timespec wtime = {WSREP_TIMEDWAIT_SECONDS, 0};
+ uint32 total_wtime = 0;
+
+ if (mysql_mutex_lock (&LOCK_wsrep_sst))
+ abort();
+
+ WSREP_INFO("Waiting for SST to complete.");
+
while (!sst_complete)
{
- WSREP_INFO("Waiting for SST to complete.");
- mysql_cond_wait (&COND_wsrep_sst, &LOCK_wsrep_sst);
+ mysql_cond_timedwait (&COND_wsrep_sst, &LOCK_wsrep_sst, &wtime);
+
+ if (!sst_complete)
+ {
+ total_wtime += wtime.tv_sec;
+ WSREP_DEBUG("Waiting for SST to complete. waited %u secs.", total_wtime);
+ service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
+ "WSREP state transfer ongoing, current seqno: %ld", local_seqno);
+ }
}
if (local_seqno >= 0)
@@ -1347,10 +1366,22 @@ void wsrep_SE_init_grab()
void wsrep_SE_init_wait()
{
+ struct timespec wtime = {WSREP_TIMEDWAIT_SECONDS, 0};
+ uint32 total_wtime=0;
+
while (SE_initialized == false)
{
- mysql_cond_wait (&COND_wsrep_sst_init, &LOCK_wsrep_sst_init);
+ mysql_cond_timedwait (&COND_wsrep_sst_init, &LOCK_wsrep_sst_init, &wtime);
+
+ if (!SE_initialized)
+ {
+ total_wtime += wtime.tv_sec;
+ WSREP_DEBUG("Waiting for SST to complete. waited %u secs.", total_wtime);
+ service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
+ "WSREP SE initialization ongoing.");
+ }
}
+
mysql_mutex_unlock (&LOCK_wsrep_sst_init);
}