List:Commits« Previous MessageNext Message »
From:Martin Skold Date:June 17 2011 10:17am
Subject:bzr push into mysql-5.1-telco-7.0 branch (Martin.Skold:4463 to 4465)
View as plain text  
 4465 Martin Skold	2011-06-17
      Moved multi server tests to new test case, ndb_alter_table_online_multi

    added:
      mysql-test/suite/ndb/r/ndb_alter_table_online_multi.result
      mysql-test/suite/ndb/t/ndb_alter_table_online_multi.test
    modified:
      mysql-test/suite/ndb/r/ndb_alter_table_online.result
      mysql-test/suite/ndb/t/ndb_alter_table_online.test
 4464 Martin Skold	2011-06-17
      Bug#7798 Running range scan after alter table in different thread causes node failure: Fixed test case and moved it to ndb_multi

    modified:
      mysql-test/suite/ndb/r/ndb_index_ordered.result
      mysql-test/suite/ndb/r/ndb_multi.result
      mysql-test/suite/ndb/t/ndb_index_ordered.test
      mysql-test/suite/ndb/t/ndb_multi.test
 4463 jonas oreland	2011-06-17
      ndb - make sure we never return estimates < 2

    modified:
      sql/ha_ndbcluster.cc
=== modified file 'mysql-test/suite/ndb/r/ndb_alter_table_online.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2011-04-11 13:36:12 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2011-06-17 10:15:34 +0000
@@ -142,67 +142,6 @@ select name from ndb_show_tables_results
 name
 DROP TABLE t1;
 *******************************
-* basic concurent online alter test
-*******************************
-* With Commit
-*******************************
-CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
-begin;
-update t1 set b = 0 where a = 1;
-update t1 set b = 1 where a = 2;
-delete from t1      where a = 3;
-insert into t1 values (5,5),(6,6);
-update t1 set b = 0 where a = 6;
-ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
-Warnings:
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-update t1 set b = 0 where a = 2;
-update t1 set b = 0 where a = 4;
-update t1 set b = 0 where a = 5;
-insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
-commit;
-SELECT * FROM t1 ORDER BY a;
-a	b	c	d	e
-1	0	NULL	NULL	NULL
-2	0	NULL	NULL	NULL
-4	0	NULL	NULL	NULL
-5	0	NULL	NULL	NULL
-6	0	NULL	NULL	NULL
-7	0	NULL	NULL	NULL
-8	0	8	8	8
-DROP TABLE t1;
-*******************************
-* basic concurent online alter test
-*******************************
-* With Rollback
-*******************************
-CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
-begin;
-update t1 set b = 0 where a = 1;
-update t1 set b = 1 where a = 2;
-delete from t1      where a = 3;
-insert into t1 values (5,5),(6,6);
-update t1 set b = 0 where a = 6;
-ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
-Warnings:
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-update t1 set b = 0 where a = 2;
-update t1 set b = 0 where a = 4;
-update t1 set b = 0 where a = 5;
-insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
-rollback;
-SELECT * FROM t1 ORDER BY a;
-a	b	c	d	e
-1	1	NULL	NULL	NULL
-2	2	NULL	NULL	NULL
-3	3	NULL	NULL	NULL
-4	4	NULL	NULL	NULL
-DROP TABLE t1;
-*******************************
 * The following ALTER operations are not supported on-line
 *******************************
 * Not supported Test#1

=== added file 'mysql-test/suite/ndb/r/ndb_alter_table_online_multi.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_online_multi.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_online_multi.result	2011-06-17 10:15:34 +0000
@@ -0,0 +1,61 @@
+*******************************
+* basic concurent online alter test
+*******************************
+* With Commit
+*******************************
+CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
+begin;
+update t1 set b = 0 where a = 1;
+update t1 set b = 1 where a = 2;
+delete from t1      where a = 3;
+insert into t1 values (5,5),(6,6);
+update t1 set b = 0 where a = 6;
+ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
+Warnings:
+Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+update t1 set b = 0 where a = 2;
+update t1 set b = 0 where a = 4;
+update t1 set b = 0 where a = 5;
+insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
+commit;
+SELECT * FROM t1 ORDER BY a;
+a	b	c	d	e
+1	0	NULL	NULL	NULL
+2	0	NULL	NULL	NULL
+4	0	NULL	NULL	NULL
+5	0	NULL	NULL	NULL
+6	0	NULL	NULL	NULL
+7	0	NULL	NULL	NULL
+8	0	8	8	8
+DROP TABLE t1;
+*******************************
+* basic concurent online alter test
+*******************************
+* With Rollback
+*******************************
+CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
+begin;
+update t1 set b = 0 where a = 1;
+update t1 set b = 1 where a = 2;
+delete from t1      where a = 3;
+insert into t1 values (5,5),(6,6);
+update t1 set b = 0 where a = 6;
+ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
+Warnings:
+Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+Warning	1478	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+update t1 set b = 0 where a = 2;
+update t1 set b = 0 where a = 4;
+update t1 set b = 0 where a = 5;
+insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
+rollback;
+SELECT * FROM t1 ORDER BY a;
+a	b	c	d	e
+1	1	NULL	NULL	NULL
+2	2	NULL	NULL	NULL
+3	3	NULL	NULL	NULL
+4	4	NULL	NULL	NULL
+DROP TABLE t1;

=== modified file 'mysql-test/suite/ndb/r/ndb_index_ordered.result'
--- a/mysql-test/suite/ndb/r/ndb_index_ordered.result	2011-06-15 10:37:56 +0000
+++ b/mysql-test/suite/ndb/r/ndb_index_ordered.result	2011-06-17 10:15:04 +0000
@@ -637,21 +637,6 @@ select count(*)- 4 from t1 use index (v)
 count(*)- 4
 0
 drop table t1;
-create table t1(a int primary key, b int not null, index(b));
-insert into t1 values (1,1), (2,2);
-set autocommit=0;
-begin;
-select count(*) from t1;
-count(*)
-2
-ALTER TABLE t1 ADD COLUMN c int;
-select a from t1 where b = 2;
-a
-2
-show tables;
-Tables_in_test
-t1
-drop table t1;
 create table t1 (a int, c varchar(10),
 primary key using hash (a), index(c)) engine=ndb;
 insert into t1 (a, c) values (1,'aaa'),(3,'bbb');

=== modified file 'mysql-test/suite/ndb/r/ndb_multi.result'
--- a/mysql-test/suite/ndb/r/ndb_multi.result	2011-03-22 08:32:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_multi.result	2011-06-17 10:15:04 +0000
@@ -196,3 +196,19 @@ insert into t1 values(37);
 alter table t1 engine ndb;
 truncate t1;
 drop table t1;
+create table t1(a int primary key, b int not null, index(b)) engine = ndb;
+insert into t1 values (1,1), (2,2);
+set autocommit=0;
+begin;
+select count(*) from t1;
+count(*)
+2
+ALTER OFFLINE TABLE t1 ADD COLUMN c int;
+select a from t1 where b = 2;
+a
+2
+commit;
+show tables;
+Tables_in_test
+t1
+drop table t1;

=== modified file 'mysql-test/suite/ndb/t/ndb_alter_table_online.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2011-04-11 13:36:12 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2011-06-17 10:15:34 +0000
@@ -139,91 +139,6 @@ select name from ndb_show_tables_results
 DROP TABLE t1;
 
 --echo *******************************
---echo * basic concurent online alter test
---echo *******************************
---echo * With Commit
---echo *******************************
-
-connection server1;
-
-CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
-let $v=4;
-disable_query_log;
-while ($v)
-{
-  --eval INSERT INTO t1 VALUES($v,$v); 
-  dec $v;
-}
-enable_query_log;
-
-
-connection server2;
-begin;
-update t1 set b = 0 where a = 1;
-update t1 set b = 1 where a = 2;
-delete from t1      where a = 3;
-
-insert into t1 values (5,5),(6,6);
-update t1 set b = 0 where a = 6;
-
-connection server1;
-ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
-
-connection server2;
-update t1 set b = 0 where a = 2;
-update t1 set b = 0 where a = 4;
-update t1 set b = 0 where a = 5;
-insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
-commit;
-
-connection server1;
-SELECT * FROM t1 ORDER BY a;
-
-DROP TABLE t1;
-
---echo *******************************
---echo * basic concurent online alter test
---echo *******************************
---echo * With Rollback
---echo *******************************
-
-connection server1;
-
-CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
-let $v=4;
-disable_query_log;
-while ($v)
-{
-  --eval INSERT INTO t1 VALUES($v,$v); 
-  dec $v;
-}
-enable_query_log;
-
-connection server2;
-begin;
-update t1 set b = 0 where a = 1;
-update t1 set b = 1 where a = 2;
-delete from t1      where a = 3;
-
-insert into t1 values (5,5),(6,6);
-update t1 set b = 0 where a = 6;
-
-connection server1;
-ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
-
-connection server2;
-update t1 set b = 0 where a = 2;
-update t1 set b = 0 where a = 4;
-update t1 set b = 0 where a = 5;
-insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
-rollback;
-
-connection server1;
-SELECT * FROM t1 ORDER BY a;
-
-DROP TABLE t1;
-
---echo *******************************
 --echo * The following ALTER operations are not supported on-line
 --echo *******************************
 --echo * Not supported Test#1

