~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/last_insert.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-24 15:33:01 UTC
  • mto: (968.2.18 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: osullivan.padraig@gmail.com-20090324153301-90gw63j1lsie1k9j
Removing a very mis-leading comment from sql_locale.cc

The comment was totally wrong and read "This file is build from
my_locale.pl"

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
21
 
 
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
22
22
#include <drizzled/function/last_insert.h>
23
23
#include <drizzled/session.h>
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
int64_t Item_func_last_insert_id::val_int()
29
26
{
 
27
  Session *session= current_session;
30
28
  assert(fixed == 1);
31
29
  if (arg_count)
32
30
  {
39
37
      LAST_INSERT_ID(X) take precedence over an generated auto_increment
40
38
      value for this row.
41
39
    */
42
 
    getSession().arg_of_last_insert_id_function= true;
43
 
    getSession().first_successful_insert_id_in_prev_stmt= value;
44
 
 
 
40
    session->arg_of_last_insert_id_function= true;
 
41
    session->first_successful_insert_id_in_prev_stmt= value;
45
42
    return value;
46
43
  }
47
 
  return getSession().read_first_successful_insert_id_in_prev_stmt();
 
44
  return session->read_first_successful_insert_id_in_prev_stmt();
48
45
}
49
46
 
50
47
 
53
50
  return Item_int_func::fix_fields(session, ref);
54
51
}
55
52
 
56
 
} /* namespace drizzled */