From 4ec9a4a1aa85276e12e9c171e858740eff2255ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 2 Dec 2014 05:42:14 +0100 Subject: [PATCH] Minor bug fix to compile with DEBUG --- lib/Makefile | 2 +- lib/MySQL_Protocol.cpp | 2 +- lib/Standard_MySQL_Thread.cpp | 2 +- src/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 83157c7b9..8bcc3c332 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -42,7 +42,7 @@ CC=gcc CPP=g++ #CC=clang -DEBUG=-ggdb #-DDEBUG +DEBUG=-ggdb -DDEBUG O0=-O0 O2=-O2 O1=-O1 diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 7536d9b0c..c742c56bf 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -1426,7 +1426,7 @@ bool MySQL_Protocol::process_pkt_handshake_response(unsigned char *pkt, unsigned } } proxy_debug(PROXY_DEBUG_MYSQL_PROTOCOL,1,"Handshake (%s auth) , capabilities:%u char:%u, use_ssl:%s\n", - (capabilities & CLIENT_SECURE_CONNECTION ? "new" : "old"), user, password, pass, db, max_pkt, capabilities, charset, (myds->encrypted ? "yes" : "no")); + (capabilities & CLIENT_SECURE_CONNECTION ? "new" : "old"), user, password, pass, db, max_pkt, capabilities, charset, ((*myds)->encrypted ? "yes" : "no")); #ifdef DEBUG if (dump_pkt) { __dump_pkt(__func__,_ptr,len); } diff --git a/lib/Standard_MySQL_Thread.cpp b/lib/Standard_MySQL_Thread.cpp index fb88526b2..7b6c7ab7c 100644 --- a/lib/Standard_MySQL_Thread.cpp +++ b/lib/Standard_MySQL_Thread.cpp @@ -271,7 +271,7 @@ virtual MySQL_Session * create_new_session_and_client_data_stream(int _fd) { proxy_debug(PROXY_DEBUG_NET,1,"Thread=%p, Session=%p, DataStream=%p -- Created new client Data Stream\n", sess->thread, sess, sess->client_myds); //sess->prot.generate_server_handshake(sess->client_myds); #ifdef DEBUG - sess->prot.dump_pkt=true; + sess->myprot_client.dump_pkt=true; #endif sess->client_myds->myconn=new MySQL_Connection(); // 20141011 sess->client_myds->myconn->myds=sess->client_myds; // 20141011 diff --git a/src/Makefile b/src/Makefile index 2a3480fd5..76b20b14b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,7 +39,7 @@ LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) $(LIBCONFIG_LDIR) #LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) -L$(MARIADB_LDIR) $(GLIB_LDIRS) $(LIBCONFIG_LDIR) -DEBUG=-ggdb #-DDEBUG +DEBUG=-ggdb -DDEBUG O0=-O0 O2=-O2 O1=-O1