bk commit into 4.1 tree (jan:1.2221) BUG#7061 -
05-04-2005
, 04:52 AM
Below is the list of changes that have just been committed into a local
4.1 repository of jan. When jan does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/in...urce-tree.html
ChangeSet
1.2221 05/05/04 12:01:36 jan (AT) hundin (DOT) mysql.fi +1 -0
Initial value for a auto_increment can now be set using ALTER TABLE
AUTO_INCREMENT = X; or CREATE TABLE .. AUTO_INCREMENT = X; This
change is backported from 5.0 (Bug #7061).
sql/ha_innodb.cc
1.194 05/05/04 12:01:29 jan (AT) hundin (DOT) mysql.fi +18 -3
Initial value for a auto_increment can now be set using ALTER TABLE
AUTO_INCREMENT = X; or CREATE TABLE .. AUTO_INCREMENT = X; This
change is backported from 5.0.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jan
# Host: hundin.mysql.fi
# Root: /home/jan/mysql-4.1
--- 1.193/sql/ha_innodb.cc Wed Apr 27 12:28:18 2005
+++ 1.194/sql/ha_innodb.cc Wed May 4 12:01:29 2005
@@ -1216,7 +1216,7 @@
&innodb_dummy_stmt_trx_handle: the latter means
that the current SQL statement ended */
{
- trx_t* trx;
+ trx_t* trx;
DBUG_ENTER("innobase_commit");
DBUG_PRINT("trans", ("ending transaction"));
@@ -3939,6 +3939,20 @@
DBUG_ASSERT(innobase_table != 0);
+ if ((create_info->used_fields & HA_CREATE_USED_AUTO) &&
+ (create_info->auto_increment_value != 0)) {
+
+ /* Query was ALTER TABLE...AUTO_INCREMENT = x; or
+ CREATE TABLE ...AUTO_INCREMENT = x; Find out a table
+ definition from the dictionary and get the current value
+ of the auto increment field. Set a new value to the
+ auto increment field if the value is greater than the
+ maximum value in the column. */
+
+ auto_inc_value = create_info->auto_increment_value;
+ dict_table_autoinc_initialize(innobase_table, auto_inc_value);
+ }
+
/* Tell the InnoDB server that there might be work for
utility threads: */
@@ -5346,8 +5360,9 @@
/* In case we have innobase_locks_unsafe_for_binlog
option set and isolation level of the transaction
is not set to serializable and MySQL is doing
- INSERT INTO...SELECT without FOR UPDATE or IN
- SHARE MODE we use consistent read for select. */
+ INSERT INTO...SELECT or UPDATE ... = (SELECT ...)
+ without FOR UPDATE or IN SHARE MODE in select, then
+ we use consistent read for select. */
prebuilt->select_lock_type = LOCK_NONE;
prebuilt->stored_select_lock_type = LOCK_NONE;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw |