summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2023-01-05 12:21:20 +1100
committerDaniel Black <daniel@mariadb.org>2023-02-06 22:23:52 +1100
commitf4b900e6fa28b9439e7453d6bbc4570aa5ed0ef5 (patch)
tree938b16b9789345503761914dc2488c0c7fb32f64
parentbef20b5f36d21a2e7a03d283e158e66a64a16754 (diff)
downloadmariadb-git-f4b900e6fa28b9439e7453d6bbc4570aa5ed0ef5.tar.gz
MDEV-24301 [Warning] Aborted connection (This connection closed normally)
Warning on a normal graceful disconnnect is excessive, so lets not do it. MDEV-19282 restructed the code from 10.3 so applying this as a 10.4+ fix.
-rw-r--r--sql/mysqld.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 9203743adfe..1fd69583ee4 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2576,11 +2576,9 @@ void close_connection(THD *thd, uint sql_errno)
net_send_error(thd, sql_errno, ER_DEFAULT(sql_errno), NULL);
thd->print_aborted_warning(lvl, ER_DEFAULT(sql_errno));
}
- else
- thd->print_aborted_warning(lvl, (thd->main_security_ctx.user ?
- "This connection closed normally" :
- "This connection closed normally without"
- " authentication"));
+ else if (!thd->main_security_ctx.user)
+ thd->print_aborted_warning(lvl, "This connection closed normally without"
+ " authentication");
thd->disconnect();