summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <acurtis@pcgem.rdg.cyberkinetica.com>2005-02-03 21:16:36 +0000
committerunknown <acurtis@pcgem.rdg.cyberkinetica.com>2005-02-03 21:16:36 +0000
commit6bfc46f0bf65036fb5beb7b07568125a9bbf88f1 (patch)
tree27885d7343efb04cae48903b6a83702a1ccd6a0d /sql/item_func.cc
parentf8d38cffdf3be872955351fa0c45a8aae53e9e02 (diff)
parent3c925ee0f1b3387e6df952de8f86c618f11c1a8d (diff)
downloadmariadb-git-6bfc46f0bf65036fb5beb7b07568125a9bbf88f1.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into pcgem.rdg.cyberkinetica.com:/var/db/bk/work-acurtis/bug8057 sql/item_func.cc: Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index bff49541252..7d38c44bab3 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2298,14 +2298,10 @@ longlong Item_func_last_insert_id::val_int()
longlong value=args[0]->val_int();
current_thd->insert_id(value);
null_value=args[0]->null_value;
- return value;
}
else
- {
- Item *it= get_system_var(current_thd, OPT_SESSION, "last_insert_id", 14,
- "last_insert_id()");
- return it->val_int();
- }
+ current_thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ return current_thd->insert_id();
}
/* This function is just used to test speed of different functions */