Moved sess_STMTs_meta and SLDH from Base_Session to MySQL_Session

pull/5044/head
Rahim Kanji 10 months ago
parent acef968c63
commit 441504190d

@ -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;

@ -371,8 +371,8 @@ class MySQL_Session: public Base_Session<MySQL_Session, MySQL_Data_Stream, MySQL
//uint64_t gtid_trxid;
int gtid_hid;
// MySQL_STMTs_meta *sess_STMTs_meta;
// StmtLongDataHandler *SLDH;
MySQL_STMTs_meta *sess_STMTs_meta;
StmtLongDataHandler *SLDH;
Session_Regex **match_regexes;

@ -82,13 +82,9 @@ void Base_Session<S,DS,B,T>::init() {
mybes = new PtrArray(4);
// Conditional initialization based on derived class
if constexpr (std::is_same_v<S, MySQL_Session>) {
sess_STMTs_meta = new MySQL_STMTs_meta();
SLDH = new StmtLongDataHandler();
} else if constexpr (std::is_same_v<S, PgSQL_Session>) {
sess_STMTs_meta = NULL;
SLDH = NULL;
} else {
assert(0);
MySQL_Session* mysession = static_cast<S*>(this);
mysession->sess_STMTs_meta = new MySQL_STMTs_meta();
mysession->SLDH = new StmtLongDataHandler();
}
};

Loading…
Cancel
Save