summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <kroki/tomash@moonlight.intranet>2006-10-02 17:00:39 +0400
committerunknown <kroki/tomash@moonlight.intranet>2006-10-02 17:00:39 +0400
commit990763fe89037ee970be236c26e35c5333b76184 (patch)
tree9f5784105ae7b50d6dbac5500ac0a7dcd0a0b300 /sql/sql_insert.cc
parent3ab74528fa9abac7c00e88614589b188bfb327d0 (diff)
parentbe929087ec9a5b4e161591fcebab9687472779eb (diff)
downloadmariadb-git-990763fe89037ee970be236c26e35c5333b76184.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-real-bug21726 sql/sql_insert.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index d654b184613..2ce83caa369 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -590,10 +590,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
#endif
error=write_record(thd, table ,&info);
/*
- If auto_increment values are used, save the first one
- for LAST_INSERT_ID() and for the update log.
- We can't use insert_id() as we don't want to touch the
- last_insert_id_used flag.
+ If auto_increment values are used, save the first one for
+ LAST_INSERT_ID() and for the update log.
*/
if (! id && thd->insert_id_used)
{ // Get auto increment value
@@ -2493,7 +2491,7 @@ bool select_insert::send_data(List<Item> &values)
*/
table->next_number_field->reset();
if (!last_insert_id && thd->insert_id_used)
- last_insert_id= thd->insert_id();
+ last_insert_id= thd->last_insert_id;
}
}
DBUG_RETURN(error);