=== added file 'mysql-test/suite/ndb/t/ndb_alter_table_online_multi.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_online_multi.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_online_multi.test	2011-06-17 10:15:34 +0000
@@ -0,0 +1,88 @@
+-- source include/not_embedded.inc
+-- source include/have_multi_ndb.inc
+
+--echo *******************************
+--echo * basic concurent online alter test
+--echo *******************************
+--echo * With Commit
+--echo *******************************
+
+connection server1;
+
+CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
+let $v=4;
+disable_query_log;
+while ($v)
+{
+  --eval INSERT INTO t1 VALUES($v,$v); 
+  dec $v;
+}
+enable_query_log;
+
+
+connection server2;
+begin;
+update t1 set b = 0 where a = 1;
+update t1 set b = 1 where a = 2;
+delete from t1      where a = 3;
+
+insert into t1 values (5,5),(6,6);
+update t1 set b = 0 where a = 6;
+
+connection server1;
+ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
+
+connection server2;
+update t1 set b = 0 where a = 2;
+update t1 set b = 0 where a = 4;
+update t1 set b = 0 where a = 5;
+insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
+commit;
+
+connection server1;
+SELECT * FROM t1 ORDER BY a;
+
+DROP TABLE t1;
+
+--echo *******************************
+--echo * basic concurent online alter test
+--echo *******************************
+--echo * With Rollback
+--echo *******************************
+
+connection server1;
+
+CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
+let $v=4;
+disable_query_log;
+while ($v)
+{
+  --eval INSERT INTO t1 VALUES($v,$v); 
+  dec $v;
+}
+enable_query_log;
+
+connection server2;
+begin;
+update t1 set b = 0 where a = 1;
+update t1 set b = 1 where a = 2;
+delete from t1      where a = 3;
+
+insert into t1 values (5,5),(6,6);
+update t1 set b = 0 where a = 6;
+
+connection server1;
+ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
+
+connection server2;
+update t1 set b = 0 where a = 2;
+update t1 set b = 0 where a = 4;
+update t1 set b = 0 where a = 5;
+insert into t1 values (7,0,null,null,null),(8,0,'8','8','8');
+rollback;
+
+connection server1;
+SELECT * FROM t1 ORDER BY a;
+
+DROP TABLE t1;
+

=== modified file 'mysql-test/suite/ndb/t/ndb_index_ordered.test'
--- a/mysql-test/suite/ndb/t/ndb_index_ordered.test	2011-06-15 10:37:56 +0000
+++ b/mysql-test/suite/ndb/t/ndb_index_ordered.test	2011-06-17 10:15:04 +0000
@@ -332,22 +332,6 @@ select count(*)- 4 from t1 use index (v)
 
 drop table t1;
 
-# bug#7798
-create table t1(a int primary key, b int not null, index(b));
-insert into t1 values (1,1), (2,2);
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-connection con1;
-set autocommit=0;
-begin;
-select count(*) from t1;
-connection con2;
-ALTER TABLE t1 ADD COLUMN c int;
-connection con1;
-select a from t1 where b = 2;
-show tables;
-drop table t1;
-
 # mysqld 5.0.13 crash, no bug#
 create table t1 (a int, c varchar(10),
   primary key using hash (a), index(c)) engine=ndb;

=== modified file 'mysql-test/suite/ndb/t/ndb_multi.test'
--- a/mysql-test/suite/ndb/t/ndb_multi.test	2011-03-22 08:32:32 +0000
+++ b/mysql-test/suite/ndb/t/ndb_multi.test	2011-06-17 10:15:04 +0000
@@ -246,3 +246,18 @@ truncate t1;
 # Cleanup
 drop table t1;
 connection server1;
+
+# bug#7798
+create table t1(a int primary key, b int not null, index(b)) engine = ndb;
+insert into t1 values (1,1), (2,2);
+set autocommit=0;
+begin;
+select count(*) from t1;
+connection server2;
+ALTER OFFLINE TABLE t1 ADD COLUMN c int;
+connection server1;
+select a from t1 where b = 2;
+commit;
+show tables;
+drop table t1;
+

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (Martin.Skold:4463 to 4465) Martin Skold19 Jun