diff options
author | unknown <serg@sergbook.mysql.com> | 2002-07-21 23:55:32 +0200 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2002-07-21 23:55:32 +0200 |
commit | 4eff0593d6f501075ab97bbc43b7076dfb636cb3 (patch) | |
tree | 18b81d0250f43e62349dfb3c0cb2dde8af33f444 /mysql-test/r/merge.result | |
parent | 13b326f105eb6904aaa69115e244e52a7f71615b (diff) | |
download | mariadb-git-4eff0593d6f501075ab97bbc43b7076dfb636cb3.tar.gz |
AUTO_INCREMENT support for MERGE
HA_AUTO_PART_KEY support for handler parent class
Docs/manual.texi:
AUTO_INCREMENT support for MERGE
mysql-test/r/merge.result:
AUTO_INCREMENT support for MERGE
sql/ha_myisammrg.cc:
AUTO_INCREMENT support for MERGE
sql/ha_myisammrg.h:
AUTO_INCREMENT support for MERGE
sql/handler.cc:
default handler::update_auto_increment now supports HA_AUTO_PART_KEY
Diffstat (limited to 'mysql-test/r/merge.result')
-rw-r--r-- | mysql-test/r/merge.result | 87 |
1 files changed, 77 insertions, 10 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index f6ca2acc91c..b95352a9eaa 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -275,12 +275,12 @@ a b 1 2 drop table t3,t1,t2; drop table if exists t6, t5, t4, t3, t2, t1; -create table t1 (a int not null, b int not null, key(a,b)); -create table t2 (a int not null, b int not null, key(a,b)); +create table t1 (a int not null, b int not null auto_increment, primary key(a,b)); +create table t2 (a int not null, b int not null auto_increment, primary key(a,b)); create table t3 (a int not null, b int not null, key(a,b)) UNION=(t1,t2) INSERT_METHOD=NO; create table t4 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=NO; -create table t5 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST; -create table t6 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST; +create table t5 (a int not null, b int not null auto_increment, primary key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST; +create table t6 (a int not null, b int not null auto_increment, primary key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( @@ -299,18 +299,18 @@ show create table t5; Table Create Table t5 CREATE TABLE `t5` ( `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', - KEY `a` (`a`,`b`) + `b` int(11) NOT NULL auto_increment, + PRIMARY KEY (`a`,`b`) ) TYPE=MRG_MyISAM INSERT_METHOD=FIRST UNION=(t1,t2) show create table t6; Table Create Table t6 CREATE TABLE `t6` ( `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', - KEY `a` (`a`,`b`) + `b` int(11) NOT NULL auto_increment, + PRIMARY KEY (`a`,`b`) ) TYPE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1,t2) -insert into t1 values (1,1),(1,2),(1,3),(1,4); -insert into t2 values (2,1),(2,2),(2,3),(2,4); +insert into t1 values (1,NULL),(1,NULL),(1,NULL),(1,NULL); +insert into t2 values (2,NULL),(2,NULL),(2,NULL),(2,NULL); select * from t3 order by b,a limit 3; a b select * from t4 order by b,a limit 3; @@ -461,6 +461,73 @@ a b 5 2 6 1 6 2 +select 1; +1 +1 +insert into t5 values (1,NULL),(5,NULL); +insert into t6 values (2,NULL),(6,NULL); +select * from t1 order by a,b; +a b +1 1 +1 2 +1 3 +1 4 +1 5 +4 1 +4 2 +5 1 +5 2 +5 3 +select * from t2 order by a,b; +a b +2 1 +2 2 +2 3 +2 4 +2 5 +6 1 +6 2 +6 3 +select * from t5 order by a,b; +a b +1 1 +1 2 +1 3 +1 4 +1 5 +2 1 +2 2 +2 3 +2 4 +2 5 +4 1 +4 2 +5 1 +5 2 +5 3 +6 1 +6 2 +6 3 +select * from t6 order by a,b; +a b +1 1 +1 2 +1 3 +1 4 +1 5 +2 1 +2 2 +2 3 +2 4 +2 5 +4 1 +4 2 +5 1 +5 2 +5 3 +6 1 +6 2 +6 3 drop table if exists t6, t5, t4, t3, t2, t1; CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) TYPE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,1); |