From 0708808bd4837b8a98ee644f52ac7e83aecf4f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Mon, 22 Jul 2019 02:32:48 +1000 Subject: [PATCH] Disable throttling for any client other than SESSION_MYSQL #2147 --- lib/MySQL_Session.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 36904be0e..6efe1d2da 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -569,6 +569,9 @@ void MySQL_Session::writeout() { bool disable_throttle = mysql_thread___throttle_max_bytes_per_second_to_client == 0; int mwpl = mysql_thread___throttle_max_bytes_per_second_to_client; // max writes per call mwpl = mwpl/tps; + if (session_type!=PROXYSQL_SESSION_MYSQL) { + disable_throttle = true; + } if (client_myds) client_myds->array2buffer_full(); if (mybe && mybe->server_myds && mybe->server_myds->myds_type==MYDS_BACKEND) { if (session_type==PROXYSQL_SESSION_MYSQL) {