DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;

-- Don't change the comments. The enum word inside the comment is there to test the table parser

CREATE TABLE `test`.`t1` ( 
    f1 DATE NOT NULL,
    f2 INT(10) UNSIGNED NOT NULL,
    f3 ENUM('c','a','b','d') NOT NULL DEFAULT 'c' COMMENT "unsorted enum items",
    f4 INT(10) UNSIGNED NOT NULL DEFAULT '0',
    PRIMARY KEY (`f1`,`f2`,`f3`) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `t1` VALUES 
('2018-07-27',165910161,'c',1375471152),
('2018-07-27',393713658,'d',1382302491),
('2018-07-27',472875023,'c',525456967),
('2018-07-27',543582931,'c',1657080267),
('2018-07-27',583532949,'d',280366509),
('2018-07-27',1396416465,'d',1252007743),
('2018-07-27',1705409249,'c',1714682759),
('2018-07-27',1801160058,'a',1022430181),
('2018-07-27',1898674299,'c',1310715836),
('2018-07-27',2011751560,'a',109015753);

CREATE TABLE `test`.`t2` ( 
    f1 DATE NOT NULL,
    f2 INT(10) UNSIGNED NOT NULL,
    f3 ENUM('a','b','c','d') NOT NULL DEFAULT 'c' COMMENT "sorted enum items",
    f4 INT(10) UNSIGNED NOT NULL DEFAULT '0',
    PRIMARY KEY (`f1`,`f2`,`f3`) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `t2` VALUES 
('2018-07-27',165910161,'c',1375471152),
('2018-07-27',393713658,'d',1382302491),
('2018-07-27',472875023,'c',525456967),
('2018-07-27',543582931,'c',1657080267),
('2018-07-27',583532949,'d',280366509),
('2018-07-27',1396416465,'d',1252007743),
('2018-07-27',1705409249,'c',1714682759),
('2018-07-27',1801160058,'a',1022430181),
('2018-07-27',1898674299,'c',1310715836),
('2018-07-27',2011751560,'a',109015753);
