mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl_ndb / t / rpl_ndb_dd_basic.test
blobdbe6929bbefd276f98ffbb26f795930a2bade36c
1 --source include/have_ndb.inc
2 --source include/have_binlog_format_mixed_or_row.inc
3 --source include/ndb_master-slave.inc
5 --disable_warnings
6 DROP TABLE IF EXISTS t1;
7 --enable_warnings
10 # Basic test of disk tables for NDB
14 # Start by creating a logfile group
17 CREATE LOGFILE GROUP lg1
18 ADD UNDOFILE 'undofile.dat'
19 INITIAL_SIZE 16M
20 UNDO_BUFFER_SIZE = 1M
21 ENGINE=NDB;
23 alter logfile group lg1
24 add undofile 'undofile02.dat'
25 initial_size 4M engine=ndb;
28 # Create a tablespace connected to the logfile group
31 CREATE TABLESPACE ts1
32 ADD DATAFILE 'datafile.dat'
33 USE LOGFILE GROUP lg1
34 INITIAL_SIZE 12M
35 ENGINE NDB;
37 alter tablespace ts1
38 add datafile 'datafile02.dat'
39 initial_size 4M engine=ndb;
42 # Create a table using this tablespace
45 CREATE TABLE t1
46 (pk1 int not null primary key, b int not null, c int not null)
47 tablespace ts1 storage disk
48 engine ndb;
51 # insert some data
54 insert into t1 values (1,2,3);
55 select * from t1 order by pk1;
58 # check that the data is also on the slave
61 --sync_slave_with_master
62 --connection slave
63 select * from t1 order by pk1;
66 # view the binlog
69 --connection master
70 -- source include/show_binlog_events2.inc
73 # cleanup
76 drop table t1;
77 alter tablespace ts1
78 drop datafile 'datafile.dat'
79 engine=ndb;
80 alter tablespace ts1
81 drop datafile 'datafile02.dat'
82 engine=ndb;
83 DROP TABLESPACE ts1 ENGINE=NDB;
84 DROP LOGFILE GROUP lg1 ENGINE=NDB;
85 --source include/rpl_end.inc