mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
a0cf0927af
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-maint mysql-test/suite/ndb/t/ndb_multi.test: Auto merged mysql-test/suite/ndb/t/ndb_multi_row.test: Auto merged
125 lines
2.6 KiB
Text
125 lines
2.6 KiB
Text
-- source include/have_multi_ndb.inc
|
|
-- source include/not_embedded.inc
|
|
|
|
--disable_warnings
|
|
connection server2;
|
|
drop table if exists t1, t2, t3, t4;
|
|
connection server1;
|
|
drop table if exists t1, t2, t3, t4;
|
|
--enable_warnings
|
|
|
|
flush status;
|
|
|
|
# Create test tables on server1
|
|
create table t1 (a int) engine=ndbcluster;
|
|
create table t2 (a int) engine=ndbcluster;
|
|
insert into t1 value (2);
|
|
insert into t2 value (3);
|
|
select * from t1;
|
|
select * from t2;
|
|
show status like 'handler_discover%';
|
|
|
|
# Check dropping and recreating table on same server
|
|
connect (con1,localhost,root,,test);
|
|
connect (con2,localhost,root,,test);
|
|
connection con1;
|
|
select * from t1;
|
|
connection con2;
|
|
drop table t1;
|
|
create table t1 (a int) engine=ndbcluster;
|
|
insert into t1 value (2);
|
|
connection con1;
|
|
select * from t1;
|
|
|
|
# Check dropping and recreating table on different server
|
|
connection server2;
|
|
show status like 'handler_discover%';
|
|
drop table t1;
|
|
create table t1 (a int) engine=ndbcluster;
|
|
insert into t1 value (2);
|
|
connection server1;
|
|
select * from t1;
|
|
select * from t1;
|
|
|
|
# Connect to server2 and use the tables from there
|
|
connection server2;
|
|
flush status;
|
|
select * from t1;
|
|
update t1 set a=3 where a=2;
|
|
show status like 'handler_discover%';
|
|
|
|
# Create a new table on server2
|
|
create table t3 (a int not null primary key, b varchar(22),
|
|
c int, last_col text) engine=ndb;
|
|
insert into t3 values(1, 'Hi!', 89, 'Longtext column');
|
|
create table t4 (pk int primary key, b int) engine=ndb;
|
|
|
|
# Check that the tables are accessible from server1
|
|
connection server1;
|
|
select * from t1;
|
|
select * from t3;
|
|
show tables like 't4';
|
|
show tables;
|
|
|
|
drop table t1, t2, t3, t4;
|
|
# bug#21378
|
|
connection server1;
|
|
create table t1(c1 int key)ENGINE=MyISAM;
|
|
insert into t1 values(1),(3),(5);
|
|
select * from t1 order by c1;
|
|
|
|
connection server2;
|
|
show tables;
|
|
create table t1(c1 int key)ENGINE=MyISAM;
|
|
insert into t1 values(100),(344),(533);
|
|
select * from t1 order by c1;
|
|
|
|
connection server1;
|
|
alter table t1 engine=ndb;
|
|
|
|
connection server2;
|
|
show tables;
|
|
select * from t1 order by c1;
|
|
drop table t1;
|
|
|
|
connection server1;
|
|
select * from t1 order by c1;
|
|
drop table t1;
|
|
# End of 4.1 tests
|
|
|
|
# Check distributed drop of database in 5.1
|
|
create database db;
|
|
use db;
|
|
create table t1(x int) engine=ndb;
|
|
|
|
connection server2;
|
|
use db;
|
|
show tables;
|
|
|
|
connection server1;
|
|
drop database db;
|
|
|
|
connection server2;
|
|
--error 1049
|
|
show tables;
|
|
|
|
connection server1;
|
|
|
|
# bug#21495
|
|
create database db;
|
|
use db;
|
|
create table t1(x int) engine=ndb;
|
|
|
|
connection server2;
|
|
use db;
|
|
create table t2(x int) engine=myisam;
|
|
show tables;
|
|
|
|
connection server1;
|
|
drop database db;
|
|
|
|
connection server2;
|
|
show tables;
|
|
drop database db;
|
|
|
|
connection server1;
|