Commit graph

5 commits

Author SHA1 Message Date
gkodinov/kgeorge@mysql.com/rakia.(none)
2c9f5cc706 BUG#14553: NULL in WHERE resets LAST_INSERT_ID
To make MySQL compatible with some ODBC applications, you can find
the AUTO_INCREMENT value for the last inserted row with the following query:
 SELECT * FROM tbl_name WHERE auto_col IS NULL.
This is done with a special code that replaces 'auto_col IS NULL' with
'auto_col = LAST_INSERT_ID'.
However this also resets the LAST_INSERT_ID to 0 as it uses it for a flag
so as to ensure that only the first SELECT ... WHERE auto_col IS NULL
after an INSERT has this special behaviour.
In order to avoid resetting the LAST_INSERT_ID a special flag is introduced
in the THD class. This flag is used to restrict the second and subsequent
SELECTs instead of LAST_INSERT_ID.
2006-07-10 16:27:03 +03:00
monty@mysql.com
3c12d0ae54 Added end marker for tests to make future merges easier 2005-07-28 03:22:47 +03:00
monty@mashka.mysql.fi
1f6ecc0cd3 Changed mysql-test to print warnings for not existing table to DROP TABLE
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names.
changed store_warning() -> push_warning_print()
2003-01-06 01:48:59 +02:00
bell@sanja.is.com.ua
463c59e1e9 fixed tests to be independed from environment 2002-08-30 21:32:59 +03:00
monty@donna.mysql.com
c0f40d14cc Added support for hex strings to mysqlimport
A lot of new tests to mysqltest
Fixed bug with BDB tables and autocommit
2000-12-28 03:56:38 +02:00