
use mydb;

drop table if exists t1;
drop TABLE if exists t2;

create table t1 (c1 int , c2 int, c3 char(15), c4 char(20), c5 varchar(20), c6 varchar(20)) engine=columnstore;
create table t2 (c1 int , c2 int, c3 char(15), c4 char(20), c5 varchar(20), c6 varchar(20)) engine=columnstore;

insert into t1 values(1, 1,   'char-row1-c3c4', 'char-row1-c3c4', 'varchar20-row1', 'varchar20-row1'), 
                     (null, null, 'char-row2', 'char-row2-c4', 'varchar20-row2-c5', 'varchar20-row2-c6'), 
                     (3, 30, null, null, 'varchar20-row3-c5', 'varchar20-row3-c6'), 
                     (4, 40, 'char-row4-c3', 'char-row4-c4',  null, null),
                     (5, null, 'char-row5-c3', null,  'varchar20-row5-c5', null),
                     (6, 6, 'char-row6-c3', 'char-row6-c4',  'varchar20-row6-c5', null),
                     (NULL, 7, NULL,        'char-row7-c4',   NULL,               'varchar20-row7-c6');

insert into t2 values(1, 1,   'char-row1-c3c4', 'char-row1-c3c4', 'varchar20-row1', 'varchar20-row1'), 
                     (null, null, 'char-row2', 'char-row2-c4', 'varchar20-row2-c5', 'varchar20-row2-c6'), 
                     (3, 30, null, null, 'varchar20-row3-c5', 'varchar20-row3-c6'), 
                     (4, 40, 'char-row4-c3', 'char-row4-c4',  null, null),
                     (null, null, null, null, null,null),
                     (6, 60, 'char-row6-c3', 'char-row6-c4',  'varchar20-row6-c5-t2', null),
                     (NULL, 7, NULL,        'char-row7-c4',   NULL,               'varchar20-row7-c6');

-----------------------------------------------------------------------------------------------------
--
--          ****************  INNO DB Section **************************
--
-----------------------------------------------------------------------------------------------------
use innodb;

drop table if exists t1;
drop TABLE if exists t2;

create table t1 as select * from mydb.t1;
create table t2 as select * from mydb.t2;

