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
lars@mysql.com
c99c44805c
Fix of an incorrect merge
2005-02-24 17:25:06 +01:00
mats@mysql.com
6ad51ffb3c
Bug#8412: Merge from 4.0
2005-02-23 19:58:54 +01:00
mats@mysql.com
30bf28202c
Bug#8412: For replication to work correctly, the prologue and
...
epilogue to an SQL statement should not have an error code even
when the SQL statement itself has an error code.
2005-02-14 18:39:33 +01:00
monty@mysql.com
ce14578909
Merge with 4.0.18
2004-02-11 00:06:46 +01:00
heikki@hundin.mysql.fi
be760becac
rpl_insert_id.test, rpl_insert_id.result:
...
Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints
2004-02-02 01:41:35 +02:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
fcf96dbb18
WorkLog#1323
...
Deprecate the use of TYPE=... Preferred syntax is ENGINE=
2003-12-10 04:31:42 +00:00
monty@mashka.mysql.fi
2263e3e51f
Merge with 4.0.14
2003-08-11 22:44:43 +03:00
guilhem@mysql.com
34352d0c21
Make rpl_insert_id.test use InnoDB, and added foreign keys to the table,
...
so that it really tests replication of SET FOREIGN_KEY_CHECKS (previously
it used MyISAM).
2003-07-26 17:59:05 +02:00
monty@narttu.mysql.fi
40109c574a
Merge with 4.0.13
2003-06-04 19:21:51 +03:00
guilhem@mysql.com
97f9aa2aaf
temporary update of the test to satisfy merge; will commit a final update
...
soon.
2003-05-27 14:50:14 +02:00
monty@narttu.mysql.fi
4ead61f873
code cleanup
2003-05-26 15:08:17 +03:00
guilhem@mysql.com
8a1e18f4cb
Fix for bug #490 and #491 (see details below)
2003-05-24 16:43:53 +02:00
monty@mashka.mysql.fi
c4e7cbe158
after merge fix
2003-02-08 02:09:21 +02:00
monty@mashka.mysql.fi
25de9c19b2
After merge fixes & remove compiler warnings
...
Added lengths for all MYSQL_FIELD string parameters
Changed field length to 2 byte in .frm files
2003-02-07 15:47:24 +02:00
monty@mashka.mysql.fi
279f43a198
Updated results for 4.0
2003-01-28 09:17:10 +02:00
monty@mashka.mysql.fi
710ffb2d89
Fix when using auto_increment and last_insert_id() in the same insert statement.
2003-01-28 06:48:26 +02:00