Bug #20935 MySQL cluster : views are not automatically created
Submitted: 10 Jul 2006 11:30 Modified: 17 Jul 2006 11:12
Reporter: Peningault Olivier Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0.21 OS:Linux (Linux)
Assigned to: CPU Architecture:Any
Tags: mysql cluster view

[10 Jul 2006 11:30] Peningault Olivier
Description:
Views created in database are not present on other nodes than the node where we created it.

How to repeat:
1- Create a database named toto on each node of the cluster
2- Create tables and view like this :
use toto;

create table a (
        id int,
        toto varchar(5)
) ENGINE=ndbcluster;
insert into a values (1,"toto");

create table b (
        id int,
        titi varchar(20)
) ENGINE=ndbcluster;
insert into b values (1,"hop");

create view v as select a.toto,b.titi from a,b where a.id=b.id;

3- on the node where you executed the creation script :
mysql> show tables;
+----------------+
| Tables_in_toto |
+----------------+
| a              |
| b              |
| v              |
+----------------+
3 rows in set (0,01 sec)

mysql> select * from v;
+------+------+
| toto | titi |
+------+------+
| toto | hop  |
+------+------+
1 row in set (0,00 sec)

mysql>

4- on an other node of the cluster :
mysql> show tables;
+----------------+
| Tables_in_toto |
+----------------+
| a              |
| b              |
+----------------+
2 rows in set (0,01 sec)

mysql>

The 'v' view is missing
[12 Jul 2006 15:55] Peningault Olivier
Change category to mysql server -> cluster
[12 Jul 2006 16:03] Peningault Olivier
change severity
[17 Jul 2006 11:12] Hartmut Holzgraefe
Only actual cluster tables are visible on all mysqlds within a cluster,
view definitions are not stored on the cluster data nodes so they don't
become visible on other mysqlds in the cluster