~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/last_insert.cc

  • Committer: Monty Taylor
  • Date: 2010-06-02 22:35:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1586.
  • Revision ID: mordred@inaugust.com-20100602223545-q8ekf9b40a85nwuf
Rearragned unittests into a single exe because of how we need to link it
(thanks lifeless)
Link with server symbols without needing to build a library.
Added an additional atomics test which tests whatever version of the atomics
lib the running platform would actually use.

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;
30
31
  assert(fixed == 1);
31
32
  if (arg_count)
32
33
  {
39
40
      LAST_INSERT_ID(X) take precedence over an generated auto_increment
40
41
      value for this row.
41
42
    */
42
 
    getSession().arg_of_last_insert_id_function= true;
43
 
    getSession().first_successful_insert_id_in_prev_stmt= value;
44
 
 
 
43
    session->arg_of_last_insert_id_function= true;
 
44
    session->first_successful_insert_id_in_prev_stmt= value;
45
45
    return value;
46
46
  }
47
 
  return getSession().read_first_successful_insert_id_in_prev_stmt();
 
47
  return session->read_first_successful_insert_id_in_prev_stmt();
48
48
}
49
49
 
50
50