From f272d3272a42957b32cb7a1a6ece0cc5ba847561 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 May 2006 15:19:17 +0200 Subject: ndb - bug#14509, part 1: move autoincr pre-fetch from Ndb to local dict cache mysql-test/r/ndb_alter_table.result: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id mysql-test/t/ndb_alter_table.test: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id ndb/include/ndbapi/Ndb.hpp: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id ndb/src/ndbapi/DictCache.cpp: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id ndb/src/ndbapi/DictCache.hpp: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id ndb/src/ndbapi/Ndb.cpp: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id ndb/src/ndbapi/NdbDictionaryImpl.cpp: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id ndb/src/ndbapi/Ndbinit.cpp: bug#14509, part 1 move cached autoincr range from Ndb object to local dict cache (Ndb_local_table_info) remove private methods get/read/setTupleId by table name or table id --- mysql-test/r/ndb_alter_table.result | 23 ++++++++++++++++++++++- mysql-test/t/ndb_alter_table.test | 17 ++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result index acb67250c26..89999eca051 100644 --- a/mysql-test/r/ndb_alter_table.result +++ b/mysql-test/r/ndb_alter_table.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1, t2; drop database if exists mysqltest; CREATE TABLE t1 ( a INT NOT NULL, @@ -315,3 +315,24 @@ unique key tx1 (c002, c003, c004, c005)) engine=ndb; create index tx2 on t1 (c010, c011, c012, c013); drop table t1; +create table t1 (a int primary key auto_increment, b int) engine=ndb; +insert into t1 (b) values (101),(102),(103); +select * from t1 where a = 3; +a b +3 103 +alter table t1 rename t2; +insert into t2 (b) values (201),(202),(203); +select * from t2 where a = 6; +a b +6 203 +alter table t2 add c int; +insert into t2 (b) values (301),(302),(303); +select * from t2 where a = 9; +a b c +9 303 NULL +alter table t2 rename t1; +insert into t1 (b) values (401),(402),(403); +select * from t1 where a = 12; +a b c +12 403 NULL +drop table t1; diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test index 0a0211c8c83..957b95c6fd9 100644 --- a/mysql-test/t/ndb_alter_table.test +++ b/mysql-test/t/ndb_alter_table.test @@ -3,7 +3,7 @@ -- source include/not_embedded.inc --disable_warnings -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1, t2; drop database if exists mysqltest; --enable_warnings @@ -326,5 +326,20 @@ on t1 (c010, c011, c012, c013); drop table t1; +# simple test that auto incr is not lost at rename or alter +create table t1 (a int primary key auto_increment, b int) engine=ndb; +insert into t1 (b) values (101),(102),(103); +select * from t1 where a = 3; +alter table t1 rename t2; +insert into t2 (b) values (201),(202),(203); +select * from t2 where a = 6; +alter table t2 add c int; +insert into t2 (b) values (301),(302),(303); +select * from t2 where a = 9; +alter table t2 rename t1; +insert into t1 (b) values (401),(402),(403); +select * from t1 where a = 12; +drop table t1; + # End of 4.1 tests -- cgit v1.2.1 From db5d19741402294761fb0194d29b3cb6313fdf97 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 May 2006 18:54:43 -0700 Subject: Fixed bug #19089. When a CREATE TABLE command created a table from a materialized view id does not inherit default values from the underlying table. Moreover the temporary table used for the view materialization does not inherit those default values. In the case when the underlying table contained ENUM fields it caused misleading error messages. In other cases the created table contained wrong default values. The code was modified to ensure inheritance of default values for materialized views. mysql-test/r/view.result: Added a test case for bug #19089. mysql-test/t/view.test: Added a test case for bug #19089. sql/field.cc: Fixed bug ##19089. Added field dflt_field to the class Field. This field is set for temp table fields that inherits default values of items from which they are created. sql/field.h: Fixed bug ##19089. Added field dflt_field to the class Field. This field is set for temp table fields that inherits default values of items from which they are created. sql/sql_select.cc: Fixed bug #19089. When a CREATE TABLE command created a table from a materialized view id does not inherit default values from the underlying table. Moreover the temporary table used for the view materialization does not inherit those default values. The code was modified to ensure inheritance of default values for materialized views. --- mysql-test/r/view.result | 42 ++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/view.test | 31 +++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 667d10cd145..4edee82029d 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2649,3 +2649,45 @@ ldt 2006-01-01 03:00:00 drop view v1, v2; drop table t1; +CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx'); +INSERT INTO t1(id) VALUES (1), (2), (3), (4); +INSERT INTO t1 VALUES (5,'yyy'), (6,'yyy'); +SELECT * FROM t1; +id a +1 xxx +2 xxx +3 xxx +4 xxx +5 yyy +6 yyy +CREATE VIEW v1(a, m) AS SELECT a, MIN(id) FROM t1 GROUP BY a; +SELECT * FROM v1; +a m +xxx 1 +yyy 5 +CREATE TABLE t2 SELECT * FROM v1; +INSERT INTO t2(m) VALUES (0); +SELECT * FROM t2; +a m +xxx 1 +yyy 5 +NULL 0 +DROP VIEW v1; +DROP TABLE t1,t2; +CREATE TABLE t1 (id int PRIMARY KEY, e ENUM('a','b') NOT NULL DEFAULT 'b'); +INSERT INTO t1(id) VALUES (1), (2), (3); +INSERT INTO t1 VALUES (4,'a'); +SELECT * FROM t1; +id e +1 b +2 b +3 b +4 a +CREATE VIEW v1(m, e) AS SELECT MIN(id), e FROM t1 GROUP BY e; +CREATE TABLE t2 SELECT * FROM v1; +SELECT * FROM t2; +m e +4 a +1 b +DROP VIEW v1; +DROP TABLE IF EXISTS t1,t2; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 8f759c2d43e..d4f7876d75f 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -2512,3 +2512,34 @@ create view v2 as select convert_tz(dt, 'UTC', 'Europe/Moscow') as ldt from v1; select * from v2; drop view v1, v2; drop table t1; + +# +# Bug #19089: wrong inherited dafault values in temp table views +# + +CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx'); +INSERT INTO t1(id) VALUES (1), (2), (3), (4); +INSERT INTO t1 VALUES (5,'yyy'), (6,'yyy'); +SELECT * FROM t1; + +CREATE VIEW v1(a, m) AS SELECT a, MIN(id) FROM t1 GROUP BY a; +SELECT * FROM v1; + +CREATE TABLE t2 SELECT * FROM v1; +INSERT INTO t2(m) VALUES (0); +SELECT * FROM t2; + +DROP VIEW v1; +DROP TABLE t1,t2; + +CREATE TABLE t1 (id int PRIMARY KEY, e ENUM('a','b') NOT NULL DEFAULT 'b'); +INSERT INTO t1(id) VALUES (1), (2), (3); +INSERT INTO t1 VALUES (4,'a'); +SELECT * FROM t1; + +CREATE VIEW v1(m, e) AS SELECT MIN(id), e FROM t1 GROUP BY e; +CREATE TABLE t2 SELECT * FROM v1; +SELECT * FROM t2; + +DROP VIEW v1; +DROP TABLE IF EXISTS t1,t2; -- cgit v1.2.1 From 321708d36d442f8a2b8603856adae8e817f469a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 May 2006 07:57:46 -0700 Subject: Post-review fixes for bug #19089 mysql-test/r/view.result: Post-review fixes. sql/field.cc: Post-review fixes. sql/field.h: Post-review fixes. sql/sql_select.cc: Post-review fixes. --- mysql-test/r/view.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 6c2db5962dd..2aab169ba76 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2716,7 +2716,7 @@ SELECT * FROM t2; a m xxx 1 yyy 5 -NULL 0 +xxx 0 DROP VIEW v1; DROP TABLE t1,t2; CREATE TABLE t1 (id int PRIMARY KEY, e ENUM('a','b') NOT NULL DEFAULT 'b'); -- cgit v1.2.1 From 2d98d2438b94bb4e8a829d507cfddef466ad4388 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 May 2006 12:45:25 +0500 Subject: Bug#16681 information_schema shows forbidden VIEW details show view definition to users that have the needed privilleges mysql-test/r/information_schema.result: Bug#16681 information_schema shows forbidden VIEW details test case mysql-test/t/information_schema.test: Bug#16681 information_schema shows forbidden VIEW details test case --- mysql-test/r/information_schema.result | 13 +++++++++++++ mysql-test/t/information_schema.test | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 633b11e1f1b..e2d265d7ab9 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1108,3 +1108,16 @@ routine_name delete from proc where name=''; use test; +grant select on test.* to mysqltest_1@localhost; +create table t1 (id int); +create view v1 as select * from t1; +create definer = mysqltest_1@localhost +sql security definer view v2 as select 1; +select * from information_schema.views +where table_name='v1' or table_name='v2'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL test v1 NONE YES root@localhost DEFINER +NULL test v2 select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER +drop view v1, v2; +drop table t1; +drop user mysqltest_1@localhost; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index e96f1ef4bbd..2cf7a810cdb 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -822,3 +822,22 @@ INSERT INTO `proc` VALUES ('test','','PROCEDURE','','SQL','CONTAINS_SQL', select routine_name from information_schema.routines; delete from proc where name=''; use test; + +# +# Bug#16681 information_schema shows forbidden VIEW details +# +grant select on test.* to mysqltest_1@localhost; +create table t1 (id int); +create view v1 as select * from t1; +create definer = mysqltest_1@localhost +sql security definer view v2 as select 1; + +connect (con16681,localhost,mysqltest_1,,test); +connection con16681; + +select * from information_schema.views +where table_name='v1' or table_name='v2'; +connection default; +drop view v1, v2; +drop table t1; +drop user mysqltest_1@localhost; -- cgit v1.2.1 From fc2e96ee7b5bf2c0370310c12ec260705dfe0318 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 May 2006 13:27:45 +0500 Subject: Fix for bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode transfer NO_DEFAULT_VALUE_FLAG flag to new field mysql-test/r/strict.result: Fix for bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode test case mysql-test/r/type_ranges.result: Fix for bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode result fix mysql-test/t/strict.test: Fix for bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode test case --- mysql-test/r/strict.result | 10 ++++++++++ mysql-test/r/type_ranges.result | 4 ++-- mysql-test/t/strict.test | 10 ++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 2b1a47ed337..271cd7bf486 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1288,3 +1288,13 @@ ERROR 22001: Data too long for column 'a' at row 1 select * from t1; a drop table t1; +set sql_mode='traditional'; +create table t1 (date date not null); +create table t2 select date from t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `date` date NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t2,t1; +set @@sql_mode= @org_mode; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index bcdba3dca76..bd89c09e94d 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -241,7 +241,7 @@ Field Type Collation Null Key Default Extra Privileges Comment auto int(5) unsigned NULL NO 0 # string char(10) latin1_swedish_ci YES newdefault # tiny tinyint(4) NULL NO 0 # -short smallint(6) NULL NO 0 # +short smallint(6) NULL NO # medium mediumint(8) NULL NO 0 # long_int int(11) NULL NO 0 # longlong bigint(13) NULL NO 0 # @@ -259,7 +259,7 @@ date_time datetime NULL YES NULL # new_blob_col varchar(20) latin1_swedish_ci YES NULL # tinyblob_col tinyblob NULL YES NULL # mediumblob_col mediumblob NULL NO # -options enum('one','two','tree') latin1_swedish_ci NO one # +options enum('one','two','tree') latin1_swedish_ci NO # flags set('one','two','tree') latin1_swedish_ci NO # new_field char(10) latin1_swedish_ci NO new # select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null))); diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index d3b36cbc2a8..5044a20ae9f 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -1145,3 +1145,13 @@ create table t1(a bit(2)); insert into t1 values(b'101'); select * from t1; drop table t1; + +# +# Bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode +# +set sql_mode='traditional'; +create table t1 (date date not null); +create table t2 select date from t1; +show create table t2; +drop table t2,t1; +set @@sql_mode= @org_mode; -- cgit v1.2.1 From 1e12f9462b4cbdbafe3ed48a446076979fab38bf Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 May 2006 07:37:03 -0400 Subject: BUG#19304: Merge handler allowed in partitioned tables mysql-test/r/partition.result: New test case mysql-test/t/partition.test: New test case sql/partition_info.cc: Check for not merge handler in partitioned table sql/share/errmsg.txt: New error message --- mysql-test/r/partition.result | 4 ++++ mysql-test/t/partition.test | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 0da071374ea..707c5981b2d 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -886,4 +886,8 @@ s1 2 3 drop table t1; +create table t1 (a int) +partition by key (a) +(partition p0 engine = MERGE); +ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 272cdc27af6..1bf4ba9613c 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1009,4 +1009,12 @@ select auto_increment from information_schema.tables where table_name='t1'; select * from t1; drop table t1; +# +# BUG 19304 Partitions: MERGE handler not allowed in partitioned tables +# +--error ER_PARTITION_MERGE_ERROR +create table t1 (a int) +partition by key (a) +(partition p0 engine = MERGE); + --echo End of 5.1 tests -- cgit v1.2.1 From 0f5df8e1612c97ebdb7959fde62c91a51f796868 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 May 2006 07:39:35 -0400 Subject: BUG#17455: Wrong results from Repair/Optimize .. table for partitioned tables mysql-test/r/partition.result: New test case mysql-test/t/partition.test: New test case sql/ha_partition.cc: Fixed error handling --- mysql-test/r/partition.result | 10 ++++++++++ mysql-test/t/partition.test | 13 +++++++++++++ 2 files changed, 23 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 0da071374ea..fbcd688798f 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -886,4 +886,14 @@ s1 2 3 drop table t1; +create table t1 (a int) +engine=MEMORY +partition by key (a); +REPAIR TABLE t1; +Table Op Msg_type Msg_text +test.t1 repair note The storage engine for the table doesn't support repair +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize note The storage engine for the table doesn't support optimize +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 272cdc27af6..6461f24ffd2 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1009,4 +1009,17 @@ select auto_increment from information_schema.tables where table_name='t1'; select * from t1; drop table t1; +# +# Bug 17455 Partitions: Wrong message and error when using Repair/Optimize +# table on partitioned table +# +create table t1 (a int) +engine=MEMORY +partition by key (a); + +REPAIR TABLE t1; +OPTIMIZE TABLE t1; + +drop table t1; + --echo End of 5.1 tests -- cgit v1.2.1 From b6553aacc2f78158a5896aa0d111ec82b9bcc409 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 May 2006 13:57:21 -0400 Subject: manual merge --- mysql-test/t/partition.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index f7ce146c109..f697005d6bd 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1064,4 +1064,18 @@ ALTER TABLE t1 DISABLE KEYS; ALTER TABLE t1 ENABLE KEYS; DROP TABLE t1; +# +# Bug 17455 Partitions: Wrong message and error when using Repair/Optimize +# table on partitioned table +# +create table t1 (a int) +engine=MEMORY +partition by key (a); + +REPAIR TABLE t1; +OPTIMIZE TABLE t1; + +drop table t1; +>>>>>>> + --echo End of 5.1 tests -- cgit v1.2.1 From 2aa3ff8eb90b8fcbee4b690aa21e9fc8791b0538 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 May 2006 12:13:47 +0200 Subject: ndb - bug#14509 v5.1 part 2/2 : handler level mysql-test/r/ndb_basic.result: put auto-incr range under NDB_SHARE until otherwise decided.. makes auto-incr process-global per table. each use requires mutex mysql-test/t/ndb_alter_table.test: put auto-incr range under NDB_SHARE until otherwise decided.. makes auto-incr process-global per table. each use requires mutex sql/ha_ndbcluster.cc: put auto-incr range under NDB_SHARE until otherwise decided.. makes auto-incr process-global per table. each use requires mutex sql/ha_ndbcluster.h: put auto-incr range under NDB_SHARE until otherwise decided.. makes auto-incr process-global per table. each use requires mutex --- mysql-test/r/ndb_basic.result | 48 +++++++++++++++++++-------------------- mysql-test/t/ndb_alter_table.test | 30 ++++++++++++------------ 2 files changed, 39 insertions(+), 39 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result index 9477caf97ab..997a94d0afa 100644 --- a/mysql-test/r/ndb_basic.result +++ b/mysql-test/r/ndb_basic.result @@ -649,30 +649,30 @@ counter datavalue 6 newval 7 newval 8 newval -35 newval -36 newval -37 newval -38 newval -39 newval -40 newval -41 newval -42 newval -43 newval -44 newval -45 newval -46 newval -47 newval -48 newval -49 newval -50 newval -51 newval -52 newval -53 newval -54 newval -55 newval -56 newval -57 newval -58 newval +9 newval +10 newval +11 newval +12 newval +13 newval +14 newval +15 newval +16 newval +17 newval +18 newval +19 newval +20 newval +21 newval +22 newval +23 newval +24 newval +25 newval +26 newval +27 newval +28 newval +29 newval +30 newval +31 newval +32 newval drop table t1; CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; select * from t1; diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test index cd5c4819c51..8e3b4a6ca89 100644 --- a/mysql-test/t/ndb_alter_table.test +++ b/mysql-test/t/ndb_alter_table.test @@ -325,21 +325,6 @@ on t1 (c010, c011, c012, c013); drop table t1; -# simple test that auto incr is not lost at rename or alter -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -drop table t1; - # End of 4.1 tests # On-line alter table @@ -398,3 +383,18 @@ LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; DROP TABLE t1, ndb_show_tables; + +# simple test that auto incr is not lost at rename or alter +create table t1 (a int primary key auto_increment, b int) engine=ndb; +insert into t1 (b) values (101),(102),(103); +select * from t1 where a = 3; +alter table t1 rename t2; +insert into t2 (b) values (201),(202),(203); +select * from t2 where a = 6; +alter table t2 add c int; +insert into t2 (b) values (301),(302),(303); +select * from t2 where a = 9; +alter table t2 rename t1; +insert into t1 (b) values (401),(402),(403); +select * from t1 where a = 12; +drop table t1; -- cgit v1.2.1 From 597ceb3bc0bc922a1d14f68032192eb05ea8141b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 May 2006 19:20:35 +0500 Subject: test fix --- mysql-test/r/partition.result | 8 ++++---- mysql-test/t/partition.test | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 71d4f1bb376..3be9f3edee2 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -890,15 +890,15 @@ s1 2 3 drop table t1; -create table t1 (a int) -partition by key (a) -(partition p0 engine = MERGE); -ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables create table t1 (a int) engine=memory partition by key(a); insert into t1 values (1); create index inx1 on t1(a); drop table t1; +create table t1 (a int) +partition by key (a) +(partition p0 engine = MERGE); +ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables create table t1 (a varchar(1)) partition by key (a) as select 'a'; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index f697005d6bd..a24124d3fb5 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1076,6 +1076,5 @@ REPAIR TABLE t1; OPTIMIZE TABLE t1; drop table t1; ->>>>>>> --echo End of 5.1 tests -- cgit v1.2.1