mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #1590 -- Changed MySQL get_last_insert_id() implementation to use cursor.lastrowid instead of a separate SELECT statement. Thanks, Andy Dustman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2645 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -110,8 +110,7 @@ class DatabaseWrapper(local): | ||||
|         return "`%s`" % name | ||||
|  | ||||
| def get_last_insert_id(cursor, table_name, pk_name): | ||||
|     cursor.execute("SELECT LAST_INSERT_ID()") | ||||
|     return cursor.fetchone()[0] | ||||
|     return cursor.lastrowid | ||||
|  | ||||
| def get_date_extract_sql(lookup_type, table_name): | ||||
|     # lookup_type is 'year', 'month', 'day' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user