1 #ifndef _SQL_QUERY_STRIPC_COMMENTS_H_ 2 #define _SQL_QUERY_STRIPC_COMMENTS_H_ 3 4 // implemented in sql_cache.cc 5 class QueryStripComments 6 { 7 private: 8 QueryStripComments(const QueryStripComments&); 9 QueryStripComments& operator=(const QueryStripComments&); 10 public: 11 QueryStripComments(); 12 ~QueryStripComments(); 13 void set(LEX_CSTRING query, uint a_additional_length); 14 query()15 char* query() { return buffer; } query_length()16 uint query_length() { return length; } 17 private: 18 void cleanup(); 19 private: 20 char* buffer; 21 uint length /*query length, not buffer length*/; 22 uint buffer_length; 23 }; 24 25 #endif // _SQL_QUERY_STRIPC_COMMENTS_H_ 26