List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:April 28 2006 12:07am
Subject:bk commit into 5.0 tree (tnurnberg:1.2105)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of azundris. When azundris 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/installing-source-tree.html

ChangeSet
  1.2105 06/04/28 02:07:16 tnurnberg@stripped +7 -0
  Merge mysql.com:/home/mysql-4.1-19025
  into  mysql.com:/home/mysql-5.0-maint-19025

  sql/sql_show.cc
    1.314 06/04/28 02:07:12 tnurnberg@stripped +0 -0
    Add AUTO_INCREMENT=... to output of SHOW CREATE TABLE if there is an
    AUTO_INCREMENT column, and NEXT_ID > 1 (the default).  We must not print
    the clause for engines that do not support this as it would break the
    import of dumps, but as of this writing, the test for whether
    AUTO_INCREMENT columns are allowed and wether AUTO_INCREMENT=...
    is supported is identical, !(file->table_flags() & HA_NO_AUTO_INCREMENT))
    Because of that, we do not explicitly test for the feature,
    but may extrapolate its existence from that of an AUTO_INCREMENT column.

  mysql-test/t/mysqldump.test
    1.85 06/04/28 02:07:12 tnurnberg@stripped +0 -30
    test adapted to the new SHOW CREATE TABLE (AUTO_INCREMENT=...) syntax.

  mysql-test/r/symlink.result
    1.22 06/04/28 02:07:12 tnurnberg@stripped +2 -4
    test adapted to the new SHOW CREATE TABLE (AUTO_INCREMENT=...) syntax.

  mysql-test/r/mysqldump.result
    1.93 06/04/28 02:07:12 tnurnberg@stripped +0 -37
    show that AUTO_INCREMENT=... value remains stable through dump/restore cycles

  mysql-test/r/auto_increment.result
    1.35 06/04/28 02:07:12 tnurnberg@stripped +0 -0
    show that SHOW CREATE TABLE will generate AUTO_INCREMENT=... clause for tables
    with an AUTO_INCREMENT column that has a next_ID > 1

  mysql-test/t/auto_increment.test
    1.25 06/04/28 00:55:56 tnurnberg@stripped +0 -0
    Auto merged

  mysql-test/r/gis-rtree.result
    1.15 06/04/28 00:55:56 tnurnberg@stripped +0 -0
    Auto merged

# 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:	tnurnberg
# Host:	salvation.intern.azundris.com
# Root:	/home/mysql-5.0-maint-19025/RESYNC

--- 1.313/sql/sql_show.cc	2006-03-20 11:17:41 +01:00
+++ 1.314/sql/sql_show.cc	2006-04-28 02:07:12 +02:00
@@ -1005,6 +1005,24 @@
       packet->append(STRING_WITH_LEN(" ENGINE="));
     packet->append(file->table_type());
     
+    /*
+      Add AUTO_INCREMENT=... if there is an AUTO_INCREMENT column,
+      and NEXT_ID > 1 (the default).  We must not print the clause
+      for engines that do not support this as it would break the
+      import of dumps, but as of this writing, the test for whether
+      AUTO_INCREMENT columns are allowed and wether AUTO_INCREMENT=...
+      is supported is identical, !(file->table_flags() & HA_NO_AUTO_INCREMENT))
+      Because of that, we do not explicitly test for the feature,
+      but may extrapolate its existence from that of an AUTO_INCREMENT column.
+    */
+
+    if(create_info.auto_increment_value > 1)
+    {
+      packet->append(" AUTO_INCREMENT=", 16);
+      end= longlong10_to_str(create_info.auto_increment_value, buff,10);
+      packet->append(buff, (uint) (end - buff));
+    }
+    
     if (share->table_charset &&
 	!(thd->variables.sql_mode & MODE_MYSQL323) &&
 	!(thd->variables.sql_mode & MODE_MYSQL40))

--- 1.34/mysql-test/r/auto_increment.result	2005-06-06 19:41:49 +02:00
+++ 1.35/mysql-test/r/auto_increment.result	2006-04-28 02:07:12 +02:00
@@ -355,6 +355,29 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 DROP TABLE IF EXISTS t1;
+CREATE TABLE `t1` (
+t1_name VARCHAR(255) DEFAULT NULL,
+t1_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+KEY (t1_name),
+PRIMARY KEY (t1_id)
+) AUTO_INCREMENT = 1000;
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+SELECT * from t1;
+t1_name	t1_id
+MySQL	1000
+MySQL	1001
+MySQL	1002
+SHOW CREATE TABLE `t1`;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `t1_name` varchar(255) default NULL,
+  `t1_id` int(10) unsigned NOT NULL auto_increment,
+  PRIMARY KEY  (`t1_id`),
+  KEY `t1_name` (`t1_name`)
+) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
+DROP TABLE `t1`;
 CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY  (`a`),UNIQUE KEY `b` (`b`));
 insert into t1 (b) values (1);
 replace into t1 (b) values (2), (1), (3);

--- 1.24/mysql-test/t/auto_increment.test	2005-07-28 16:09:48 +02:00
+++ 1.25/mysql-test/t/auto_increment.test	2006-04-28 00:55:56 +02:00
@@ -219,6 +219,25 @@
 CHECK TABLE t1;
 DROP TABLE IF EXISTS t1;
 
+# BUG #19025:
+
+CREATE TABLE `t1` (
+    t1_name VARCHAR(255) DEFAULT NULL,
+    t1_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+    KEY (t1_name),
+    PRIMARY KEY (t1_id)
+) AUTO_INCREMENT = 1000;
+
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+
+SELECT * from t1;
+
+SHOW CREATE TABLE `t1`;
+
+DROP TABLE `t1`;
+
 # End of 4.1 tests
 
 #

--- 1.21/mysql-test/r/symlink.result	2006-01-24 08:30:47 +01:00
+++ 1.22/mysql-test/r/symlink.result	2006-04-28 02:07:12 +02:00
@@ -40,7 +40,7 @@
   `b` char(16) NOT NULL,
   `c` int(11) NOT NULL,
   PRIMARY KEY  (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
+) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
 alter table t9 rename t8, add column d int not null;
 alter table t8 rename t7;
 rename table t7 to t9;
@@ -71,7 +71,7 @@
   `c` int(11) NOT NULL,
   `d` int(11) NOT NULL,
   PRIMARY KEY  (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
+) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
 drop database mysqltest;
 create table t1 (a int not null) engine=myisam;
 show create table t1;

--- 1.14/mysql-test/r/gis-rtree.result	2005-08-27 15:10:39 +02:00
+++ 1.15/mysql-test/r/gis-rtree.result	2006-04-28 00:55:56 +02:00
@@ -294,7 +294,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY  (`fid`),
   SPATIAL KEY `g` (`g`(32))
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=latin1
 SELECT count(*) FROM t2;
 count(*)
 100
Thread
bk commit into 5.0 tree (tnurnberg:1.2105)Tatjana A Nuernberg28 Apr