MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
kroki/tomash@moonlight.intranet 5ea8adfae7 BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID
Non-upper-level INSERTs (the ones in the body of stored procedure,
stored function, or trigger) into a table that have AUTO_INCREMENT
column didn't affected the result of LAST_INSERT_ID() on this level.

The problem was introduced with the fix of bug 6880, which in turn was
introduced with the fix of bug 3117, where current insert_id value was
remembered on the first call to LAST_INSERT_ID() (bug 3117) and was
returned from that function until it was reset before the next
_upper-level_ statement (bug 6880).

The fix for bug#21726 brings back the behaviour of version 4.0, and
implements the following: remember insert_id value at the beginning
of the statement or expression (which at that point equals to
the first insert_id value generated by the previous statement), and
return that remembered value from LAST_INSERT_ID() or @@LAST_INSERT_ID.

Thus, the value returned by LAST_INSERT_ID() is not affected by values
generated by current statement, nor by LAST_INSERT_ID(expr) calls in
this statement.

Version 5.1 does not have this bug (it was fixed by WL 3146).
2006-10-02 14:28:23 +04:00
bdb make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
BitKeeper Fix for bug #19121: Windows incompatible udf_example 2006-09-22 14:42:43 +02:00
BUILD Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0 2006-09-01 10:20:35 +02:00
client Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl 2006-09-23 06:00:50 +02:00
cmd-line-utils Merge neptunus.(none):/home/msvensson/mysql/bug16557/my50-bug16557 2006-02-21 08:58:19 +01:00
config/ac-macros Bug#21327 OpenSSL-checking in configure 2006-08-14 20:16:47 +02:00
dbug make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
Docs Add a dummy file for "Docs/manual.chm" as we need it for "make dist" to work. 2006-09-21 17:38:42 +02:00
extra Bug#22326 Build problems on hurd-i386: conflicting declaration of socklen_t 2006-09-15 15:41:04 +02:00
heap make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
include after merge fix 2006-09-27 19:21:29 +05:00
innobase make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
libmysql make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
libmysql_r Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
libmysqld bug #16513 (no mysql_set_server_option in libmysqld.dll export) 2006-08-19 15:15:36 +05:00
man Makefile.am, configure.in: 2006-07-28 23:12:40 +02:00
myisam Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0 2006-09-28 10:36:04 +02:00
myisammrg make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
mysql-test BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID 2006-10-02 14:28:23 +04:00
mysys Merge mysql.com:/home/hf/work/mysql-4.1.15428 2006-09-25 16:44:53 +05:00
ndb Merge msvensson.mysql.internal:mysql/my50-m-bug16574 2006-09-15 16:55:47 +02:00
netware Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0 2006-07-24 10:59:51 +02:00
os2 Merge 2005-09-29 03:20:31 +02:00
pstack Makefile.am, configure.in: 2005-09-24 15:51:45 +02:00
regex make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
scripts Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1 2006-09-25 01:32:55 +02:00
server-tools make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
sql BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID 2006-10-02 14:28:23 +04:00
sql-bench Set thread_stack after return from end_thread() 2005-12-03 18:13:06 +02:00
sql-common Merge mysql.com:/home/gluh/MySQL/Merge/4.1 2006-09-27 18:06:46 +05:00
SSL Remove client-req-pem and server-req.pem 2006-05-03 11:53:16 +02:00
strings make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
support-files Merge mysql.com:/Users/kent/mysql/bk/bug17194/my50-bug17194 2006-08-24 14:51:54 +02:00
tests BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID 2006-10-02 14:28:23 +04:00
tools Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
VC++Files Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-06 16:47:49 +02:00
vio Merge shellback.(none):/home/msvensson/mysql/work/my50-work 2006-09-15 14:31:25 +02:00
win Additional files for cmake support 2006-08-31 19:52:42 +02:00
zlib make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
.bzrignore Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl 2006-09-23 05:58:48 +02:00
.cvsignore
CMakeLists.txt Additional files for cmake support 2006-08-31 19:52:42 +02:00
configure.in Merge trift2.:/MySQL/M50/extract1-5.0 2006-09-21 16:48:31 +02:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
Makefile.am make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
README README: 2006-04-01 04:13:33 +02:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file.
- For commercial distributions, see the MySQLEULA.txt file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter.
- For future plans, see the TODO appendix.
- For the new features/bugfix history, see the News appendix.
- For the currently known bugs/misfeatures (known errors) see the problems
  appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.