diff --git a/include/Base_Session.h b/include/Base_Session.h index df819f473..3d44cc3fc 100644 --- a/include/Base_Session.h +++ b/include/Base_Session.h @@ -99,8 +99,8 @@ class Base_Session { SESSION_FORWARD_TYPE session_fast_forward; //bool started_sending_data_to_client; // this status variable tracks if some result set was sent to the client, or if proxysql is still buffering everything bool use_ssl; - MySQL_STMTs_meta *sess_STMTs_meta; - StmtLongDataHandler *SLDH; + //MySQL_STMTs_meta *sess_STMTs_meta; + //StmtLongDataHandler *SLDH; diff --git a/include/MySQL_Session.h b/include/MySQL_Session.h index 8f8d4da63..93b654829 100644 --- a/include/MySQL_Session.h +++ b/include/MySQL_Session.h @@ -371,8 +371,8 @@ class MySQL_Session: public Base_Session::init() { mybes = new PtrArray(4); // Conditional initialization based on derived class if constexpr (std::is_same_v) { - sess_STMTs_meta = new MySQL_STMTs_meta(); - SLDH = new StmtLongDataHandler(); - } else if constexpr (std::is_same_v) { - sess_STMTs_meta = NULL; - SLDH = NULL; - } else { - assert(0); + MySQL_Session* mysession = static_cast(this); + mysession->sess_STMTs_meta = new MySQL_STMTs_meta(); + mysession->SLDH = new StmtLongDataHandler(); } };