1include/master-slave.inc
2[connection master]
3connection master;
4create table t1(a int , b int invisible);
5insert into t1 values(1);
6insert into t1(a,b) values(2,2);
7select a,b from t1;
8a	b
91	NULL
102	2
11desc t1;
12Field	Type	Null	Key	Default	Extra
13a	int(11)	YES		NULL
14b	int(11)	YES		NULL	INVISIBLE
15create table t2(a int , b int invisible default 5);
16insert into t2 values(1);
17insert into t2(a,b) values(2,2);
18select a,b from t2;
19a	b
201	5
212	2
22desc t2;
23Field	Type	Null	Key	Default	Extra
24a	int(11)	YES		NULL
25b	int(11)	YES		5	INVISIBLE
26connection slave;
27select * from t1;
28a
291
302
31select a,b from t1;
32a	b
331	NULL
342	2
35desc t1;
36Field	Type	Null	Key	Default	Extra
37a	int(11)	YES		NULL
38b	int(11)	YES		NULL	INVISIBLE
39show create table t1;
40Table	Create Table
41t1	CREATE TABLE `t1` (
42  `a` int(11) DEFAULT NULL,
43  `b` int(11) INVISIBLE DEFAULT NULL
44) ENGINE=MyISAM DEFAULT CHARSET=latin1
45select * from t2;
46a
471
482
49select a,b from t2;
50a	b
511	5
522	2
53desc t2;
54Field	Type	Null	Key	Default	Extra
55a	int(11)	YES		NULL
56b	int(11)	YES		5	INVISIBLE
57show create table t2;
58Table	Create Table
59t2	CREATE TABLE `t2` (
60  `a` int(11) DEFAULT NULL,
61  `b` int(11) INVISIBLE DEFAULT 5
62) ENGINE=MyISAM DEFAULT CHARSET=latin1
63connection master;
64drop table t1,t2;
65include/rpl_end.inc
66