~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/set_option.cc

  • Committer: Brian Aker
  • Date: 2011-01-22 18:52:16 UTC
  • mfrom: (2098.4.1 catalogs)
  • Revision ID: brian@tangent.org-20110122185216-18and6vncipd7x72
Session encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
bool statement::SetOption::execute()
30
30
{
31
 
  TableList *all_tables= session->lex->query_tables;
 
31
  TableList *all_tables= getSession()->lex->query_tables;
32
32
 
33
 
  if (session->openTablesLock(all_tables))
 
33
  if (getSession()->openTablesLock(all_tables))
34
34
  {
35
35
    return true;
36
36
  }
37
 
  bool res= sql_set_variables(session, session->lex->var_list);
 
37
  bool res= sql_set_variables(getSession(), getSession()->lex->var_list);
38
38
  if (res)
39
39
  {
40
40
    /*
42
42
     * Send something semi-generic here since we don't know which
43
43
     * assignment in the list caused the error.
44
44
     */
45
 
    if (! session->is_error())
 
45
    if (! getSession()->is_error())
46
46
    {
47
47
      my_error(ER_WRONG_ARGUMENTS, MYF(0), "SET");
48
48
    }
49
49
  }
50
50
  else
51
51
  {
52
 
    session->my_ok();
 
52
    getSession()->my_ok();
53
53
  }
54
54
 
55
55
  return res;