mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl / r / rpl_alter.result
blobd60f1b6808211290afebc1bd17405fc62b4008dc
1 include/master-slave.inc
2 [connection master]
3 create database mysqltest;
4 create table mysqltest.t1 ( n int);
5 alter table mysqltest.t1 add m int;
6 insert into mysqltest.t1 values (1,2);
7 create table mysqltest.t2 (n int);
8 insert into mysqltest.t2 values (45);
9 rename table mysqltest.t2 to mysqltest.t3, mysqltest.t1 to mysqltest.t2;
10 select * from mysqltest.t2;
11 n       m
12 1       2
13 select * from mysqltest.t3;
16 drop database mysqltest;
18 # BUG#56226 Table map set to 0 after altering MyISAM table
20 SET SESSION binlog_format='ROW';
21 USE test;
22 CREATE TABLE t1 (a INT, b INT) ENGINE MyISAM;
23 CREATE TABLE t2 (a VARCHAR(255), b VARCHAR(255)) ENGINE MyISAM;
24 CREATE TRIGGER trg_t1ai 
25 AFTER INSERT ON t1 FOR EACH ROW 
26 BEGIN
27 INSERT INTO t2 (a) VALUES (NEW.a);
28 END;//
29 ALTER TABLE t1 CHANGE b c INT;
30 ALTER TABLE t2 CHANGE b c VARCHAR(255);
32 INSERT INTO t1 (a) VALUES(2);
33 include/diff_tables.inc [master:t1, slave:t1]
34 include/diff_tables.inc [master:t2, slave:t2]
36 DROP TABLE t1, t2;
37 include/rpl_end.inc