~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/last_insert.cc

Reverted changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
int64_t Item_func_last_insert_id::val_int()
29
29
{
30
 
  Session *session= current_session;
31
30
  assert(fixed == 1);
32
31
  if (arg_count)
33
32
  {
40
39
      LAST_INSERT_ID(X) take precedence over an generated auto_increment
41
40
      value for this row.
42
41
    */
43
 
    session->arg_of_last_insert_id_function= true;
44
 
    session->first_successful_insert_id_in_prev_stmt= value;
 
42
    getSession().arg_of_last_insert_id_function= true;
 
43
    getSession().first_successful_insert_id_in_prev_stmt= value;
 
44
 
45
45
    return value;
46
46
  }
47
 
  return session->read_first_successful_insert_id_in_prev_stmt();
 
47
  return getSession().read_first_successful_insert_id_in_prev_stmt();
48
48
}
49
49
 
50
50