~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-09 13:38:01 UTC
  • mto: (1919.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1920.
  • Revision ID: andrew@linuxjedi.co.uk-20101109133801-byjzsao76346395x
Add FLUSH GLOBAL STATUS; command
Clears the global status variables for the server

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
  Because of this, it's critical to not do too much things here.
207
207
  (We already do too much here)
208
208
*/
209
 
void LEX::start(Session *arg)
210
 
{
211
 
  lex_start(arg);
212
 
}
213
 
 
214
209
void lex_start(Session *session)
215
210
{
216
211
  LEX *lex= session->lex;
270
265
  lex->reset();
271
266
}
272
267
 
273
 
void LEX::end()
 
268
void lex_end(LEX *lex)
274
269
{
275
 
  if (yacc_yyss)
276
 
  {
277
 
    free(yacc_yyss);
278
 
    free(yacc_yyvs);
279
 
    yacc_yyss= 0;
280
 
    yacc_yyvs= 0;
281
 
  }
282
 
 
283
 
  delete result;
284
 
 
285
 
  result= 0;
286
 
  setCacheable(true);
287
 
 
288
 
  delete statement;
289
 
  statement= NULL;
 
270
  if (lex->yacc_yyss)
 
271
  {
 
272
    free(lex->yacc_yyss);
 
273
    free(lex->yacc_yyvs);
 
274
    lex->yacc_yyss= 0;
 
275
    lex->yacc_yyvs= 0;
 
276
  }
 
277
 
 
278
  delete lex->result;
 
279
 
 
280
  lex->result= 0;
 
281
  lex->setCacheable(true);
 
282
 
 
283
  if (lex->statement) 
 
284
  {
 
285
    delete lex->statement;
 
286
    lex->statement= NULL;
 
287
  }
290
288
}
291
289
 
292
290
static int find_keyword(Lex_input_stream *lip, uint32_t len, bool function)