Diego Medina wrote:
Hi Everyone,

Grab the query in the post interface.
But then what would be the point of a pre- interface?

I looked at it again and I realized I didn't need the whole
session->readAndStoreQuery() to get the query text, what seems to do
the job and change as little code as possible is to add in
sql_parse.cc:190:


  LEX_STRING tmp;
  tmp.str= packet;
  session->query= tmp.str;
  logging_pre_do(session);

...
and remove the declaration of tmp from inside the  case COM_INIT_DB:

I actually think that the better (as far as encapsulation goes) is to call logging_pre_do() after Session::readAndStoreQuery(). Then again, I think logging_post_do() should be moved into a Session-level context instead of being in the parser where it currently is...

-jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to