~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2011-02-04 23:02:48 UTC
  • mto: (2147.3.1 alter-table)
  • mto: This revision was merged to the branch mainline in revision 2148.
  • Revision ID: brian@tangent.org-20110204230248-fuub99d2y6gh514c
Remove current_session in building the error count.

Show diffs side-by-side

added added

removed removed

Lines of Context:
696
696
  @param var_name               Variable name
697
697
*/
698
698
 
699
 
void create_select_for_variable(const char *var_name)
 
699
void create_select_for_variable(Session *session, const char *var_name)
700
700
{
701
 
  Session *session;
702
701
  LEX *lex;
703
702
  LEX_STRING tmp, null_lex_string;
704
703
  Item *var;
705
704
  char buff[MAX_SYS_VAR_LENGTH*2+4+8];
706
705
  char *end= buff;
707
706
 
708
 
  session= current_session;
709
707
  lex= session->lex;
710
708
  init_select(lex);
711
709
  lex->sql_command= SQLCOM_SELECT;
722
720
    var->set_name(buff, end-buff, system_charset_info);
723
721
    session->add_item_to_list(var);
724
722
  }
725
 
  return;
726
723
}
727
724
 
728
725