summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-13 21:34:16 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-14 09:25:39 +0200
commitfda846b4af2fdb78a9c347650a51931ce499f351 (patch)
tree953ca3aa6fd11e7de5c1d67f595eaa9c7ae48ab1 /mysql-test
parent41779561ec543787b073a1506a2291f6f89cff48 (diff)
downloadmariadb-git-bb-10.4-MDEV-19282.tar.gz
MDEV-19277: Add status variable that gets incremented if connection is aborted prior to authenticationbb-10.4-MDEV-19282
MDEV-19282: Log more specific warning with log_warnings=2 if connection is aborted prior to authentication
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/connect.result22
-rw-r--r--mysql-test/main/connect.test34
2 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result
index 89e10d221d2..8fa7724cff0 100644
--- a/mysql-test/main/connect.result
+++ b/mysql-test/main/connect.result
@@ -408,3 +408,25 @@ test
test
drop procedure p1;
SET global secure_auth=default;
+#
+# MDEV-19282: Log more specific warning with log_warnings=2 if
+# connection is aborted prior to authentication
+# MDEV-19277: Add status variable that gets incremented if
+# connection is aborted prior to authentication
+#
+flush status;
+SHOW GLOBAL STATUS LIKE 'Aborted%';
+Variable_name Value
+Aborted_clients 0
+Aborted_connects 0
+Aborted_connects_preauth 0
+SET GLOBAL log_warnings=2;
+NOT FOUND /This connection closed normally without authentication/ in mysqld.1.err
+SHOW GLOBAL STATUS LIKE 'Aborted%';
+Variable_name Value
+Aborted_clients 0
+Aborted_connects 1
+Aborted_connects_preauth 1
+FOUND 1 /This connection closed normally without authentication/ in mysqld.1.err
+SET GLOBAL log_warnings=default;
+# End of 10.4 tests
diff --git a/mysql-test/main/connect.test b/mysql-test/main/connect.test
index b0461a5afac..1b804c2b0bb 100644
--- a/mysql-test/main/connect.test
+++ b/mysql-test/main/connect.test
@@ -453,3 +453,37 @@ call p1(2);
drop procedure p1;
SET global secure_auth=default;
+
+--echo #
+--echo # MDEV-19282: Log more specific warning with log_warnings=2 if
+--echo # connection is aborted prior to authentication
+--echo # MDEV-19277: Add status variable that gets incremented if
+--echo # connection is aborted prior to authentication
+--echo #
+
+flush status;
+SHOW GLOBAL STATUS LIKE 'Aborted%';
+
+SET GLOBAL log_warnings=2;
+--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN= This connection closed normally without authentication
+--source include/search_pattern_in_file.inc
+
+--perl
+use Socket;
+use autodie;
+socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname("tcp"));
+connect(SOCK, pack_sockaddr_in($ENV{MASTER_MYPORT}, inet_aton("localhost")));
+exit(0);
+EOF
+
+SHOW GLOBAL STATUS LIKE 'Aborted%';
+
+--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN= This connection closed normally without authentication
+--source include/search_pattern_in_file.inc
+
+SET GLOBAL log_warnings=default;
+
+
+--echo # End of 10.4 tests