~clint-fewbar/ubuntu/natty/drizzle/beta1-fixes

« back to all changes in this revision

Viewing changes to drizzled/statement/kill.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-03-15 10:41:18 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110315104118-eaf0hvlytjdl4zrf
Tags: 2011.03.13-0ubuntu1
* New upstream release.
* Added slave plugin.
* Removed archive, blackhole and blitzdb plugins.
* Moved location of libdrizzle headers.
* Removed drizzleadmin manpage patch.
* Add drizzle_safe_write_string to symbols.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
  {
36
36
    if (is_query_kill)
37
37
    {
38
 
      getSession()->getLex()->type= ONLY_KILL_QUERY;
 
38
      lex().type= ONLY_KILL_QUERY;
39
39
    }
40
40
 
41
 
    getSession()->getLex()->value_list.clear();
42
 
    getSession()->getLex()->value_list.push_front(item);
43
 
    getSession()->getLex()->sql_command= SQLCOM_KILL;
 
41
    lex().value_list.clear();
 
42
    lex().value_list.push_front(item);
 
43
    set_command(SQLCOM_KILL);
44
44
  }
45
45
 
46
46
} // namespace statement
47
47
 
48
48
bool statement::Kill::execute()
49
49
{
50
 
  Item *it= &getSession()->getLex()->value_list.front();
 
50
  Item *it= &lex().value_list.front();
51
51
 
52
 
  if ((not it->fixed && it->fix_fields(getSession()->getLex()->session, &it)) || it->check_cols(1))
 
52
  if ((not it->fixed && it->fix_fields(lex().session, &it)) || it->check_cols(1))
53
53
  {
54
54
    my_message(ER_SET_CONSTANTS_ONLY, 
55
55
               ER(ER_SET_CONSTANTS_ONLY),
57
57
    return true;
58
58
  }
59
59
 
60
 
  if (drizzled::kill(*getSession()->user(), static_cast<session_id_t>(it->val_int()), getSession()->getLex()->type & ONLY_KILL_QUERY))
 
60
  if (drizzled::kill(*session().user(), static_cast<session_id_t>(it->val_int()), lex().type & ONLY_KILL_QUERY))
61
61
  {
62
 
    getSession()->my_ok();
 
62
    session().my_ok();
63
63
  }
64
64
  else
65
65
  {