Hello Dehua, On 10/17/2012 3:33 AM, Dehua Yang wrote:
select LAST_INSERT_ID() ; Under high concurrency , it would return other threads value to you.
Incorrect. The results of LAST_INSERT_ID() are connection-specific. The activity on other connections will not change or alter the value for the current connection. Only actions taken by the current connection can change this value.
http://dev.mysql.com/doc/refman/5.5/en/information-functions.html#function_last-insert-id -- Shawn Green MySQL Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql