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.
  • MariaDB\ 71.8%
  • C++ 16.4%
  • C 10.4%
  • Shell 0.5%
  • Perl 0.4%
  • Other 0.3%
Find a file
guilhem@gbichot3.local 0594e1b84b WL#3146 "less locking in auto_increment":
this is a cleanup patch for our current auto_increment handling:
new names for auto_increment variables in THD, new methods to manipulate them
(see sql_class.h), some move into handler::, causing less backup/restore
work when executing substatements. 
This makes the logic hopefully clearer, less work is is needed in
mysql_insert().
By cleaning up, using different variables for different purposes (instead
of one for 3 things...), we fix those bugs, which someone may want to fix
in 5.0 too:
BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate
statement-based"
BUG#20341 "stored function inserting into one auto_increment puts bad
data in slave"
BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE"
(now if a row is updated, LAST_INSERT_ID() will return its id)
and re-fixes:
BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT"
(already fixed differently by Ramil in 4.1)
Test of documented behaviour of mysql_insert_id() (there was no test).
The behaviour changes introduced are:
- LAST_INSERT_ID() now returns "the first autogenerated auto_increment value
successfully inserted", instead of "the first autogenerated auto_increment
value if any row was successfully inserted", see auto_increment.test.
Same for mysql_insert_id(), see mysql_client_test.c.
- LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY
UPDATE, see auto_increment.test. Same for mysql_insert_id(), see
mysql_client_test.c.
- LAST_INSERT_ID() does not change if no autogenerated value was successfully 
inserted (it used to then be 0), see auto_increment.test.
- if in INSERT SELECT no autogenerated value was successfully inserted,
mysql_insert_id() now returns the id of the last inserted row (it already
did this for INSERT VALUES), see mysql_client_test.c.
- if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X
(it already did this for INSERT VALUES), see mysql_client_test.c.
- NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE,
the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID
influences not only the first row now.

Additionally, when unlocking a table we check that the thread is not keeping
a next_insert_id (as the table is unlocked that id is potentially out-of-date);
forgetting about this next_insert_id is done in a new
handler::ha_release_auto_increment().

Finally we prepare for engines capable of reserving finite-length intervals
of auto_increment values: we store such intervals in THD. The next step
(to be done by the replication team in 5.1) is to read those intervals from
THD and actually store them in the statement-based binary log. NDB
will be a good engine to test that.
2006-07-09 17:52:19 +02:00
BitKeeper Loosen up crashed repo check a bit to allow merging 5.0 -> 5.1. 2006-06-09 08:40:21 +02:00
BUILD Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2006-06-28 20:03:46 +03:00
client Remove compiler warnings 2006-06-23 02:49:19 +03:00
cmd-line-utils Merge neptunus.(none):/home/msvensson/mysql/bug16557/my50-bug16557 2006-02-21 08:57:18 +01:00
config/ac-macros Merge xiphis.org:/home/antony/work2/p4-bug12096.2 2006-06-22 11:00:01 -07:00
dbug atomic ops: 2006-06-17 16:20:39 +02:00
Docs Remove old cruft from the tree: mysqltestmanager, mysql_test_run_new, 2006-04-11 18:54:24 -07:00
extra Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main 2006-06-16 18:54:20 +10:00
include Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl 2006-06-28 16:44:54 +02:00
libmysql Re-apply missing changeset, orignally pushed by elliot 2006-06-06 14:21:07 +03:00
libmysql_r Re-apply missing changeset, orignally pushed by elliot 2006-06-06 14:21:07 +03:00
libmysqld manual merge 2006-06-20 17:14:36 +02:00
man - Removed obsolete and outdated man page files from the man 2005-10-27 14:51:58 +02:00
mysql-test WL#3146 "less locking in auto_increment": 2006-07-09 17:52:19 +02:00
mysys Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1 2006-06-30 11:17:53 +04:00
netware Merge 2006-06-20 11:11:18 +02:00
plugin Remove compiler warnings 2006-06-23 02:49:19 +03:00
pstack Makefile.am, configure.in: 2005-09-24 15:51:45 +02:00
regex Merge mysql.com:/home/emurphy/src/bk-clean/tmp_merge 2006-06-23 17:27:54 -04:00
scripts Merge mysql.com:/usr/local/mysql/mysql-5.1-bindist 2006-06-30 15:21:45 +02:00
server-tools Merge mysql.com:/usr/local/mysql/mysql-5.1-vg-apr2 2006-06-23 15:05:15 +02:00
sql WL#3146 "less locking in auto_increment": 2006-07-09 17:52:19 +02:00
sql-common Bug#18997: DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value 2006-05-16 03:32:24 +02:00
storage Merge mysql.com:/home/stewart/Documents/MySQL/5.1/bug17928 2006-06-29 22:36:27 +10:00
strings Merge moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt 2006-06-30 16:10:26 +04:00
support-files Manual merge 2006-06-28 19:34:04 +04:00
tests WL#3146 "less locking in auto_increment": 2006-07-09 17:52:19 +02:00
unittest atomic ops: 2006-06-17 16:20:39 +02:00
vio Re-apply missing changeset, orignally pushed by elliot 2006-06-06 14:21:07 +03:00
win Fixing false alarm errors on windows build from a clean clone. 2006-06-15 22:46:52 -04:00
zlib Rename cmakelists.txt -> CMakeLists.txt 2006-05-12 10:51:07 +02:00
.bzrignore Fixed failing test rpl_ndb_auto_inc.test 2006-06-29 03:24:33 +03:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt performing a set of bk mv on each CMakeLists.txt file to try and restore the mixed case filenames since this seems to be required with Cmake 2.4 beta 1. 2006-05-11 11:29:08 -05:00
configure.in Merge xiphis.org:/home/antony/work2/p4-bug12096.2 2006-06-22 11:00:01 -07: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 change test targets to be more modular. include unit tests into make test 2006-06-14 09:12:37 +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.