You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Dlee mtr restructure (#2494)
* Restructured test suites and added autopilot and extended suites * Updated autopilot with correct branch - develop * Moved setup test case to a 'setup' directory, for consistency * Fixed a path issue * Updated some tests cases to keep up with development Co-authored-by: root <root@rocky8.localdomain>
This commit is contained in:
45
mysql-test/columnstore/include/alter_table_add_columns.inc
Executable file
45
mysql-test/columnstore/include/alter_table_add_columns.inc
Executable file
@ -0,0 +1,45 @@
|
||||
alter table lineitem add column CBIGINT BIGINT;
|
||||
alter table lineitem add column CDECIMAL1 DECIMAL(1);
|
||||
alter table lineitem add column CDECIMAL4 DECIMAL(4);
|
||||
alter table lineitem add column CDECIMAL4_2 DECIMAL(4,2);
|
||||
alter table lineitem add column CDECIMAL5 DECIMAL(5);
|
||||
alter table lineitem add column CDECIMAL9 DECIMAL(9);
|
||||
alter table lineitem add column CDECIMAL9_2 DECIMAL(9,2);
|
||||
alter table lineitem add column CDECIMAL10 DECIMAL(10);
|
||||
alter table lineitem add column CDECIMAL18 DECIMAL(18);
|
||||
alter table lineitem add column CDECIMAL18_2 DECIMAL(18,2);
|
||||
alter table lineitem add column CINTEGER INTEGER;
|
||||
alter table lineitem add column CSMALLINT SMALLINT;
|
||||
alter table lineitem add column CTINYINT TINYINT;
|
||||
alter table lineitem add column CDOUBLE DOUBLE;
|
||||
alter table lineitem add column CFLOAT FLOAT;
|
||||
alter table lineitem add column CDATE DATE;
|
||||
alter table lineitem add column CDATETIME DATETIME;
|
||||
alter table lineitem add column CTIME TIME;
|
||||
alter table lineitem add column CCHAR1 CHAR(1);
|
||||
alter table lineitem add column CCHAR2 CHAR(2);
|
||||
alter table lineitem add column CCHAR3 CHAR(3);
|
||||
alter table lineitem add column CCHAR4 CHAR(4);
|
||||
alter table lineitem add column CCHAR5 CHAR(5);
|
||||
alter table lineitem add column CCHAR6 CHAR(6);
|
||||
alter table lineitem add column CCHAR7 CHAR(7);
|
||||
alter table lineitem add column CCHAR8 CHAR(8);
|
||||
alter table lineitem add column CCHAR9 CHAR(9);
|
||||
alter table lineitem add column CCHAR255 CHAR(255);
|
||||
alter table lineitem add column CVCHAR1 VARCHAR(1);
|
||||
alter table lineitem add column CVCHAR2 VARCHAR(2);
|
||||
alter table lineitem add column CVCHAR3 VARCHAR(3);
|
||||
alter table lineitem add column CVCHAR4 VARCHAR(4);
|
||||
alter table lineitem add column CVCHAR5 VARCHAR(5);
|
||||
alter table lineitem add column CVCHAR6 VARCHAR(6);
|
||||
alter table lineitem add column CVCHAR7 VARCHAR(7);
|
||||
alter table lineitem add column CVCHAR8 VARCHAR(8);
|
||||
alter table lineitem add column CVCHAR255 VARCHAR(255);
|
||||
alter table lineitem add column CTEXT TEXT;
|
||||
alter table lineitem add column CTINYTEXT TINYTEXT;
|
||||
alter table lineitem add column CMEDIUMTEXT MEDIUMTEXT;
|
||||
alter table lineitem add column CLONGTEXT LONGTEXT;
|
||||
alter table lineitem add column CBLOB BLOB;
|
||||
alter table lineitem add column CTINYBLOB TINYBLOB;
|
||||
alter table lineitem add column CMEDIUMBLOB MEDIUMBLOB;
|
||||
alter table lineitem add column CLONGBLOB LONGBLOB;
|
45
mysql-test/columnstore/include/alter_table_drop_columns.inc
Executable file
45
mysql-test/columnstore/include/alter_table_drop_columns.inc
Executable file
@ -0,0 +1,45 @@
|
||||
alter table lineitem drop column CBIGINT;
|
||||
alter table lineitem drop column CDECIMAL1;
|
||||
alter table lineitem drop column CDECIMAL4;
|
||||
alter table lineitem drop column CDECIMAL4_2;
|
||||
alter table lineitem drop column CDECIMAL5;
|
||||
alter table lineitem drop column CDECIMAL9;
|
||||
alter table lineitem drop column CDECIMAL9_2;
|
||||
alter table lineitem drop column CDECIMAL10;
|
||||
alter table lineitem drop column CDECIMAL18;
|
||||
alter table lineitem drop column CDECIMAL18_2;
|
||||
alter table lineitem drop column CINTEGER;
|
||||
alter table lineitem drop column CSMALLINT;
|
||||
alter table lineitem drop column CTINYINT;
|
||||
alter table lineitem drop column CDOUBLE;
|
||||
alter table lineitem drop column CFLOAT;
|
||||
alter table lineitem drop column CDATE;
|
||||
alter table lineitem drop column CDATETIME;
|
||||
alter table lineitem drop column CTIME;
|
||||
alter table lineitem drop column CCHAR1;
|
||||
alter table lineitem drop column CCHAR2;
|
||||
alter table lineitem drop column CCHAR3;
|
||||
alter table lineitem drop column CCHAR4;
|
||||
alter table lineitem drop column CCHAR5;
|
||||
alter table lineitem drop column CCHAR6;
|
||||
alter table lineitem drop column CCHAR7;
|
||||
alter table lineitem drop column CCHAR8;
|
||||
alter table lineitem drop column CCHAR9;
|
||||
alter table lineitem drop column CCHAR255;
|
||||
alter table lineitem drop column CVCHAR1;
|
||||
alter table lineitem drop column CVCHAR2;
|
||||
alter table lineitem drop column CVCHAR3;
|
||||
alter table lineitem drop column CVCHAR4;
|
||||
alter table lineitem drop column CVCHAR5;
|
||||
alter table lineitem drop column CVCHAR6;
|
||||
alter table lineitem drop column CVCHAR7;
|
||||
alter table lineitem drop column CVCHAR8;
|
||||
alter table lineitem drop column CVCHAR255;
|
||||
alter table lineitem drop column CTEXT;
|
||||
alter table lineitem drop column CTINYTEXT;
|
||||
alter table lineitem drop column CMEDIUMTEXT;
|
||||
alter table lineitem drop column CLONGTEXT;
|
||||
alter table lineitem drop column CBLOB;
|
||||
alter table lineitem drop column CTINYBLOB;
|
||||
alter table lineitem drop column CMEDIUMBLOB;
|
||||
alter table lineitem drop column CLONGBLOB;
|
@ -0,0 +1,184 @@
|
||||
--disable_warnings
|
||||
drop table if exists datatypetestm;
|
||||
drop table if exists datatypetestm1;
|
||||
drop table if exists datatypetestm2;
|
||||
--enable_warnings
|
||||
Create table datatypetestm (
|
||||
CIDX INTEGER,
|
||||
CBIGINT BIGINT,
|
||||
CDECIMAL1 DECIMAL(1),
|
||||
CDECIMAL4 DECIMAL(4),
|
||||
CDECIMAL4_2 DECIMAL(4,2),
|
||||
CDECIMAL5 DECIMAL(5),
|
||||
CDECIMAL9 DECIMAL(9),
|
||||
CDECIMAL9_2 DECIMAL(9,2),
|
||||
CDECIMAL10 DECIMAL(10),
|
||||
CDECIMAL18 DECIMAL(18),
|
||||
CDECIMAL18_2 DECIMAL(18,2),
|
||||
CINTEGER INTEGER,
|
||||
CSMALLINT SMALLINT,
|
||||
CTINYINT TINYINT,
|
||||
CDOUBLE DOUBLE,
|
||||
CFLOAT FLOAT,
|
||||
CDATE DATE,
|
||||
CDATETIME DATETIME,
|
||||
CTIME TIME,
|
||||
CCHAR1 CHAR(1),
|
||||
CCHAR2 CHAR(2),
|
||||
CCHAR3 CHAR(3),
|
||||
CCHAR4 CHAR(4),
|
||||
CCHAR5 CHAR(5),
|
||||
CCHAR6 CHAR(6),
|
||||
CCHAR7 CHAR(7),
|
||||
CCHAR8 CHAR(8),
|
||||
CCHAR9 CHAR(9),
|
||||
CCHAR255 CHAR(255),
|
||||
CVCHAR1 VARCHAR(1),
|
||||
CVCHAR2 VARCHAR(2),
|
||||
CVCHAR3 VARCHAR(3),
|
||||
CVCHAR4 VARCHAR(4),
|
||||
CVCHAR5 VARCHAR(5),
|
||||
CVCHAR6 VARCHAR(6),
|
||||
CVCHAR7 VARCHAR(7),
|
||||
CVCHAR8 VARCHAR(8),
|
||||
CVCHAR255 VARCHAR(255),
|
||||
CTEXT TEXT,
|
||||
CBLOB BLOB,
|
||||
CMEDIUMINT MEDIUMINT,
|
||||
CTINYTEXT TINYTEXT,
|
||||
CTINYBLOB TINYBLOB,
|
||||
CMEDIUMTEXT MEDIUMTEXT,
|
||||
CMEDIUMBLOB MEDIUMBLOB,
|
||||
CLONGTEXT LONGTEXT,
|
||||
CLONGBLOB LONGBLOB,
|
||||
CTIMESTAMP TIMESTAMP
|
||||
) engine=Columnstore;
|
||||
#
|
||||
insert into datatypetestm values (1,-72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','13:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','2020-08-13 03:14:07');
|
||||
Create table datatypetestm1 (
|
||||
CIDX INTEGER,
|
||||
CBIGINT BIGINT,
|
||||
CDECIMAL1 DECIMAL(1),
|
||||
CDECIMAL4 DECIMAL(4),
|
||||
CDECIMAL4_2 DECIMAL(4,2),
|
||||
CDECIMAL5 DECIMAL(5),
|
||||
CDECIMAL9 DECIMAL(9),
|
||||
CDECIMAL9_2 DECIMAL(9,2),
|
||||
CDECIMAL10 DECIMAL(10),
|
||||
CDECIMAL18 DECIMAL(18),
|
||||
CDECIMAL18_2 DECIMAL(18,2),
|
||||
CINTEGER INTEGER,
|
||||
CSMALLINT SMALLINT,
|
||||
CTINYINT TINYINT,
|
||||
CDOUBLE DOUBLE,
|
||||
CFLOAT FLOAT,
|
||||
CDATE DATE,
|
||||
CDATETIME DATETIME,
|
||||
CCHAR1 CHAR(1),
|
||||
CCHAR2 CHAR(2),
|
||||
CCHAR3 CHAR(3),
|
||||
CCHAR4 CHAR(4),
|
||||
CCHAR5 CHAR(5),
|
||||
CCHAR6 CHAR(6),
|
||||
CCHAR7 CHAR(7),
|
||||
CCHAR8 CHAR(8),
|
||||
CCHAR9 CHAR(9),
|
||||
CCHAR255 CHAR(255),
|
||||
CVCHAR1 VARCHAR(1),
|
||||
CVCHAR2 VARCHAR(2),
|
||||
CVCHAR3 VARCHAR(3),
|
||||
CVCHAR4 VARCHAR(4),
|
||||
CVCHAR5 VARCHAR(5),
|
||||
CVCHAR6 VARCHAR(6),
|
||||
CVCHAR7 VARCHAR(7),
|
||||
CVCHAR8 VARCHAR(8),
|
||||
CVCHAR255 VARCHAR(255),
|
||||
CTEXT TEXT,
|
||||
CBLOB BLOB,
|
||||
CMEDIUMINT MEDIUMINT,
|
||||
CTINYTEXT TINYTEXT,
|
||||
CTINYBLOB TINYBLOB,
|
||||
CMEDIUMTEXT MEDIUMTEXT,
|
||||
CMEDIUMBLOB MEDIUMBLOB,
|
||||
CLONGTEXT LONGTEXT,
|
||||
CLONGBLOB LONGBLOB,
|
||||
CTIME TIME,
|
||||
CTIMESTAMP TIMESTAMP
|
||||
) engine=Columnstore;
|
||||
#
|
||||
insert into datatypetestm1 values (1,-72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (2,-72036854775805,-8,-998,-9.98,-998,-999998,-9999.98,-9999998,-9999999999998,-99999999999.98,-7483645,-765,-25,-1.797693230E+108,-3.402865E+18,'1997-01-01','1997-01-01 00:00:01','a','b','c','d','e','f','g','h','i','j','a','b','c','d','e','f','g','h','j','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (3,-72036854775804,-7,-997,-9.97,-997,-999997,-9999.97,-9999997,-9999999999997,-99999999999.97,-7483644,-764,-24,-1.797693229E+108,-3.402864E+18,'1997-01-02','1997-01-02 00:00:01','a','bb','cc','dd','ee','ff','gg','hh','ii','jj','a','bb','cc','dd','ee','ff','gg','hh','jj','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (4,-72036854775803,-6,-996,-9.96,-996,-999996,-9999.96,-9999996,-9999999999996,-99999999999.96,-7483643,-763,-23,-1.797693228E+108,-3.402863E+18,'1997-01-03','1997-01-03 00:00:02','a','bb','ccc','ddd','eee','fff','ggg','hhh','iii','jjj','a','bb','ccc','ddd','eee','fff','ggg','hhh','jjj','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (5,-72036854775802,-5,-995,-9.95,-995,-999995,-9999.95,-9999995,-9999999999995,-99999999999.95,-7483642,-762,-22,-1.797693227E+108,-3.402862E+18,'1997-01-04','1997-01-04 00:00:03','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','iiii','jjjj','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','jjjj','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (6,72036854775803,5,995,9.95,995,999995,9999.95,9999995,9999999999995,99999999999.95,7483643,763,23,1.797693227E+108,3.402862E+18,'2009-12-28','2009-12-31 23:59:56','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','rrrrrrr','qqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','qqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (7,72036854775804,6,996,9.96,996,999996,9999.96,9999996,9999999999996,99999999999.96,7483644,764,24,1.797693228E+108,3.402863E+18,'2009-12-29','2009-12-31 23:59:57','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrr','qqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (8,72036854775805,7,997,9.97,997,999997,9999.97,9999997,9999999999997,99999999999.97,7483645,765,25,1.797693229E+108,3.402864E+18,'2009-12-30','2009-12-31 23:59:58','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (9,72036854775806,8,998,9.98,998,999998,9999.98,9999998,9999999999998,99999999999.98,7483646,766,26,1.797693230E+108,3.402865E+18,'2009-12-31','2009-12-31 23:59:59','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (10,72036854775807,9,999,9.99,999,999999,9999.99,9999999,9999999999999,99999999999.99,7483647,767,27,1.797693231E+108,3.402866E+18,'2009-12-31','2009-12-31 23:59:59','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzz','zzzzzzzzzz','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzzz','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm1 values (11,0,0,0,0.00,0,0,0.00,0,0,0.00,0,0,0,0.00,0.00,'2009-12-31','2009-12-31 23:59:59',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'11:58:28.999999', '2020-08-13 03:14:07');
|
||||
#
|
||||
Create table datatypetestm2 (
|
||||
CIDX INTEGER,
|
||||
CBIGINT BIGINT,
|
||||
CDECIMAL1 DECIMAL(1),
|
||||
CDECIMAL4 DECIMAL(4),
|
||||
CDECIMAL4_2 DECIMAL(4,2),
|
||||
CDECIMAL5 DECIMAL(5),
|
||||
CDECIMAL9 DECIMAL(9),
|
||||
CDECIMAL9_2 DECIMAL(9,2),
|
||||
CDECIMAL10 DECIMAL(10),
|
||||
CDECIMAL18 DECIMAL(18),
|
||||
CDECIMAL18_2 DECIMAL(18,2),
|
||||
CINTEGER INTEGER,
|
||||
CSMALLINT SMALLINT,
|
||||
CTINYINT TINYINT,
|
||||
CDOUBLE DOUBLE,
|
||||
CFLOAT FLOAT,
|
||||
CDATE DATE,
|
||||
CDATETIME DATETIME,
|
||||
CCHAR1 CHAR(1),
|
||||
CCHAR2 CHAR(2),
|
||||
CCHAR3 CHAR(3),
|
||||
CCHAR4 CHAR(4),
|
||||
CCHAR5 CHAR(5),
|
||||
CCHAR6 CHAR(6),
|
||||
CCHAR7 CHAR(7),
|
||||
CCHAR8 CHAR(8),
|
||||
CCHAR9 CHAR(9),
|
||||
CCHAR255 CHAR(255),
|
||||
CVCHAR1 VARCHAR(1),
|
||||
CVCHAR2 VARCHAR(2),
|
||||
CVCHAR3 VARCHAR(3),
|
||||
CVCHAR4 VARCHAR(4),
|
||||
CVCHAR5 VARCHAR(5),
|
||||
CVCHAR6 VARCHAR(6),
|
||||
CVCHAR7 VARCHAR(7),
|
||||
CVCHAR8 VARCHAR(8),
|
||||
CVCHAR255 VARCHAR(255),
|
||||
CTEXT TEXT,
|
||||
CBLOB BLOB,
|
||||
CMEDIUMINT MEDIUMINT,
|
||||
CTINYTEXT TINYTEXT,
|
||||
CTINYBLOB TINYBLOB,
|
||||
CMEDIUMTEXT MEDIUMTEXT,
|
||||
CMEDIUMBLOB MEDIUMBLOB,
|
||||
CLONGTEXT LONGTEXT,
|
||||
CLONGBLOB LONGBLOB,
|
||||
CTIME TIME,
|
||||
CTIMESTAMP TIMESTAMP
|
||||
) engine=Columnstore;
|
||||
#
|
||||
insert into datatypetestm2 values (1,-72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (2,-72036854775805,-8,-998,-9.98,-998,-999998,-9999.98,-9999998,-9999999999998,-99999999999.98,-7483645,-765,-25,-1.797693230E+108,-3.402865E+18,'1997-01-01','1997-01-01 00:00:01','a','b','c','d','e','f','g','h','i','j','a','b','c','d','e','f','g','h','j','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (3,-72036854775804,-7,-997,-9.97,-997,-999997,-9999.97,-9999997,-9999999999997,-99999999999.97,-7483644,-764,-24,-1.797693229E+108,-3.402864E+18,'1997-01-02','1997-01-02 00:00:01','a','bb','cc','dd','ee','ff','gg','hh','ii','jj','a','bb','cc','dd','ee','ff','gg','hh','jj','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (4,-72036854775803,-6,-996,-9.96,-996,-999996,-9999.96,-9999996,-9999999999996,-99999999999.96,-7483643,-763,-23,-1.797693228E+108,-3.402863E+18,'1997-01-03','1997-01-03 00:00:02','a','bb','ccc','ddd','eee','fff','ggg','hhh','iii','jjj','a','bb','ccc','ddd','eee','fff','ggg','hhh','jjj','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (5,-72036854775802,-5,-995,-9.95,-995,-999995,-9999.95,-9999995,-9999999999995,-99999999999.95,-7483642,-762,-22,-1.797693227E+108,-3.402862E+18,'1997-01-04','1997-01-04 00:00:03','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','iiii','jjjj','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','jjjj','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (6,72036854775803,5,995,9.95,995,999995,9999.95,9999995,9999999999995,99999999999.95,7483643,763,23,1.797693227E+108,3.402862E+18,'2009-12-28','2009-12-31 23:59:56','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','rrrrrrr','qqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','qqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (7,72036854775804,6,996,9.96,996,999996,9999.96,9999996,9999999999996,99999999999.96,7483644,764,24,1.797693228E+108,3.402863E+18,'2009-12-29','2009-12-31 23:59:57','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrr','qqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (8,72036854775805,7,997,9.97,997,999997,9999.97,9999997,9999999999997,99999999999.97,7483645,765,25,1.797693229E+108,3.402864E+18,'2009-12-30','2009-12-31 23:59:58','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (9,72036854775806,8,998,9.98,998,999998,9999.98,9999998,9999999999998,99999999999.98,7483646,766,26,1.797693230E+108,3.402865E+18,'2009-12-31','2009-12-31 23:59:59','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqqq','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (10,72036854775807,9,999,9.99,999,999999,9999.99,9999999,9999999999999,99999999999.99,7483647,767,27,1.797693231E+108,3.402866E+18,'2009-12-31','2009-12-31 23:59:59','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzz','zzzzzzzzzz','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzzz','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','11:58:28.999999', '2020-08-13 03:14:07');
|
||||
insert into datatypetestm2 values (11,0,0,0,0.00,0,0,0.00,0,0,0.00,0,0,0,0.00,0.00,'2009-12-31','2009-12-31 23:59:59',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'11:58:28.999999', '2020-08-13 03:14:07');
|
||||
#
|
||||
|
@ -0,0 +1,53 @@
|
||||
drop table if exists datatypeupdate;
|
||||
Create table datatypeupdate (
|
||||
CIDX INTEGER,
|
||||
CBIGINT BIGINT,
|
||||
CDECIMAL1 DECIMAL(1),
|
||||
CDECIMAL4 DECIMAL(4),
|
||||
CDECIMAL4_2 DECIMAL(4,2),
|
||||
CDECIMAL5 DECIMAL(5),
|
||||
CDECIMAL9 DECIMAL(9),
|
||||
CDECIMAL9_2 DECIMAL(9,2),
|
||||
CDECIMAL10 DECIMAL(10),
|
||||
CDECIMAL18 DECIMAL(18),
|
||||
CDECIMAL18_2 DECIMAL(18,2),
|
||||
CINTEGER INTEGER,
|
||||
CSMALLINT SMALLINT,
|
||||
CTINYINT TINYINT,
|
||||
CDOUBLE DOUBLE,
|
||||
CFLOAT FLOAT,
|
||||
CDATE DATE,
|
||||
CDATETIME DATETIME,
|
||||
CTIME TIME,
|
||||
CCHAR1 CHAR(1),
|
||||
CCHAR2 CHAR(2),
|
||||
CCHAR3 CHAR(3),
|
||||
CCHAR4 CHAR(4),
|
||||
CCHAR5 CHAR(5),
|
||||
CCHAR6 CHAR(6),
|
||||
CCHAR7 CHAR(7),
|
||||
CCHAR8 CHAR(8),
|
||||
CCHAR9 CHAR(9),
|
||||
CCHAR255 CHAR(255),
|
||||
CVCHAR1 VARCHAR(1),
|
||||
CVCHAR2 VARCHAR(2),
|
||||
CVCHAR3 VARCHAR(3),
|
||||
CVCHAR4 VARCHAR(4),
|
||||
CVCHAR5 VARCHAR(5),
|
||||
CVCHAR6 VARCHAR(6),
|
||||
CVCHAR7 VARCHAR(7),
|
||||
CVCHAR8 VARCHAR(8),
|
||||
CVCHAR255 VARCHAR(255),
|
||||
CTEXT TEXT,
|
||||
CBLOB BLOB,
|
||||
CMEDIUMINT MEDIUMINT,
|
||||
CTINYTEXT TINYTEXT,
|
||||
CTINYBLOB TINYBLOB,
|
||||
CMEDIUMTEXT MEDIUMTEXT,
|
||||
CMEDIUMBLOB MEDIUMBLOB,
|
||||
CLONGTEXT LONGTEXT,
|
||||
CLONGBLOB LONGBLOB,
|
||||
CTIMESTAMP TIMESTAMP
|
||||
) engine=Columnstore;
|
||||
#
|
||||
insert into datatypeupdate values (1,-72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','13:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa','texttexttext','blobblobblob',1000,'tinytext','tinyblob','mediumtestmediumtest','mediumblobmediumblob','longtextlongtextlongtext','longbloblongbloblongblob','2020-08-13 03:14:07');
|
@ -0,0 +1,10 @@
|
||||
--disable_warnings
|
||||
drop table if exists jsontest;
|
||||
--enable_warnings
|
||||
#
|
||||
CREATE TABLE jsontest (
|
||||
cInt INT,
|
||||
cVarchar VARCHAR(300),
|
||||
cText TEXT)
|
||||
ENGINE=columnstore;
|
||||
#
|
@ -0,0 +1,56 @@
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
drop table if exists t4;
|
||||
--enable_warnings
|
||||
create table t1 (c int);
|
||||
create table t2 (c int);
|
||||
create table t3 (c int);
|
||||
create table t4 (c int);
|
||||
#
|
||||
# Insert 2 rows with r_regionkey < 0
|
||||
# Insert 2 rows with r_regionkey = NULL
|
||||
insert into region (select r_regionkey * (-1), r_name, r_comment from region where r_regionkey in (1,2) );
|
||||
insert into region (select null, r_name, r_comment from region where r_regionkey <0);
|
||||
#
|
||||
# Insert 3 rows with n_nationkey < 0
|
||||
# Insert 3 rows with n_nationkey = NULL
|
||||
insert into nation (select n_nationkey * (-1), n_name, n_regionkey * (-100), n_comment from nation where n_nationkey in (1,2, 3) );
|
||||
insert into nation (select null, n_name, null, n_comment from nation where n_nationkey <0);
|
||||
#
|
||||
# Insert 20 rows with c_custkey < 0
|
||||
# Insert 20 rows with c_custkey = NULL
|
||||
insert into customer (select c_custkey * (-1), c_name, c_address, c_nationkey * (-100), c_phone, c_acctbal, c_mktsegment, c_comment from customer where c_custkey between 1 and 20);
|
||||
insert into customer (select null, c_name, c_address, null, c_phone, c_acctbal, c_mktsegment, c_comment from customer where c_custkey <0);
|
||||
#
|
||||
# Insert 25 rows with p_partkey < 0
|
||||
# Insert 25 rows with p_partkey = NULL
|
||||
insert into part (select p_partkey * (-1), p_name, p_mfgr, p_brand, p_type, p_size, p_container, p_retailprice, p_comment from part where p_partkey between 1 and 25);
|
||||
insert into part (select null, p_name, p_mfgr, p_brand, p_type, p_size, p_container, p_retailprice, p_comment from part where p_partkey <0);
|
||||
#
|
||||
# Insert 10 rows with s_suppkey < 0
|
||||
# Insert 10 rows with s_suppkey = NULL
|
||||
insert into supplier (select s_suppkey * (-1), s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment from supplier where s_suppkey between 1 and 10);
|
||||
insert into supplier (select null, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment from supplier where s_suppkey <0);
|
||||
#
|
||||
# Insert 8 rows with ps_partkey < 0
|
||||
# Insert 8 rows with ps_partkey = NULL
|
||||
insert into partsupp (select ps_partkey * (-1000), ps_suppkey * (-1000), ps_availqty, ps_supplycost, ps_comment from partsupp where ps_partkey between 1 and 2);
|
||||
insert into partsupp (select null, null, ps_availqty, ps_supplycost, ps_comment from partsupp where ps_partkey <0);
|
||||
#
|
||||
# Insert 55 rows with o_orderkey < 0
|
||||
# Insert 55 rows with o_orderkey = NULL
|
||||
insert into orders (select o_orderkey * (-1), o_custkey * (-10), o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_clerk, o_shippriority, o_comment from orders where o_orderkey between 1 and 200);
|
||||
insert into orders (select null, null, o_orderstatus, o_totalprice, o_orderdate, o_orderpriority, o_clerk, o_shippriority, o_comment from orders where o_orderkey <0);
|
||||
#
|
||||
# Insert 110 rows with l_orderkey < 0
|
||||
# Insert 110 rows with l_orderkey = NULL
|
||||
insert into lineitem (select l_orderkey * (-100), l_partkey * (-100), l_suppkey * (-100), l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment from lineitem where l_orderkey between 1 and 100);
|
||||
insert into lineitem (select null, null, null, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment from lineitem where l_orderkey <0);
|
||||
#
|
||||
insert into t1 values (1), (2), (3);
|
||||
insert into t2 values (1), (5);
|
||||
insert into t3 values (1), (6);
|
||||
insert into t4 values (1), (2), (5), (6);
|
||||
#
|
3
mysql-test/columnstore/include/dbt3/countCustomer.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countCustomer.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count customer table
|
||||
#
|
||||
select count(*) from customer;
|
3
mysql-test/columnstore/include/dbt3/countLineitem.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countLineitem.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count lineitem table
|
||||
#
|
||||
select count(*) from lineitem;
|
3
mysql-test/columnstore/include/dbt3/countNation.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countNation.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count nation table
|
||||
#
|
||||
select count(*) from nation;
|
3
mysql-test/columnstore/include/dbt3/countOrders.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countOrders.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count orders table
|
||||
#
|
||||
select count(*) from orders;
|
3
mysql-test/columnstore/include/dbt3/countPart.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countPart.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count parts table
|
||||
#
|
||||
select count(*) from part;
|
3
mysql-test/columnstore/include/dbt3/countPartsupp.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countPartsupp.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count partsupp table
|
||||
#
|
||||
select count(*) from partsupp;
|
3
mysql-test/columnstore/include/dbt3/countRegion.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countRegion.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count region table
|
||||
#
|
||||
select count(*) from region;
|
3
mysql-test/columnstore/include/dbt3/countSupplier.inc
Executable file
3
mysql-test/columnstore/include/dbt3/countSupplier.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count supplier table
|
||||
#
|
||||
select count(*) from supplier;
|
10
mysql-test/columnstore/include/dbt3/countTables.inc
Executable file
10
mysql-test/columnstore/include/dbt3/countTables.inc
Executable file
@ -0,0 +1,10 @@
|
||||
# select count dbt3 tables
|
||||
#
|
||||
SELECT COUNT(*) FROM nation;
|
||||
SELECT COUNT(*) FROM region;
|
||||
SELECT COUNT(*) FROM customer;
|
||||
SELECT COUNT(*) FROM orders;
|
||||
SELECT COUNT(*) FROM supplier;
|
||||
SELECT COUNT(*) FROM partsupp;
|
||||
SELECT COUNT(*) FROM part;
|
||||
SELECT COUNT(*) FROM lineitem;
|
16
mysql-test/columnstore/include/dbt3/createCustomer.inc
Executable file
16
mysql-test/columnstore/include/dbt3/createCustomer.inc
Executable file
@ -0,0 +1,16 @@
|
||||
# create customer table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists customer;
|
||||
--enable_warnings
|
||||
create table customer (
|
||||
c_custkey int,
|
||||
c_name varchar (25),
|
||||
c_address varchar (40),
|
||||
c_nationkey int,
|
||||
c_phone char (15),
|
||||
c_acctbal decimal(12,2),
|
||||
c_mktsegment char (10),
|
||||
c_comment varchar (117)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE customer;
|
24
mysql-test/columnstore/include/dbt3/createLineitem.inc
Executable file
24
mysql-test/columnstore/include/dbt3/createLineitem.inc
Executable file
@ -0,0 +1,24 @@
|
||||
# create lineitem table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists lineitem;
|
||||
--enable_warnings
|
||||
create table lineitem (
|
||||
l_orderkey int,
|
||||
l_partkey int,
|
||||
l_suppkey int,
|
||||
l_linenumber bigint,
|
||||
l_quantity decimal(12,2),
|
||||
l_extendedprice decimal(12,2),
|
||||
l_discount decimal(12,2),
|
||||
l_tax decimal(12,2),
|
||||
l_returnflag char (1),
|
||||
l_linestatus char (1),
|
||||
l_shipdate date,
|
||||
l_commitdate date,
|
||||
l_receiptdate date,
|
||||
l_shipinstruct char (25),
|
||||
l_shipmode char (10),
|
||||
l_comment varchar (44)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE lineitem;
|
24
mysql-test/columnstore/include/dbt3/createLineitem1.inc
Executable file
24
mysql-test/columnstore/include/dbt3/createLineitem1.inc
Executable file
@ -0,0 +1,24 @@
|
||||
# create lineitem table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists lineitem1;
|
||||
--enable_warnings
|
||||
create table lineitem1 (
|
||||
l_orderkey int,
|
||||
l_partkey int,
|
||||
l_suppkey int,
|
||||
l_linenumber bigint,
|
||||
l_quantity decimal(12,2),
|
||||
l_extendedprice decimal(12,2),
|
||||
l_discount decimal(12,2),
|
||||
l_tax decimal(12,2),
|
||||
l_returnflag char (1),
|
||||
l_linestatus char (1),
|
||||
l_shipdate date,
|
||||
l_commitdate date,
|
||||
l_receiptdate date,
|
||||
l_shipinstruct char (25),
|
||||
l_shipmode char (10),
|
||||
l_comment varchar (44)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE lineitem1;
|
12
mysql-test/columnstore/include/dbt3/createNation.inc
Executable file
12
mysql-test/columnstore/include/dbt3/createNation.inc
Executable file
@ -0,0 +1,12 @@
|
||||
# create nation table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists nation;
|
||||
--enable_warnings
|
||||
create table nation (
|
||||
n_nationkey int,
|
||||
n_name char (25),
|
||||
n_regionkey int,
|
||||
n_comment varchar (152)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE nation;
|
17
mysql-test/columnstore/include/dbt3/createOrders.inc
Executable file
17
mysql-test/columnstore/include/dbt3/createOrders.inc
Executable file
@ -0,0 +1,17 @@
|
||||
# create orders table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists orders;
|
||||
--enable_warnings
|
||||
create table orders (
|
||||
o_orderkey int,
|
||||
o_custkey int,
|
||||
o_orderstatus char (1),
|
||||
o_totalprice decimal(12,2),
|
||||
o_orderdate date,
|
||||
o_orderpriority char (15),
|
||||
o_clerk char (15),
|
||||
o_shippriority int,
|
||||
o_comment varchar (79)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE orders;
|
17
mysql-test/columnstore/include/dbt3/createPart.inc
Executable file
17
mysql-test/columnstore/include/dbt3/createPart.inc
Executable file
@ -0,0 +1,17 @@
|
||||
# create part table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists part;
|
||||
--enable_warnings
|
||||
create table part (
|
||||
p_partkey int,
|
||||
p_name varchar (55),
|
||||
p_mfgr char (25),
|
||||
p_brand char (10),
|
||||
p_type varchar (25),
|
||||
p_size int,
|
||||
p_container char (10),
|
||||
p_retailprice decimal(12,2),
|
||||
p_comment varchar (23)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE part;
|
13
mysql-test/columnstore/include/dbt3/createPartsupp.inc
Executable file
13
mysql-test/columnstore/include/dbt3/createPartsupp.inc
Executable file
@ -0,0 +1,13 @@
|
||||
# create partsupp table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists partsupp;
|
||||
--enable_warnings
|
||||
create table partsupp (
|
||||
ps_partkey int,
|
||||
ps_suppkey int,
|
||||
ps_availqty int,
|
||||
ps_supplycost decimal(12,2),
|
||||
ps_comment varchar (199)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE partsupp;
|
11
mysql-test/columnstore/include/dbt3/createRegion.inc
Executable file
11
mysql-test/columnstore/include/dbt3/createRegion.inc
Executable file
@ -0,0 +1,11 @@
|
||||
# create region table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists region;
|
||||
--enable_warnings
|
||||
create table region (
|
||||
r_regionkey int,
|
||||
r_name char (25),
|
||||
r_comment varchar (152)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE region;
|
15
mysql-test/columnstore/include/dbt3/createSupplier.inc
Executable file
15
mysql-test/columnstore/include/dbt3/createSupplier.inc
Executable file
@ -0,0 +1,15 @@
|
||||
# create supplier table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists supplier;
|
||||
--enable_warnings
|
||||
create table supplier (
|
||||
s_suppkey int,
|
||||
s_name char (25),
|
||||
s_address varchar (40),
|
||||
s_nationkey int,
|
||||
s_phone char (15),
|
||||
s_acctbal decimal(12,2),
|
||||
s_comment varchar (101)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE supplier;
|
135
mysql-test/columnstore/include/dbt3/createTables.inc
Executable file
135
mysql-test/columnstore/include/dbt3/createTables.inc
Executable file
@ -0,0 +1,135 @@
|
||||
# create dbt3 tables
|
||||
#
|
||||
# create nation table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists nation;
|
||||
--enable_warnings
|
||||
create table nation (
|
||||
n_nationkey int,
|
||||
n_name char (25),
|
||||
n_regionkey int,
|
||||
n_comment varchar (152)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE nation;
|
||||
#
|
||||
# create region table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists region;
|
||||
--enable_warnings
|
||||
create table region (
|
||||
r_regionkey int,
|
||||
r_name char (25),
|
||||
r_comment varchar (152)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE region;
|
||||
#
|
||||
# create customer table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists customer;
|
||||
--enable_warnings
|
||||
create table customer (
|
||||
c_custkey int,
|
||||
c_name varchar (25),
|
||||
c_address varchar (40),
|
||||
c_nationkey int,
|
||||
c_phone char (15),
|
||||
c_acctbal decimal(12,2),
|
||||
c_mktsegment char (10),
|
||||
c_comment varchar (117)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE customer;
|
||||
#
|
||||
# create orders table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists orders;
|
||||
--enable_warnings
|
||||
create table orders (
|
||||
o_orderkey int,
|
||||
o_custkey int,
|
||||
o_orderstatus char (1),
|
||||
o_totalprice decimal(12,2),
|
||||
o_orderdate date,
|
||||
o_orderpriority char (15),
|
||||
o_clerk char (15),
|
||||
o_shippriority int,
|
||||
o_comment varchar (79)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE orders;
|
||||
#
|
||||
# create supplier table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists supplier;
|
||||
--enable_warnings
|
||||
create table supplier (
|
||||
s_suppkey int,
|
||||
s_name char (25),
|
||||
s_address varchar (40),
|
||||
s_nationkey int,
|
||||
s_phone char (15),
|
||||
s_acctbal decimal(12,2),
|
||||
s_comment varchar (101)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE supplier;
|
||||
#
|
||||
# create partsupp table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists partsupp;
|
||||
--enable_warnings
|
||||
create table partsupp (
|
||||
ps_partkey int,
|
||||
ps_suppkey int,
|
||||
ps_availqty int,
|
||||
ps_supplycost decimal(12,2),
|
||||
ps_comment varchar (199)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE partsupp;
|
||||
#
|
||||
# create part table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists part;
|
||||
--enable_warnings
|
||||
create table part (
|
||||
p_partkey int,
|
||||
p_name varchar (55),
|
||||
p_mfgr char (25),
|
||||
p_brand char (10),
|
||||
p_type varchar (25),
|
||||
p_size int,
|
||||
p_container char (10),
|
||||
p_retailprice decimal(12,2),
|
||||
p_comment varchar (23)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE part;
|
||||
#
|
||||
# create lineitem table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists lineitem;
|
||||
--enable_warnings
|
||||
create table lineitem (
|
||||
l_orderkey int,
|
||||
l_partkey int,
|
||||
l_suppkey int,
|
||||
l_linenumber bigint,
|
||||
l_quantity decimal(12,2),
|
||||
l_extendedprice decimal(12,2),
|
||||
l_discount decimal(12,2),
|
||||
l_tax decimal(12,2),
|
||||
l_returnflag char (1),
|
||||
l_linestatus char (1),
|
||||
l_shipdate date,
|
||||
l_commitdate date,
|
||||
l_receiptdate date,
|
||||
l_shipinstruct char (25),
|
||||
l_shipmode char (10),
|
||||
l_comment varchar (44)
|
||||
) engine=columnstore;
|
||||
SHOW CREATE TABLE lineitem;
|
||||
#
|
@ -0,0 +1,677 @@
|
||||
#1
|
||||
select
|
||||
l_returnflag,
|
||||
l_linestatus,
|
||||
sum(l_quantity) as sum_qty,
|
||||
sum(l_extendedprice) as sum_base_price,
|
||||
sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
|
||||
sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
|
||||
avg(l_quantity) as avg_qty,
|
||||
avg(l_extendedprice) as avg_price,
|
||||
avg(l_discount) as avg_disc,
|
||||
count(*) as count_order
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_shipdate <= date_sub('1998-12-01', interval 107 day)
|
||||
group by
|
||||
l_returnflag,
|
||||
l_linestatus
|
||||
order by
|
||||
l_returnflag,
|
||||
l_linestatus;
|
||||
|
||||
#2
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp pso,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = pso.ps_partkey
|
||||
and s_suppkey = pso.ps_suppkey
|
||||
and p_size = 6
|
||||
and p_type like '%COPPER'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'MIDDLE EAST'
|
||||
and pso.ps_supplycost = (
|
||||
select
|
||||
min(psi.ps_supplycost)
|
||||
from
|
||||
partsupp psi,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
pso.ps_partkey = psi.ps_partkey
|
||||
and s_suppkey = psi.ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'MIDDLE EAST'
|
||||
)
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey
|
||||
LIMIT 100;
|
||||
|
||||
#3
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = 'HOUSEHOLD'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < '1995-03-08'
|
||||
and l_shipdate > '1995-03-08'
|
||||
group by
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
order by
|
||||
revenue desc,
|
||||
o_orderdate
|
||||
LIMIT 10;
|
||||
|
||||
#4
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date '1995-06-01'
|
||||
and o_orderdate < date_add( '1995-06-01', interval 3 month)
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_orderkey = o_orderkey
|
||||
and l_commitdate < l_receiptdate
|
||||
)
|
||||
group by
|
||||
o_orderpriority
|
||||
order by
|
||||
o_orderpriority;
|
||||
|
||||
#5
|
||||
#-- using 2789106269 as a seed to the RNG
|
||||
#-- Edited to run in CNX. Added "+ 0" so that CNX will see that the condition as a cross table comparison rather
|
||||
#-- than a join to avoid the circular join error.
|
||||
select
|
||||
n_name,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and l_suppkey = s_suppkey
|
||||
and c_nationkey = s_nationkey + 0
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'AMERICA'
|
||||
and o_orderdate >= '1993-01-01'
|
||||
and o_orderdate < date_add( '1993-01-01' , interval 1 year)
|
||||
group by
|
||||
n_name
|
||||
order by
|
||||
revenue desc;
|
||||
|
||||
#6
|
||||
select
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_shipdate >= '1995-01-01'
|
||||
and l_shipdate < date_add( '1995-01-01' , interval 1 year)
|
||||
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
|
||||
and l_quantity < 24;
|
||||
|
||||
#7
|
||||
select
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year,
|
||||
sum(volume) as revenue
|
||||
from
|
||||
(
|
||||
select
|
||||
n1.n_name as supp_nation,
|
||||
n2.n_name as cust_nation,
|
||||
year(l_shipdate) as l_year,
|
||||
l_extendedprice * (1 - l_discount) as volume
|
||||
from
|
||||
supplier,
|
||||
lineitem,
|
||||
orders,
|
||||
customer,
|
||||
nation n1,
|
||||
nation n2
|
||||
where
|
||||
s_suppkey = l_suppkey
|
||||
and o_orderkey = l_orderkey
|
||||
and c_custkey = o_custkey
|
||||
and s_nationkey = n1.n_nationkey
|
||||
and c_nationkey = n2.n_nationkey
|
||||
and (
|
||||
(n1.n_name = 'ETHIOPIA' and n2.n_name = 'JORDAN')
|
||||
or (n1.n_name = 'JORDAN' and n2.n_name = 'ETHIOPIA')
|
||||
)
|
||||
and l_shipdate between date('1995-01-01') and date('1996-12-31')
|
||||
) as shipping
|
||||
group by
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year
|
||||
order by
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year;
|
||||
|
||||
#8
|
||||
select
|
||||
o_year,
|
||||
sum(case
|
||||
when nation = 'UNITED STATES' then volume
|
||||
else 0
|
||||
end) / sum(volume) as mkt_share
|
||||
from
|
||||
(
|
||||
select
|
||||
year(o_orderdate) as o_year,
|
||||
l_extendedprice * (1 - l_discount) as volume,
|
||||
n2.n_name as nation
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
lineitem,
|
||||
orders,
|
||||
customer,
|
||||
nation n1,
|
||||
nation n2,
|
||||
region
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and s_suppkey = l_suppkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_custkey = c_custkey
|
||||
and c_nationkey = n1.n_nationkey
|
||||
and n1.n_regionkey = r_regionkey
|
||||
and r_name = 'AMERICA'
|
||||
and s_nationkey = n2.n_nationkey
|
||||
and o_orderdate between date('1995-01-01') and date ('1996-12-31')
|
||||
and p_type = 'LARGE PLATED COPPER'
|
||||
) as all_nations
|
||||
group by
|
||||
o_year
|
||||
order by
|
||||
o_year;
|
||||
|
||||
#9
|
||||
select
|
||||
nation,
|
||||
o_year,
|
||||
sum(amount) as sum_profit
|
||||
from
|
||||
(
|
||||
select
|
||||
n_name as nation,
|
||||
year(o_orderdate) as o_year,
|
||||
l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
lineitem,
|
||||
partsupp,
|
||||
orders,
|
||||
nation
|
||||
where
|
||||
s_suppkey = l_suppkey
|
||||
and ps_suppkey = l_suppkey
|
||||
and ps_partkey = l_partkey
|
||||
and p_partkey = l_partkey
|
||||
and o_orderkey = l_orderkey
|
||||
and s_nationkey = n_nationkey
|
||||
and p_name like '%gainsboro%'
|
||||
) as profit
|
||||
group by
|
||||
nation,
|
||||
o_year
|
||||
order by
|
||||
nation,
|
||||
o_year desc;
|
||||
|
||||
#10
|
||||
select
|
||||
c_custkey,
|
||||
c_name,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
c_acctbal,
|
||||
n_name,
|
||||
c_address,
|
||||
c_phone,
|
||||
c_comment
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem,
|
||||
nation
|
||||
where
|
||||
c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate >= '1994-12-01'
|
||||
and o_orderdate < date_add( '1994-12-01' , interval 3 month)
|
||||
and l_returnflag = 'R'
|
||||
and c_nationkey = n_nationkey
|
||||
group by
|
||||
c_custkey,
|
||||
c_name,
|
||||
c_acctbal,
|
||||
c_phone,
|
||||
n_name,
|
||||
c_address,
|
||||
c_comment
|
||||
order by
|
||||
revenue desc
|
||||
LIMIT 20;
|
||||
|
||||
#11
|
||||
select
|
||||
ps_partkey,
|
||||
sum(ps_supplycost * ps_availqty) as value
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
ps_suppkey = s_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'PERU'
|
||||
group by
|
||||
ps_partkey having
|
||||
sum(ps_supplycost * ps_availqty) > (
|
||||
select
|
||||
sum(ps_supplycost * ps_availqty) * 0.0001000000
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
ps_suppkey = s_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'PERU'
|
||||
)
|
||||
order by
|
||||
value desc;
|
||||
|
||||
#12
|
||||
select
|
||||
l_shipmode,
|
||||
sum(case
|
||||
when o_orderpriority = '1-URGENT'
|
||||
or o_orderpriority = '2-HIGH'
|
||||
then 1
|
||||
else 0
|
||||
end) as high_line_count,
|
||||
sum(case
|
||||
when o_orderpriority <> '1-URGENT'
|
||||
and o_orderpriority <> '2-HIGH'
|
||||
then 1
|
||||
else 0
|
||||
end) as low_line_count
|
||||
from
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
o_orderkey = l_orderkey
|
||||
and l_shipmode in ('REG AIR', 'RAIL')
|
||||
and l_commitdate < l_receiptdate
|
||||
and l_shipdate < l_commitdate
|
||||
and l_receiptdate >= '1994-01-01'
|
||||
and l_receiptdate < date_add( '1994-01-01' , interval 1 year)
|
||||
group by
|
||||
l_shipmode
|
||||
order by
|
||||
l_shipmode;
|
||||
|
||||
#13
|
||||
select
|
||||
c_count,
|
||||
count(*) as custdist
|
||||
from
|
||||
(
|
||||
select
|
||||
c_custkey,
|
||||
count(o_orderkey) as c_count
|
||||
from
|
||||
customer left outer join orders on
|
||||
c_custkey = o_custkey
|
||||
and o_comment not like '%special%requests%'
|
||||
group by
|
||||
c_custkey
|
||||
) as c_orders
|
||||
group by
|
||||
c_count
|
||||
order by
|
||||
custdist desc,
|
||||
c_count desc;
|
||||
|
||||
#14
|
||||
select
|
||||
100.00 * sum(case
|
||||
when p_type like 'PROMO%'
|
||||
then l_extendedprice * (1 - l_discount)
|
||||
else 0
|
||||
end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
and l_shipdate >= '1995-02-01'
|
||||
and l_shipdate < date_add( '1995-02-01' , interval 1 month);
|
||||
|
||||
#15
|
||||
create or replace view revenue0 (supplier_no, total_revenue) as
|
||||
select
|
||||
l_suppkey,
|
||||
sum(l_extendedprice * (1 - l_discount))
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_shipdate >= '1993-03-01'
|
||||
and l_shipdate < date_add('1993-03-01', interval 90 day)
|
||||
group by
|
||||
l_suppkey;
|
||||
|
||||
select
|
||||
s_suppkey,
|
||||
s_name,
|
||||
s_address,
|
||||
s_phone,
|
||||
total_revenue
|
||||
from
|
||||
supplier,
|
||||
revenue0
|
||||
where
|
||||
s_suppkey = supplier_no
|
||||
and total_revenue = (
|
||||
select
|
||||
max(total_revenue)
|
||||
from
|
||||
revenue0
|
||||
)
|
||||
order by
|
||||
s_suppkey;
|
||||
|
||||
drop view revenue0;
|
||||
|
||||
#16
|
||||
select
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size,
|
||||
count(distinct ps_suppkey) as supplier_cnt
|
||||
from
|
||||
partsupp,
|
||||
part
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and p_brand <> 'Brand#25'
|
||||
and p_type not like 'MEDIUM BRUSHED%'
|
||||
and p_size in (1, 37, 22, 30, 12, 26, 39, 43)
|
||||
and ps_suppkey not in (
|
||||
select
|
||||
s_suppkey
|
||||
from
|
||||
supplier
|
||||
where
|
||||
s_comment like '%Customer%Complaints%'
|
||||
)
|
||||
group by
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size
|
||||
order by
|
||||
supplier_cnt desc,
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size;
|
||||
|
||||
#17
|
||||
#-- using 3216788137 as a seed to the RNG
|
||||
#-- Modified version to conform to our current 1.1 supported syntax where additional comparisons between a subquery and an outer
|
||||
#-- query must be against the table that is being semi-joined.
|
||||
select
|
||||
sum(l_extendedprice) / 7.0 as avg_yearly
|
||||
from
|
||||
lineitem lo,
|
||||
part
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#15'
|
||||
and p_container = 'JUMBO PACK'
|
||||
and l_quantity < (
|
||||
select
|
||||
0.2 * avg(l_quantity)
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_partkey = lo.l_partkey
|
||||
);
|
||||
|
||||
#18
|
||||
select
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
o_orderdate,
|
||||
o_totalprice,
|
||||
sum(l_quantity)
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
o_orderkey in (
|
||||
select
|
||||
l_orderkey
|
||||
from
|
||||
lineitem
|
||||
group by
|
||||
l_orderkey having
|
||||
sum(l_quantity) > 314
|
||||
)
|
||||
and c_custkey = o_custkey
|
||||
and o_orderkey = l_orderkey
|
||||
group by
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
o_orderdate,
|
||||
o_totalprice
|
||||
order by
|
||||
o_totalprice desc,
|
||||
o_orderdate
|
||||
LIMIT 100;
|
||||
|
||||
#19
|
||||
#-- using 1856412683 as a seed to the RNG
|
||||
#-- Edited to run in CNX. Moved p_partkey = l_partkey join outside of the or conditions.
|
||||
select
|
||||
sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and
|
||||
((
|
||||
p_brand = 'Brand#35'
|
||||
and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
|
||||
and l_quantity >= 8 and l_quantity <= 8+10
|
||||
and p_size between 1 and 5
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_brand = 'Brand#34'
|
||||
and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
|
||||
and l_quantity >= 16 and l_quantity <= 16+10
|
||||
and p_size between 1 and 10
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_brand = 'Brand#33'
|
||||
and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
|
||||
and l_quantity >= 22 and l_quantity <= 22+10
|
||||
and p_size between 1 and 15
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
));
|
||||
|
||||
#20
|
||||
select
|
||||
s_name,
|
||||
s_address
|
||||
from
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
s_suppkey in (
|
||||
select
|
||||
distinct (ps_suppkey)
|
||||
from
|
||||
partsupp,
|
||||
part
|
||||
where
|
||||
ps_partkey=p_partkey
|
||||
and p_name like 'goldenrod%'
|
||||
and ps_availqty > (
|
||||
select
|
||||
0.5 * sum(l_quantity)
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_partkey = ps_partkey
|
||||
and l_suppkey = ps_suppkey
|
||||
and l_shipdate >= '1993-01-01'
|
||||
and l_shipdate < date_ADD('1993-01-01',interval 1 year)
|
||||
)
|
||||
)
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'IRAN'
|
||||
order by
|
||||
s_name;
|
||||
|
||||
#21
|
||||
select
|
||||
s_name,
|
||||
count(*) as numwait
|
||||
from
|
||||
supplier,
|
||||
lineitem l1,
|
||||
orders,
|
||||
nation
|
||||
where
|
||||
s_suppkey = l1.l_suppkey
|
||||
and o_orderkey = l1.l_orderkey
|
||||
and o_orderstatus = 'F'
|
||||
and l1.l_receiptdate > l1.l_commitdate
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem l2
|
||||
where
|
||||
l2.l_orderkey = l1.l_orderkey
|
||||
and l2.l_suppkey <> l1.l_suppkey
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem l3
|
||||
where
|
||||
l3.l_orderkey = l1.l_orderkey
|
||||
and l3.l_suppkey <> l1.l_suppkey
|
||||
and l3.l_receiptdate > l3.l_commitdate
|
||||
)
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'EGYPT'
|
||||
group by
|
||||
s_name
|
||||
order by
|
||||
numwait desc,
|
||||
s_name
|
||||
LIMIT 100;
|
||||
|
||||
#22
|
||||
select
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
from
|
||||
(
|
||||
select
|
||||
substr(c_phone, 1, 2) as cntrycode,
|
||||
c_acctbal
|
||||
from
|
||||
customer
|
||||
where
|
||||
substr(c_phone, 1, 2) in
|
||||
('30', '18', '15', '17', '19', '16', '27')
|
||||
and c_acctbal > (
|
||||
select
|
||||
avg(c_acctbal)
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_acctbal > 0.00
|
||||
and substr(c_phone, 1, 2) in
|
||||
('30', '18', '15', '17', '19', '16', '27')
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_custkey = c_custkey
|
||||
)
|
||||
) as vip
|
||||
group by
|
||||
cntrycode
|
||||
order by
|
||||
cntrycode;
|
669
mysql-test/columnstore/include/dbt3/dbt3_performance_queries_1m.sql
Executable file
669
mysql-test/columnstore/include/dbt3/dbt3_performance_queries_1m.sql
Executable file
@ -0,0 +1,669 @@
|
||||
#1
|
||||
select
|
||||
l_returnflag,
|
||||
l_linestatus,
|
||||
sum(l_quantity) as sum_qty,
|
||||
sum(l_extendedprice) as sum_base_price,
|
||||
sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
|
||||
sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
|
||||
avg(l_quantity) as avg_qty,
|
||||
avg(l_extendedprice) as avg_price,
|
||||
avg(l_discount) as avg_disc,
|
||||
count(*) as count_order
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_shipdate <= date_sub('1998-12-01', interval 107 day)
|
||||
group by
|
||||
l_returnflag,
|
||||
l_linestatus
|
||||
order by
|
||||
l_returnflag,
|
||||
l_linestatus;
|
||||
|
||||
#2
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp pso,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = pso.ps_partkey
|
||||
and s_suppkey = pso.ps_suppkey
|
||||
and p_size = 6
|
||||
and p_type like '%COPPER'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'MIDDLE EAST'
|
||||
and pso.ps_supplycost = (
|
||||
select
|
||||
min(psi.ps_supplycost)
|
||||
from
|
||||
partsupp psi,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
pso.ps_partkey = psi.ps_partkey
|
||||
and s_suppkey = psi.ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'MIDDLE EAST'
|
||||
)
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey
|
||||
LIMIT 100;
|
||||
|
||||
#3
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = 'HOUSEHOLD'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < '1995-03-08'
|
||||
and l_shipdate > '1995-03-08'
|
||||
group by
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
order by
|
||||
revenue desc,
|
||||
o_orderdate
|
||||
LIMIT 10;
|
||||
|
||||
#4
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date '1995-06-01'
|
||||
and o_orderdate < date_add( '1995-06-01', interval 3 month)
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_orderkey = o_orderkey
|
||||
and l_commitdate < l_receiptdate
|
||||
)
|
||||
group by
|
||||
o_orderpriority
|
||||
order by
|
||||
o_orderpriority;
|
||||
|
||||
#5
|
||||
select
|
||||
n_name,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and l_suppkey = s_suppkey
|
||||
and c_nationkey = s_nationkey + 0
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'AMERICA'
|
||||
and o_orderdate >= '1993-01-01'
|
||||
and o_orderdate < date_add( '1993-01-01' , interval 1 year)
|
||||
group by
|
||||
n_name
|
||||
order by
|
||||
revenue desc;
|
||||
|
||||
#6
|
||||
select
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_shipdate >= '1995-01-01'
|
||||
and l_shipdate < date_add( '1995-01-01' , interval 1 year)
|
||||
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
|
||||
and l_quantity < 24;
|
||||
|
||||
#7
|
||||
select
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year,
|
||||
sum(volume) as revenue
|
||||
from
|
||||
(
|
||||
select
|
||||
n1.n_name as supp_nation,
|
||||
n2.n_name as cust_nation,
|
||||
year(l_shipdate) as l_year,
|
||||
l_extendedprice * (1 - l_discount) as volume
|
||||
from
|
||||
supplier,
|
||||
lineitem,
|
||||
orders,
|
||||
customer,
|
||||
nation n1,
|
||||
nation n2
|
||||
where
|
||||
s_suppkey = l_suppkey
|
||||
and o_orderkey = l_orderkey
|
||||
and c_custkey = o_custkey
|
||||
and s_nationkey = n1.n_nationkey
|
||||
and c_nationkey = n2.n_nationkey
|
||||
and (
|
||||
(n1.n_name = 'ETHIOPIA' and n2.n_name = 'JORDAN')
|
||||
or (n1.n_name = 'JORDAN' and n2.n_name = 'ETHIOPIA')
|
||||
)
|
||||
and l_shipdate between date('1995-01-01') and date('1996-12-31')
|
||||
) as shipping
|
||||
group by
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year
|
||||
order by
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year;
|
||||
|
||||
#8
|
||||
select
|
||||
o_year,
|
||||
sum(case
|
||||
when nation = 'UNITED STATES' then volume
|
||||
else 0
|
||||
end) / sum(volume) as mkt_share
|
||||
from
|
||||
(
|
||||
select
|
||||
year(o_orderdate) as o_year,
|
||||
l_extendedprice * (1 - l_discount) as volume,
|
||||
n2.n_name as nation
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
lineitem,
|
||||
orders,
|
||||
customer,
|
||||
nation n1,
|
||||
nation n2,
|
||||
region
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and s_suppkey = l_suppkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_custkey = c_custkey
|
||||
and c_nationkey = n1.n_nationkey
|
||||
and n1.n_regionkey = r_regionkey
|
||||
and r_name = 'AMERICA'
|
||||
and s_nationkey = n2.n_nationkey
|
||||
and o_orderdate between date('1995-01-01') and date ('1996-12-31')
|
||||
and p_type = 'LARGE PLATED COPPER'
|
||||
) as all_nations
|
||||
group by
|
||||
o_year
|
||||
order by
|
||||
o_year;
|
||||
|
||||
#9
|
||||
select
|
||||
nation,
|
||||
o_year,
|
||||
sum(amount) as sum_profit
|
||||
from
|
||||
(
|
||||
select
|
||||
n_name as nation,
|
||||
year(o_orderdate) as o_year,
|
||||
l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
lineitem,
|
||||
partsupp,
|
||||
orders,
|
||||
nation
|
||||
where
|
||||
s_suppkey = l_suppkey
|
||||
and ps_suppkey = l_suppkey
|
||||
and ps_partkey = l_partkey
|
||||
and p_partkey = l_partkey
|
||||
and o_orderkey = l_orderkey
|
||||
and s_nationkey = n_nationkey
|
||||
and p_name like '%gainsboro%'
|
||||
) as profit
|
||||
group by
|
||||
nation,
|
||||
o_year
|
||||
order by
|
||||
nation,
|
||||
o_year desc;
|
||||
|
||||
#10
|
||||
select
|
||||
c_custkey,
|
||||
c_name,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
c_acctbal,
|
||||
n_name,
|
||||
c_address,
|
||||
c_phone,
|
||||
c_comment
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem,
|
||||
nation
|
||||
where
|
||||
c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate >= '1994-12-01'
|
||||
and o_orderdate < date_add( '1994-12-01' , interval 3 month)
|
||||
and l_returnflag = 'R'
|
||||
and c_nationkey = n_nationkey
|
||||
group by
|
||||
c_custkey,
|
||||
c_name,
|
||||
c_acctbal,
|
||||
c_phone,
|
||||
n_name,
|
||||
c_address,
|
||||
c_comment
|
||||
order by
|
||||
revenue desc
|
||||
LIMIT 20;
|
||||
|
||||
#11
|
||||
select
|
||||
ps_partkey,
|
||||
sum(ps_supplycost * ps_availqty) as value
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
ps_suppkey = s_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'PERU'
|
||||
group by
|
||||
ps_partkey having
|
||||
sum(ps_supplycost * ps_availqty) > (
|
||||
select
|
||||
sum(ps_supplycost * ps_availqty) * 0.0001000000
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
ps_suppkey = s_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'PERU'
|
||||
)
|
||||
order by
|
||||
value desc;
|
||||
|
||||
#12
|
||||
select
|
||||
l_shipmode,
|
||||
sum(case
|
||||
when o_orderpriority = '1-URGENT'
|
||||
or o_orderpriority = '2-HIGH'
|
||||
then 1
|
||||
else 0
|
||||
end) as high_line_count,
|
||||
sum(case
|
||||
when o_orderpriority <> '1-URGENT'
|
||||
and o_orderpriority <> '2-HIGH'
|
||||
then 1
|
||||
else 0
|
||||
end) as low_line_count
|
||||
from
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
o_orderkey = l_orderkey
|
||||
and l_shipmode in ('REG AIR', 'RAIL')
|
||||
and l_commitdate < l_receiptdate
|
||||
and l_shipdate < l_commitdate
|
||||
and l_receiptdate >= '1994-01-01'
|
||||
and l_receiptdate < date_add( '1994-01-01' , interval 1 year)
|
||||
group by
|
||||
l_shipmode
|
||||
order by
|
||||
l_shipmode;
|
||||
|
||||
#13
|
||||
select
|
||||
c_count,
|
||||
count(*) as custdist
|
||||
from
|
||||
(
|
||||
select
|
||||
c_custkey,
|
||||
count(o_orderkey) as c_count
|
||||
from
|
||||
customer left outer join orders on
|
||||
c_custkey = o_custkey
|
||||
and o_comment not like '%special%requests%'
|
||||
group by
|
||||
c_custkey
|
||||
) as c_orders
|
||||
group by
|
||||
c_count
|
||||
order by
|
||||
custdist desc,
|
||||
c_count desc;
|
||||
|
||||
#14
|
||||
select
|
||||
100.00 * sum(case
|
||||
when p_type like 'PROMO%'
|
||||
then l_extendedprice * (1 - l_discount)
|
||||
else 0
|
||||
end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
and l_shipdate >= '1995-02-01'
|
||||
and l_shipdate < date_add( '1995-02-01' , interval 1 month);
|
||||
|
||||
#15
|
||||
create or replace view revenue0 (supplier_no, total_revenue) as
|
||||
select
|
||||
l_suppkey,
|
||||
sum(l_extendedprice * (1 - l_discount))
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_shipdate >= '1993-03-01'
|
||||
and l_shipdate < date_add('1993-03-01', interval 90 day)
|
||||
group by
|
||||
l_suppkey;
|
||||
|
||||
select
|
||||
s_suppkey,
|
||||
s_name,
|
||||
s_address,
|
||||
s_phone,
|
||||
total_revenue
|
||||
from
|
||||
supplier,
|
||||
revenue0
|
||||
where
|
||||
s_suppkey = supplier_no
|
||||
and total_revenue = (
|
||||
select
|
||||
max(total_revenue)
|
||||
from
|
||||
revenue0
|
||||
)
|
||||
order by
|
||||
s_suppkey;
|
||||
|
||||
drop view revenue0;
|
||||
|
||||
#16
|
||||
select
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size,
|
||||
count(distinct ps_suppkey) as supplier_cnt
|
||||
from
|
||||
partsupp,
|
||||
part
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and p_brand <> 'Brand#25'
|
||||
and p_type not like 'MEDIUM BRUSHED%'
|
||||
and p_size in (1, 37, 22, 30, 12, 26, 39, 43)
|
||||
and ps_suppkey not in (
|
||||
select
|
||||
s_suppkey
|
||||
from
|
||||
supplier
|
||||
where
|
||||
s_comment like '%Customer%Complaints%'
|
||||
)
|
||||
group by
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size
|
||||
order by
|
||||
supplier_cnt desc,
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size;
|
||||
|
||||
#17
|
||||
select
|
||||
sum(l_extendedprice) / 7.0 as avg_yearly
|
||||
from
|
||||
lineitem lo,
|
||||
part
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and p_brand = 'Brand#15'
|
||||
and p_container = 'JUMBO PACK'
|
||||
and l_quantity < (
|
||||
select
|
||||
0.2 * avg(l_quantity)
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_partkey = lo.l_partkey
|
||||
);
|
||||
|
||||
#18
|
||||
select
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
o_orderdate,
|
||||
o_totalprice,
|
||||
sum(l_quantity)
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
o_orderkey in (
|
||||
select
|
||||
l_orderkey
|
||||
from
|
||||
lineitem
|
||||
group by
|
||||
l_orderkey having
|
||||
sum(l_quantity) > 314
|
||||
)
|
||||
and c_custkey = o_custkey
|
||||
and o_orderkey = l_orderkey
|
||||
group by
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
o_orderdate,
|
||||
o_totalprice
|
||||
order by
|
||||
o_totalprice desc,
|
||||
o_orderdate
|
||||
LIMIT 100;
|
||||
|
||||
#19
|
||||
select
|
||||
sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
from
|
||||
lineitem,
|
||||
part
|
||||
where
|
||||
p_partkey = l_partkey
|
||||
and
|
||||
((
|
||||
p_brand = 'Brand#35'
|
||||
and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
|
||||
and l_quantity >= 8 and l_quantity <= 8+10
|
||||
and p_size between 1 and 5
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_brand = 'Brand#34'
|
||||
and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
|
||||
and l_quantity >= 16 and l_quantity <= 16+10
|
||||
and p_size between 1 and 10
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
)
|
||||
or
|
||||
(
|
||||
p_brand = 'Brand#33'
|
||||
and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
|
||||
and l_quantity >= 22 and l_quantity <= 22+10
|
||||
and p_size between 1 and 15
|
||||
and l_shipmode in ('AIR', 'AIR REG')
|
||||
and l_shipinstruct = 'DELIVER IN PERSON'
|
||||
));
|
||||
|
||||
#20
|
||||
select
|
||||
s_name,
|
||||
s_address
|
||||
from
|
||||
supplier,
|
||||
nation
|
||||
where
|
||||
s_suppkey in (
|
||||
select
|
||||
distinct (ps_suppkey)
|
||||
from
|
||||
partsupp,
|
||||
part
|
||||
where
|
||||
ps_partkey=p_partkey
|
||||
and p_name like 'goldenrod%'
|
||||
and ps_availqty > (
|
||||
select
|
||||
0.5 * sum(l_quantity)
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_partkey = ps_partkey
|
||||
and l_suppkey = ps_suppkey
|
||||
and l_shipdate >= '1993-01-01'
|
||||
and l_shipdate < date_ADD('1993-01-01',interval 1 year)
|
||||
)
|
||||
)
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'IRAN'
|
||||
order by
|
||||
s_name;
|
||||
|
||||
#21
|
||||
select
|
||||
s_name,
|
||||
count(*) as numwait
|
||||
from
|
||||
supplier,
|
||||
lineitem l1,
|
||||
orders,
|
||||
nation
|
||||
where
|
||||
s_suppkey = l1.l_suppkey
|
||||
and o_orderkey = l1.l_orderkey
|
||||
and o_orderstatus = 'F'
|
||||
and l1.l_receiptdate > l1.l_commitdate
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem l2
|
||||
where
|
||||
l2.l_orderkey = l1.l_orderkey
|
||||
and l2.l_suppkey <> l1.l_suppkey
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem l3
|
||||
where
|
||||
l3.l_orderkey = l1.l_orderkey
|
||||
and l3.l_suppkey <> l1.l_suppkey
|
||||
and l3.l_receiptdate > l3.l_commitdate
|
||||
)
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = 'EGYPT'
|
||||
group by
|
||||
s_name
|
||||
order by
|
||||
numwait desc,
|
||||
s_name
|
||||
LIMIT 100;
|
||||
|
||||
#22
|
||||
select
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
from
|
||||
(
|
||||
select
|
||||
substr(c_phone, 1, 2) as cntrycode,
|
||||
c_acctbal
|
||||
from
|
||||
customer
|
||||
where
|
||||
substr(c_phone, 1, 2) in
|
||||
('30', '18', '15', '17', '19', '16', '27')
|
||||
and c_acctbal > (
|
||||
select
|
||||
avg(c_acctbal)
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_acctbal > 0.00
|
||||
and substr(c_phone, 1, 2) in
|
||||
('30', '18', '15', '17', '19', '16', '27')
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_custkey = c_custkey
|
||||
)
|
||||
) as vip
|
||||
group by
|
||||
cntrycode
|
||||
order by
|
||||
cntrycode;
|
3
mysql-test/columnstore/include/dbt3/dropCustomer.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropCustomer.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop customer table
|
||||
#
|
||||
drop table if exists customer;
|
3
mysql-test/columnstore/include/dbt3/dropLineitem.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropLineitem.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop lineitem table
|
||||
#
|
||||
drop table if exists lineitem;
|
3
mysql-test/columnstore/include/dbt3/dropNation.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropNation.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop nation table
|
||||
#
|
||||
drop table if exists nation;
|
3
mysql-test/columnstore/include/dbt3/dropOrders.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropOrders.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop orders table
|
||||
#
|
||||
drop table if exists orders;
|
3
mysql-test/columnstore/include/dbt3/dropPart.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropPart.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop part table
|
||||
#
|
||||
drop table if exists part;
|
3
mysql-test/columnstore/include/dbt3/dropPartsupp.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropPartsupp.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop partsupp table
|
||||
#
|
||||
drop table if exists partsupp;
|
3
mysql-test/columnstore/include/dbt3/dropRegion.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropRegion.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop region table
|
||||
#
|
||||
drop table if exists region;
|
3
mysql-test/columnstore/include/dbt3/dropSupplier.inc
Executable file
3
mysql-test/columnstore/include/dbt3/dropSupplier.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop supplier table
|
||||
#
|
||||
drop table if exists supplier;
|
11
mysql-test/columnstore/include/dbt3/dropTables.inc
Executable file
11
mysql-test/columnstore/include/dbt3/dropTables.inc
Executable file
@ -0,0 +1,11 @@
|
||||
# drop dbt3 tables
|
||||
#
|
||||
DROP TABLE nation;
|
||||
DROP TABLE region;
|
||||
DROP TABLE customer;
|
||||
DROP TABLE orders;
|
||||
DROP TABLE supplier;
|
||||
DROP TABLE partsupp;
|
||||
DROP TABLE part;
|
||||
DROP TABLE lineitem;
|
||||
#
|
3
mysql-test/columnstore/include/dbt3/ldiCustomer1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiCustomer1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi customer table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/customer.tbl' INTO TABLE customer FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiCustomer1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiCustomer1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi customer table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/customer.tbl' INTO TABLE customer FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiLineitem1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiLineitem1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi lineitem table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/lineitem.tbl' INTO TABLE lineitem FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiLineitem1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiLineitem1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi lineitem table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/lineitem.tbl' INTO TABLE lineitem FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiNation1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiNation1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi nation table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/nation.tbl' INTO TABLE nation FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiNation1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiNation1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi nation table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/nation.tbl' INTO TABLE nation FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiOrders1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiOrders1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi orders table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/orders.tbl' INTO TABLE orders FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiOrders1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiOrders1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi orders table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/orders.tbl' INTO TABLE orders FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiPart1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiPart1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi part table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/part.tbl' INTO TABLE part FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiPart1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiPart1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi part table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/part.tbl' INTO TABLE part FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiPartsupp1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiPartsupp1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi partsupp table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/partsupp.tbl' INTO TABLE partsupp FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiPartsupp1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiPartsupp1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi partsupp table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/partsupp.tbl' INTO TABLE partsupp FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiRegion1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiRegion1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi region table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/region.tbl' INTO TABLE region FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiRegion1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiRegion1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi region table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/region.tbl' INTO TABLE region FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiSupplier1g.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiSupplier1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi supplier table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/supplier.tbl' INTO TABLE supplier FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/dbt3/ldiSupplier1m.inc
Executable file
3
mysql-test/columnstore/include/dbt3/ldiSupplier1m.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi supplier table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/supplier.tbl' INTO TABLE supplier FIELDS TERMINATED BY '|';
|
11
mysql-test/columnstore/include/dbt3/ldiTables1g.inc
Executable file
11
mysql-test/columnstore/include/dbt3/ldiTables1g.inc
Executable file
@ -0,0 +1,11 @@
|
||||
# ldi dbt3 tables - 1g
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/nation.tbl' INTO TABLE nation FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/region.tbl' INTO TABLE region FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/customer.tbl' INTO TABLE customer FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/orders.tbl' INTO TABLE orders FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/supplier.tbl' INTO TABLE supplier FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/partsupp.tbl' INTO TABLE partsupp FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/part.tbl' INTO TABLE part FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1g/lineitem.tbl' INTO TABLE lineitem FIELDS TERMINATED BY '|';
|
||||
#
|
11
mysql-test/columnstore/include/dbt3/ldiTables1m.inc
Executable file
11
mysql-test/columnstore/include/dbt3/ldiTables1m.inc
Executable file
@ -0,0 +1,11 @@
|
||||
# ldi dbt3 tables - 1m
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/nation.tbl' INTO TABLE nation FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/region.tbl' INTO TABLE region FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/customer.tbl' INTO TABLE customer FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/orders.tbl' INTO TABLE orders FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/supplier.tbl' INTO TABLE supplier FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/partsupp.tbl' INTO TABLE partsupp FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/part.tbl' INTO TABLE part FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/dbt3/1m/lineitem.tbl' INTO TABLE lineitem FIELDS TERMINATED BY '|';
|
||||
#
|
18
mysql-test/columnstore/include/get_casual_partition_info.inc
Executable file
18
mysql-test/columnstore/include/get_casual_partition_info.inc
Executable file
@ -0,0 +1,18 @@
|
||||
perl;
|
||||
use strict;
|
||||
use warnings;
|
||||
#
|
||||
echo '------------'
|
||||
my $oidFile = '/tmp/mcpoids.txt';
|
||||
my $infoFile = '/tmp/mcpinfo.txt';
|
||||
|
||||
open(FHoid, '<', $oidFile) or die $!;
|
||||
open(FHinfo, '>>', $infoFile) or die $!;
|
||||
|
||||
while(<FHoid>){
|
||||
my $info = `/usr/bin/editem -o $_ `;
|
||||
print FHinfo $info;
|
||||
}
|
||||
close(FHinfo);
|
||||
close(FHoid);
|
||||
EOF
|
88
mysql-test/columnstore/include/regression_create_datatypetestm.inc
Executable file
88
mysql-test/columnstore/include/regression_create_datatypetestm.inc
Executable file
@ -0,0 +1,88 @@
|
||||
#
|
||||
# Note: When creating this table on the reference database make sure it's InnoDB and that the alter statements at the bottom of the
|
||||
# script are run. This is because there are some scripts that do transactional tests against the table and the reference needs
|
||||
# to be InnoDB for that. The alter table statements are to make the reference do case sensitive string comparisons to match
|
||||
# the InfiniDB behavior.
|
||||
|
||||
# -- SET storage_engine=InnoDB;
|
||||
|
||||
drop table if exists datatypetestm;
|
||||
|
||||
Create table datatypetestm (
|
||||
CIDX INTEGER,
|
||||
CBIGINT BIGINT,
|
||||
CDECIMAL1 DECIMAL(1),
|
||||
CDECIMAL4 DECIMAL(4),
|
||||
CDECIMAL4_2 DECIMAL(4,2),
|
||||
CDECIMAL5 DECIMAL(5),
|
||||
CDECIMAL9 DECIMAL(9),
|
||||
CDECIMAL9_2 DECIMAL(9,2),
|
||||
CDECIMAL10 DECIMAL(10),
|
||||
CDECIMAL18 DECIMAL(18),
|
||||
CDECIMAL18_2 DECIMAL(18,2),
|
||||
CINTEGER INTEGER,
|
||||
CSMALLINT SMALLINT,
|
||||
CTINYINT TINYINT,
|
||||
CDOUBLE DOUBLE,
|
||||
CFLOAT FLOAT,
|
||||
CDATE DATE,
|
||||
CDATETIME DATETIME,
|
||||
CCHAR1 CHAR(1),
|
||||
CCHAR2 CHAR(2),
|
||||
CCHAR3 CHAR(3),
|
||||
CCHAR4 CHAR(4),
|
||||
CCHAR5 CHAR(5),
|
||||
CCHAR6 CHAR(6),
|
||||
CCHAR7 CHAR(7),
|
||||
CCHAR8 CHAR(8),
|
||||
CCHAR9 CHAR(9),
|
||||
CCHAR255 CHAR(255),
|
||||
CVCHAR1 VARCHAR(1),
|
||||
CVCHAR2 VARCHAR(2),
|
||||
CVCHAR3 VARCHAR(3),
|
||||
CVCHAR4 VARCHAR(4),
|
||||
CVCHAR5 VARCHAR(5),
|
||||
CVCHAR6 VARCHAR(6),
|
||||
CVCHAR7 VARCHAR(7),
|
||||
CVCHAR8 VARCHAR(8),
|
||||
CVCHAR255 VARCHAR(255)
|
||||
)engine=columnstore;
|
||||
|
||||
insert into datatypetestm values
|
||||
(1,-72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa'),
|
||||
(2,-72036854775805,-8,-998,-9.98,-998,-999998,-9999.98,-9999998,-9999999999998,-99999999999.98,-7483645,-765,-25,-1.797693230E+108,-3.402865E+18,'1997-01-01','1997-01-01 00:00:01','a','b','c','d','e','f','g','h','i','j','a','b','c','d','e','f','g','h','j'),
|
||||
(3,-72036854775804,-7,-997,-9.97,-997,-999997,-9999.97,-9999997,-9999999999997,-99999999999.97,-7483644,-764,-24,-1.797693229E+108,-3.402864E+18,'1997-01-02','1997-01-02 00:00:01','a','bb','cc','dd','ee','ff','gg','hh','ii','jj','a','bb','cc','dd','ee','ff','gg','hh','jj'),
|
||||
(4,-72036854775803,-6,-996,-9.96,-996,-999996,-9999.96,-9999996,-9999999999996,-99999999999.96,-7483643,-763,-23,-1.797693228E+108,-3.402863E+18,'1997-01-03','1997-01-03 00:00:02','a','bb','ccc','ddd','eee','fff','ggg','hhh','iii','jjj','a','bb','ccc','ddd','eee','fff','ggg','hhh','jjj'),
|
||||
(5,-72036854775802,-5,-995,-9.95,-995,-999995,-9999.95,-9999995,-9999999999995,-99999999999.95,-7483642,-762,-22,-1.797693227E+108,-3.402862E+18,'1997-01-04','1997-01-04 00:00:03','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','iiii','jjjj','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','jjjj'),
|
||||
(6,72036854775803,5,995,9.95,995,999995,9999.95,9999995,9999999999995,99999999999.95,7483643,763,23,1.797693227E+108,3.402862E+18,'2009-12-28','2009-12-31 23:59:56','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','rrrrrrr','qqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','qqqqqqq'),
|
||||
(7,72036854775804,6,996,9.96,996,999996,9999.96,9999996,9999999999996,99999999999.96,7483644,764,24,1.797693228E+108,3.402863E+18,'2009-12-29','2009-12-31 23:59:57','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrr','qqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqq'),
|
||||
(8,72036854775805,7,997,9.97,997,999997,9999.97,9999997,9999999999997,99999999999.97,7483645,765,25,1.797693229E+108,3.402864E+18,'2009-12-30','2009-12-31 23:59:58','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqq'),
|
||||
(9,72036854775806,8,998,9.98,998,999998,9999.98,9999998,9999999999998,99999999999.98,7483646,766,26,1.797693230E+108,3.402865E+18,'2009-12-31','2009-12-31 23:59:59','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqqq'),
|
||||
(10,72036854775807,9,999,9.99,999,999999,9999.99,9999999,9999999999999,99999999999.99,7483647,767,27,1.797693231E+108,3.402866E+18,'2009-12-31','2009-12-31 23:59:59','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzz','zzzzzzzzzz','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzzz'),
|
||||
(11,0,0,0,0.00,0,0,0.00,0,0,0.00,0,0,0,0.00,0.00,'2009-12-31','2009-12-31 23:59:59',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
||||
#*
|
||||
#* Run these on the referene database if you ever have to recreate that.
|
||||
#* This will make the reference database behave in a case sensitive manner which is how InfiniDB behaves.
|
||||
|
||||
#alter table datatypetestm modify CCHAR1 char(1) binary;
|
||||
#alter table datatypetestm modify CCHAR2 char(2) binary;
|
||||
#alter table datatypetestm modify CCHAR3 char(3) binary;
|
||||
#alter table datatypetestm modify CCHAR4 char(4) binary;
|
||||
#alter table datatypetestm modify CCHAR5 char(5) binary;
|
||||
#alter table datatypetestm modify CCHAR6 char(6) binary;
|
||||
#alter table datatypetestm modify CCHAR7 char(7) binary;
|
||||
#alter table datatypetestm modify CCHAR8 char(8) binary;
|
||||
#alter table datatypetestm modify CCHAR9 char(9) binary;
|
||||
#alter table datatypetestm modify CCHAR255 char(255) binary;
|
||||
|
||||
#alter table datatypetestm modify CVCHAR1 varchar(1) binary;
|
||||
#alter table datatypetestm modify CVCHAR2 varchar(2) binary;
|
||||
#alter table datatypetestm modify CVCHAR3 varchar(3) binary;
|
||||
#alter table datatypetestm modify CVCHAR4 varchar(4) binary;
|
||||
#alter table datatypetestm modify CVCHAR5 varchar(5) binary;
|
||||
#alter table datatypetestm modify CVCHAR6 varchar(6) binary;
|
||||
#alter table datatypetestm modify CVCHAR7 varchar(7) binary;
|
||||
#alter table datatypetestm modify CVCHAR8 varchar(8) binary;
|
||||
#alter table datatypetestm modify CVCHAR255 varchar(255) binary;
|
||||
#*/
|
65
mysql-test/columnstore/include/regression_create_datatypetestm1.inc
Executable file
65
mysql-test/columnstore/include/regression_create_datatypetestm1.inc
Executable file
@ -0,0 +1,65 @@
|
||||
drop table if exists datatypetestm1;
|
||||
|
||||
Create table datatypetestm1 (
|
||||
CIDX INTEGER,
|
||||
CBIGINT BIGINT,
|
||||
CDECIMAL1 DECIMAL(1),
|
||||
CDECIMAL4 DECIMAL(4),
|
||||
CDECIMAL4_2 DECIMAL(4,2),
|
||||
CDECIMAL5 DECIMAL(5),
|
||||
CDECIMAL9 DECIMAL(9),
|
||||
CDECIMAL9_2 DECIMAL(9,2),
|
||||
CDECIMAL10 DECIMAL(10),
|
||||
CDECIMAL18 DECIMAL(18),
|
||||
CDECIMAL18_2 DECIMAL(18,2),
|
||||
CINTEGER INTEGER,
|
||||
CSMALLINT SMALLINT,
|
||||
CTINYINT TINYINT,
|
||||
CDOUBLE DOUBLE,
|
||||
CFLOAT FLOAT,
|
||||
CDATE DATE,
|
||||
CDATETIME DATETIME,
|
||||
CCHAR1 CHAR(1),
|
||||
CCHAR2 CHAR(2),
|
||||
CCHAR3 CHAR(3),
|
||||
CCHAR4 CHAR(4),
|
||||
CCHAR5 CHAR(5),
|
||||
CCHAR6 CHAR(6),
|
||||
CCHAR7 CHAR(7),
|
||||
CCHAR8 CHAR(8),
|
||||
CCHAR9 CHAR(9),
|
||||
CCHAR255 CHAR(255),
|
||||
CVCHAR1 VARCHAR(1),
|
||||
CVCHAR2 VARCHAR(2),
|
||||
CVCHAR3 VARCHAR(3),
|
||||
CVCHAR4 VARCHAR(4),
|
||||
CVCHAR5 VARCHAR(5),
|
||||
CVCHAR6 VARCHAR(6),
|
||||
CVCHAR7 VARCHAR(7),
|
||||
CVCHAR8 VARCHAR(8),
|
||||
CVCHAR255 VARCHAR(255)
|
||||
) engine=columnstore;
|
||||
|
||||
insert into datatypetestm1 values
|
||||
(1,-72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa'),
|
||||
(2, -72036854775805,-8,-998,-9.98,-998,-999998,-9999.98,-9999998,-9999999999998,-99999999999.98,-7483645,-765,-25,-1.797693230E+108,-3.402865E+18,'1997-01-01','1997-01-01 00:00:01','a','b','c','d','e','f','g','h','i','j','a','b','c','d','e','f','g','h','j'),
|
||||
(3, -72036854775804,-7,-997,-9.97,-997,-999997,-9999.97,-9999997,-9999999999997,-99999999999.97,-7483644,-764,-24,-1.797693229E+108,-3.402864E+18,'1997-01-02','1997-01-02 00:00:01','a','bb','cc','dd','ee','ff','gg','hh','ii','jj','a','bb','cc','dd','ee','ff','gg','hh','jj'),
|
||||
(4, -72036854775803,-6,-996,-9.96,-996,-999996,-9999.96,-9999996,-9999999999996,-99999999999.96,-7483643,-763,-23,-1.797693228E+108,-3.402863E+18,'1997-01-03','1997-01-03 00:00:02','a','bb','ccc','ddd','eee','fff','ggg','hhh','iii','jjj','a','bb','ccc','ddd','eee','fff','ggg','hhh','jjj'),
|
||||
(5, -72036854775802,-5,-995,-9.95,-995,-999995,-9999.95,-9999995,-9999999999995,-99999999999.95,-7483642,-762,-22,-1.797693227E+108,-3.402862E+18,'1997-01-04','1997-01-04 00:00:03','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','iiii','jjjj','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','jjjj'),
|
||||
(6, 72036854775803,5,995,9.95,995,999995,9999.95,9999995,9999999999995,99999999999.95,7483643,763,23,1.797693227E+108,3.402862E+18,'2009-12-28','2009-12-31 23:59:56','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','rrrrrrr','qqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','qqqqqqq'),
|
||||
(7, 72036854775804,6,996,9.96,996,999996,9999.96,9999996,9999999999996,99999999999.96,7483644,764,24,1.797693228E+108,3.402863E+18,'2009-12-29','2009-12-31 23:59:57','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrr','qqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqq'),
|
||||
(8, 72036854775805,7,997,9.97,997,999997,9999.97,9999997,9999999999997,99999999999.97,7483645,765,25,1.797693229E+108,3.402864E+18,'2009-12-30','2009-12-31 23:59:58','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqq'),
|
||||
(9, 72036854775806,8,998,9.98,998,999998,9999.98,9999998,9999999999998,99999999999.98,7483646,766,26,1.797693230E+108,3.402865E+18,'2009-12-31','2009-12-31 23:59:59','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqqq'),
|
||||
(10, 72036854775807,9,999,9.99,999,999999,9999.99,9999999,9999999999999,99999999999.99,7483647,767,27,1.797693231E+108,3.402866E+18,'2009-12-31','2009-12-31 23:59:59','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzz','zzzzzzzzzz','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzzz'),
|
||||
(11, 0,0,0,0.00,0,0,0.00,0,0,0.00,0,0,0,0.00,0.00,'2009-12-31','2009-12-31 23:59:59',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(12, -72036854775806,-9,-999,-9.99,-999,-999999,-9999.99,-9999999,-9999999999999,-99999999999.99,-7483646,-766,-26,-1.797693231E+108,-3.402866E+18,'1997-01-01','1997-01-01 00:00:00','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaa','aaaaaaaaaa','a','aa','aaa','aaaa','aaaaa','aaaaaa','aaaaaaa','aaaaaaaa','aaaaaaaaaa'),
|
||||
(13, -72036854775805,-8,-998,-9.98,-998,-999998,-9999.98,-9999998,-9999999999998,-99999999999.98,-7483645,-765,-25,-1.797693230E+108,-3.402865E+18,'1997-01-01','1997-01-01 00:00:01','a','b','c','d','e','f','g','h','i','j','a','b','c','d','e','f','g','h','j'),
|
||||
(14, -72036854775804,-7,-997,-9.97,-997,-999997,-9999.97,-9999997,-9999999999997,-99999999999.97,-7483644,-764,-24,-1.797693229E+108,-3.402864E+18,'1997-01-02','1997-01-02 00:00:01','a','bb','cc','dd','ee','ff','gg','hh','ii','jj','a','bb','cc','dd','ee','ff','gg','hh','jj'),
|
||||
(15, -72036854775803,-6,-996,-9.96,-996,-999996,-9999.96,-9999996,-9999999999996,-99999999999.96,-7483643,-763,-23,-1.797693228E+108,-3.402863E+18,'1997-01-03','1997-01-03 00:00:02','a','bb','ccc','ddd','eee','fff','ggg','hhh','iii','jjj','a','bb','ccc','ddd','eee','fff','ggg','hhh','jjj'),
|
||||
(16, -72036854775802,-5,-995,-9.95,-995,-999995,-9999.95,-9999995,-9999999999995,-99999999999.95,-7483642,-762,-22,-1.797693227E+108,-3.402862E+18,'1997-01-04','1997-01-04 00:00:03','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','iiii','jjjj','a','bb','ccc','dddd','eeee','ffff','gggg','hhhh','jjjj'),
|
||||
(17, 72036854775803,5,995,9.95,995,999995,9999.95,9999995,9999999999995,99999999999.95,7483643,763,23,1.797693227E+108,3.402862E+18,'2009-12-28','2009-12-31 23:59:56','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','rrrrrrr','qqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','sssssss','qqqqqqq'),
|
||||
(18, 72036854775804,6,996,9.96,996,999996,9999.96,9999996,9999999999996,99999999999.96,7483644,764,24,1.797693228E+108,3.402863E+18,'2009-12-29','2009-12-31 23:59:57','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrr','qqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqq'),
|
||||
(19, 72036854775805,7,997,9.97,997,999997,9999.97,9999997,9999999999997,99999999999.97,7483645,765,25,1.797693229E+108,3.402864E+18,'2009-12-30','2009-12-31 23:59:58','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqq'),
|
||||
(20, 72036854775806,8,998,9.98,998,999998,9999.98,9999998,9999999999998,99999999999.98,7483646,766,26,1.797693230E+108,3.402865E+18,'2009-12-31','2009-12-31 23:59:59','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','rrrrrrrrr','qqqqqqqqqq','z','yy','xxx','wwww','vvvvv','uuuuuu','ttttttt','ssssssss','qqqqqqqqqq'),
|
||||
(21, 72036854775807,9,999,9.99,999,999999,9999.99,9999999,9999999999999,99999999999.99,7483647,767,27,1.797693231E+108,3.402866E+18,'2009-12-31','2009-12-31 23:59:59','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzz','zzzzzzzzzz','z','zz','zzz','zzzz','zzzzz','zzzzzz','zzzzzzz','zzzzzzzz','zzzzzzzzzz'),
|
||||
(22,0,0,0,0.00,0,0,0.00,0,0,0.00,0,0,0,0.00,0.00,'2009-12-31','2009-12-31 23:59:59',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
22235
mysql-test/columnstore/include/regression_create_dtypes.inc
Normal file
22235
mysql-test/columnstore/include/regression_create_dtypes.inc
Normal file
File diff suppressed because it is too large
Load Diff
21
mysql-test/columnstore/include/regression_create_empsalary.inc
Executable file
21
mysql-test/columnstore/include/regression_create_empsalary.inc
Executable file
@ -0,0 +1,21 @@
|
||||
DROP TABLE if exists empsalary;
|
||||
|
||||
CREATE TABLE empsalary (
|
||||
depname varchar(100),
|
||||
empno bigint,
|
||||
salary int,
|
||||
enroll_date date
|
||||
)engine=columnstore;
|
||||
|
||||
insert into empsalary values ('develop' , 10, 5200, '2007-08-01');
|
||||
insert into empsalary values ('sales' , 1, 5000, '2006-10-01');
|
||||
insert into empsalary values ('personnel', 5, 3500, '2007-12-10');
|
||||
insert into empsalary values ('sales' , 4, 4800, '2007-08-08');
|
||||
insert into empsalary values ('personnel', 2, 3900, '2006-12-23');
|
||||
insert into empsalary values ('develop' , 7, 4200, '2008-01-01');
|
||||
insert into empsalary values ('develop' , 9, 4500, '2008-01-01');
|
||||
insert into empsalary values ('sales' , 3, 4800, '2007-08-01');
|
||||
insert into empsalary values ('develop' , 8, 6000, '2006-10-01');
|
||||
insert into empsalary values ('develop' , 11, 5200, '2007-08-15');
|
||||
insert into empsalary values ('develop' , 12, null, '2008-08-09');
|
||||
|
259
mysql-test/columnstore/include/regression_create_misc_tables.inc
Executable file
259
mysql-test/columnstore/include/regression_create_misc_tables.inc
Executable file
@ -0,0 +1,259 @@
|
||||
drop database if exists bulkload_features;
|
||||
create database bulkload_features;
|
||||
use bulkload_features;
|
||||
|
||||
drop table if exists autoinc;
|
||||
drop table if exists enclosedby;
|
||||
drop table if exists saturation;
|
||||
drop table if exists bug3801;
|
||||
drop table if exists bug3810;
|
||||
drop table if exists part;
|
||||
drop table if exists simple;
|
||||
drop table if exists bug4231;
|
||||
drop table if exists selectIntoImport;
|
||||
drop table if exists bug2828notnull;
|
||||
drop table if exists misc;
|
||||
drop table if exists misc2;
|
||||
drop table if exists bug4171a;
|
||||
drop table if exists bug4171b;
|
||||
drop table if exists bug4089enclosedcharbadfile;
|
||||
drop table if exists bug4916enclosedbdry;
|
||||
drop table if exists bug4342;
|
||||
drop table if exists bug4342_m3;
|
||||
drop table if exists binarysigned;
|
||||
drop table if exists binaryunsigned;
|
||||
drop table if exists binarychar;
|
||||
drop table if exists bug4379;
|
||||
|
||||
create table autoinc (
|
||||
c1 int,
|
||||
c2 int
|
||||
) engine=columnstore comment='autoincrement=c2';
|
||||
|
||||
create table enclosedby (
|
||||
c1 varchar(40),
|
||||
c2 varchar(40),
|
||||
c3 varchar(40),
|
||||
c4 varchar(40),
|
||||
c5 varchar(40)
|
||||
) engine=columnstore;
|
||||
|
||||
create table saturation (
|
||||
c1 tinyint,
|
||||
c2 smallint,
|
||||
c3 int,
|
||||
c4 bigint,
|
||||
c5 decimal(4,2)
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Starting with 2.0, decimal cols are created with syscolumn.datatype=4. Before that, they their datatype integer types.
|
||||
#The bug3801 table is to test the backwards compatibility of the old syscolumn definition.
|
||||
#
|
||||
create table bug3801 (
|
||||
id int,
|
||||
c1 decimal(10,3),
|
||||
c2 decimal(9,2)
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Decimal(10,3) was a bigint (datatype=9) and decimal(9,2) was an int (datatype=6).
|
||||
#
|
||||
update calpontsys.syscolumn set datatype=9 where tablename='bug3801' and columnname='c1';
|
||||
update calpontsys.syscolumn set datatype=6 where tablename='bug3801' and columnname='c2';
|
||||
|
||||
#
|
||||
#Test bug3810 involving read buffer copy overflow bug when working with
|
||||
#data containing embedded enclosed-by character
|
||||
#
|
||||
create table bug3810 (
|
||||
i1 int,
|
||||
c1 varchar(20),
|
||||
c2 varchar(20),
|
||||
c3 varchar(20),
|
||||
c4 varchar(20),
|
||||
c5 varchar(20)
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#SSB schema part table. Used for a normal job file cpimport such as "cpimport -j 299"
|
||||
#
|
||||
CREATE TABLE `part` (
|
||||
`p_partkey` int(11) DEFAULT NULL,
|
||||
`p_name` varchar(22) DEFAULT NULL,
|
||||
`p_mfgr` char(6) DEFAULT NULL,
|
||||
`p_category` char(7) DEFAULT NULL,
|
||||
`p_brand1` char(9) DEFAULT NULL,
|
||||
`p_color` varchar(11) DEFAULT NULL,
|
||||
`p_type` varchar(25) DEFAULT NULL,
|
||||
`p_size` int(11) DEFAULT NULL,
|
||||
`p_container` char(10) DEFAULT NULL
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#SSB schema part table. Used for a select | cpimport test."
|
||||
#
|
||||
CREATE TABLE `selectIntoImport` (
|
||||
`p_partkey` int(11) DEFAULT NULL,
|
||||
`p_name` varchar(22) DEFAULT NULL,
|
||||
`p_mfgr` char(6) DEFAULT NULL,
|
||||
`p_category` char(7) DEFAULT NULL,
|
||||
`p_brand1` char(9) DEFAULT NULL,
|
||||
`p_color` varchar(11) DEFAULT NULL,
|
||||
`p_type` varchar(25) DEFAULT NULL,
|
||||
`p_size` int(11) DEFAULT NULL,
|
||||
`p_container` char(10) DEFAULT NULL
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Simple table for loaded with simple syntax such as "cpimport schema table file".
|
||||
#
|
||||
CREATE TABLE `simple` (
|
||||
`c_custkey` int(11) DEFAULT NULL,
|
||||
`c_name` varchar(25) DEFAULT NULL,
|
||||
`c_address` varchar(25) DEFAULT NULL,
|
||||
`c_city` char(10) DEFAULT NULL,
|
||||
`c_nation` char(15) DEFAULT NULL,
|
||||
`c_region` char(12) DEFAULT NULL,
|
||||
`c_phone` char(15) DEFAULT NULL,
|
||||
`c_mktsegment` char(10) DEFAULT NULL
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4231 (
|
||||
c1 int,
|
||||
c2 int
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Table used to test Bug 2828: Not Null with default
|
||||
#
|
||||
create table bug2828notnull (
|
||||
reckey int not null,
|
||||
int1_t tinyint not null,
|
||||
int1_s smallint not null,
|
||||
int1_i int not null,
|
||||
int1_b bigint not null,
|
||||
int1_td decimal (2,1) not null,
|
||||
int1_sd decimal (4,2) not null,
|
||||
int1_id decimal (8,4) not null,
|
||||
int1_bd decimal (12,2) not null,
|
||||
int1_dt date not null,
|
||||
int1_tm datetime not null,
|
||||
str1_i char(4) not null,
|
||||
str1_d varchar(20) not null,
|
||||
int2_t tinyint not null default 11,
|
||||
int2_s smallint not null default 222,
|
||||
int2_i int not null default 3333,
|
||||
int2_b bigint not null default 44444,
|
||||
int2_td decimal (2,1) not null default 1.1,
|
||||
int2_sd decimal (4,2) not null default 2.22,
|
||||
int2_id decimal (8,4) not null default 3.3333,
|
||||
int2_bd decimal (12,2) not null default 4.44,
|
||||
int2_dt date not null default '1927-01-07',
|
||||
int2_tm datetime not null default '1924-08-17 03:04:05',
|
||||
str2_i char(4) not null default 'xyz',
|
||||
str2_d varchar(20) not null default 'abcxyz',
|
||||
int3_t tinyint default 11,
|
||||
int3_s smallint default 222,
|
||||
int3_i int default 3333,
|
||||
int3_b bigint default 44444,
|
||||
int3_td decimal (2,1) default 1.1,
|
||||
int3_sd decimal (4,2) default 2.22,
|
||||
int3_id decimal (8,4) default 3.3333,
|
||||
int3_bd decimal (12,2) default 4.44,
|
||||
int3_dt date default '1957-09-18',
|
||||
int3_tm datetime default '1953-05-02 07:08:09',
|
||||
str3_i char(4) default 'xyz',
|
||||
str3_d varchar(20) default 'abcxyz'
|
||||
) engine=columnstore;
|
||||
|
||||
create table misc (
|
||||
c1 int,
|
||||
c2 int
|
||||
) engine=columnstore;
|
||||
|
||||
create table misc2 (
|
||||
c1 int,
|
||||
c2 int
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4171a (
|
||||
c1 int
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4171b (
|
||||
c1 int
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4089enclosedcharbadfile (
|
||||
c1 varchar(100),
|
||||
c2 bigint
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4916enclosedbdry (
|
||||
stringId bigint(20) DEFAULT NULL,
|
||||
stringName varchar(512) DEFAULT NULL
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4342 (
|
||||
c1 int
|
||||
) engine=columnstore;
|
||||
|
||||
create table bug4342_m3 (
|
||||
c1 int
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Binary import enhancement (Bug5027): signed numbers
|
||||
#
|
||||
create table binarysigned (
|
||||
mode int,
|
||||
id int,
|
||||
t1 tinyint,
|
||||
s2 smallint,
|
||||
i3 int,
|
||||
b4 bigint,
|
||||
t5 decimal(2,1),
|
||||
s6 decimal(4,2),
|
||||
i7 decimal(7,2),
|
||||
b8 decimal(12,2),
|
||||
f9 float,
|
||||
d10 double
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Binary import enhancement (Bug5027): unsigned numbers
|
||||
#
|
||||
create table binaryunsigned (
|
||||
mode int,
|
||||
id int,
|
||||
t1 tinyint unsigned,
|
||||
s2 smallint unsigned,
|
||||
i3 int unsigned,
|
||||
b4 bigint unsigned,
|
||||
t5 decimal(2,1) unsigned,
|
||||
s6 decimal(4,2) unsigned,
|
||||
i7 decimal(7,2) unsigned,
|
||||
b8 decimal(12,2) unsigned,
|
||||
f9 float unsigned,
|
||||
d10 double unsigned
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Binary import enhancement (Bug5027): non-numeric columns
|
||||
#
|
||||
create table binarychar (
|
||||
mode int,
|
||||
id int,
|
||||
c1 char(5),
|
||||
c2 varchar(11),
|
||||
c3 date,
|
||||
c4 datetime
|
||||
) engine=columnstore;
|
||||
|
||||
#
|
||||
#Import with -f option.
|
||||
#
|
||||
create table bug4379 (
|
||||
c1 int
|
||||
) engine=columnstore;
|
9056
mysql-test/columnstore/include/regression_create_simple_subselect.inc
Executable file
9056
mysql-test/columnstore/include/regression_create_simple_subselect.inc
Executable file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,81 @@
|
||||
drop table if exists wide;
|
||||
drop table if exists wide2;
|
||||
|
||||
create table wide (
|
||||
idx int,
|
||||
c1 varchar(1000),
|
||||
c2 varchar(1000),
|
||||
c3 varchar(1000),
|
||||
c4 varchar(1000),
|
||||
c5 varchar(1000),
|
||||
c6 varchar(1000),
|
||||
c7 varchar(1000),
|
||||
c8 varchar(1000),
|
||||
c9 varchar(1000),
|
||||
c10 varchar(1000),
|
||||
c11 varchar(1000),
|
||||
c12 varchar(1000),
|
||||
c13 varchar(1000),
|
||||
c14 varchar(1000),
|
||||
c15 varchar(1000),
|
||||
c16 varchar(1000),
|
||||
c17 varchar(1000),
|
||||
c18 varchar(1000),
|
||||
c19 varchar(1000),
|
||||
c20 varchar(1000),
|
||||
c21 varchar(1000),
|
||||
c22 varchar(1000),
|
||||
c23 varchar(1000),
|
||||
c24 varchar(1000),
|
||||
c25 varchar(1000),
|
||||
c26 varchar(1000),
|
||||
c27 varchar(1000),
|
||||
c28 varchar(1000),
|
||||
c29 varchar(1000),
|
||||
c30 varchar(1000),
|
||||
c31 varchar(1000),
|
||||
c32 varchar(1000),
|
||||
c33 varchar(1000),
|
||||
c34 varchar(1000),
|
||||
c35 varchar(1000),
|
||||
c36 varchar(1000),
|
||||
c37 varchar(1000),
|
||||
c38 varchar(1000),
|
||||
c39 varchar(1000),
|
||||
c40 varchar(1000),
|
||||
c41 varchar(1000),
|
||||
c42 varchar(1000),
|
||||
c43 varchar(1000),
|
||||
c44 varchar(1000),
|
||||
c45 varchar(1000),
|
||||
c46 varchar(1000),
|
||||
c47 varchar(1000),
|
||||
c48 varchar(1000),
|
||||
c49 varchar(1000),
|
||||
c50 varchar(1000)
|
||||
)engine=columnstore;
|
||||
|
||||
create table wide2 (
|
||||
id int(11) ,
|
||||
c1 float ,
|
||||
c2 float ,
|
||||
c3 float ,
|
||||
c4 float ,
|
||||
c5 decimal(8,2) ,
|
||||
c6 decimal(6,4) ,
|
||||
c7 decimal(10,3) ,
|
||||
c8 decimal(8,2) ,
|
||||
c9 varchar(200) ,
|
||||
c10 varchar(200) ,
|
||||
c11 varchar(200) ,
|
||||
c12 varchar(800) ,
|
||||
c13 varchar(800) ,
|
||||
c14 varchar(1000),
|
||||
c15 varchar(1000),
|
||||
c16 varchar(1000),
|
||||
c17 varchar(2000),
|
||||
c18 varchar(2000),
|
||||
c19 varchar(4000),
|
||||
c20 varchar(4000),
|
||||
c_temp varchar(16)
|
||||
)engine=columnstore;
|
3
mysql-test/columnstore/include/ssb/countCustomer.inc
Executable file
3
mysql-test/columnstore/include/ssb/countCustomer.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count customer table
|
||||
#
|
||||
select count(*) from customer;
|
3
mysql-test/columnstore/include/ssb/countDateinfo.inc
Executable file
3
mysql-test/columnstore/include/ssb/countDateinfo.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count dateinfo table
|
||||
#
|
||||
select count(*) from dateinfo;
|
3
mysql-test/columnstore/include/ssb/countLineorder.inc
Executable file
3
mysql-test/columnstore/include/ssb/countLineorder.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count lineorder table
|
||||
#
|
||||
select count(*) from lineorder;
|
3
mysql-test/columnstore/include/ssb/countPart.inc
Executable file
3
mysql-test/columnstore/include/ssb/countPart.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count part table
|
||||
#
|
||||
select count(*) from part;
|
3
mysql-test/columnstore/include/ssb/countSupplier.inc
Executable file
3
mysql-test/columnstore/include/ssb/countSupplier.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# select count supplier table
|
||||
#
|
||||
select count(*) from supplier;
|
7
mysql-test/columnstore/include/ssb/countTables.inc
Executable file
7
mysql-test/columnstore/include/ssb/countTables.inc
Executable file
@ -0,0 +1,7 @@
|
||||
# select count ssb tables
|
||||
#
|
||||
SELECT COUNT(*) FROM customer;
|
||||
SELECT COUNT(*) FROM dateinfo;
|
||||
SELECT COUNT(*) FROM part;
|
||||
SELECT COUNT(*) FROM lineorder;
|
||||
SELECT COUNT(*) FROM supplier;
|
16
mysql-test/columnstore/include/ssb/createCustomer.inc
Executable file
16
mysql-test/columnstore/include/ssb/createCustomer.inc
Executable file
@ -0,0 +1,16 @@
|
||||
# create customer table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists customer;
|
||||
--enable_warnings
|
||||
create table customer (
|
||||
c_custkey int,
|
||||
c_name varchar (25),
|
||||
c_address varchar (25),
|
||||
c_city char (10),
|
||||
c_nation char (15),
|
||||
c_region char (12),
|
||||
c_phone char (15),
|
||||
c_mktsegment char (10)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE customer;
|
25
mysql-test/columnstore/include/ssb/createDateinfo.inc
Executable file
25
mysql-test/columnstore/include/ssb/createDateinfo.inc
Executable file
@ -0,0 +1,25 @@
|
||||
# create dateinfo table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists dateinfo;
|
||||
--enable_warnings
|
||||
create table `dateinfo` (
|
||||
d_datekey int,
|
||||
d_date char (18),
|
||||
d_dayofweek char (9),
|
||||
d_month char (9),
|
||||
d_year int,
|
||||
d_yearmonthnum int,
|
||||
d_yearmonth char (7),
|
||||
d_daynuminweek int,
|
||||
d_daynuminmonth int,
|
||||
d_daynuminyear int,
|
||||
d_monthnuminyear int,
|
||||
d_weeknuminyear int,
|
||||
d_sellingseason varchar (12),
|
||||
d_lastdayinweekfl tinyint,
|
||||
d_lastdayinmonthfl tinyint,
|
||||
d_holidayfl tinyint,
|
||||
d_weekdayfl tinyint
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE dateinfo;
|
25
mysql-test/columnstore/include/ssb/createLineorder.inc
Executable file
25
mysql-test/columnstore/include/ssb/createLineorder.inc
Executable file
@ -0,0 +1,25 @@
|
||||
# create lineorder table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists lineorder;
|
||||
--enable_warnings
|
||||
create table lineorder (
|
||||
lo_orderkey bigint,
|
||||
lo_linenumber int,
|
||||
lo_custkey int,
|
||||
lo_partkey int,
|
||||
lo_suppkey int,
|
||||
lo_orderdate int,
|
||||
lo_orderpriority char (15),
|
||||
lo_shippriority char (1),
|
||||
lo_quantity decimal (12,2),
|
||||
lo_extendedprice decimal (12,2),
|
||||
lo_ordtotalprice decimal (12,2),
|
||||
lo_discount decimal (12,2),
|
||||
lo_revenue decimal (12,2),
|
||||
lo_supplycost decimal (12,2),
|
||||
lo_tax decimal (12,2),
|
||||
lo_commitdate int,
|
||||
lo_shipmode char (10)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE lineorder;
|
17
mysql-test/columnstore/include/ssb/createPart.inc
Executable file
17
mysql-test/columnstore/include/ssb/createPart.inc
Executable file
@ -0,0 +1,17 @@
|
||||
# create part table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists part;
|
||||
--enable_warnings
|
||||
create table part (
|
||||
p_partkey int,
|
||||
p_name varchar (22),
|
||||
p_mfgr char (6),
|
||||
p_category char (7),
|
||||
p_brand1 char (9),
|
||||
p_color varchar (11),
|
||||
p_type varchar (25),
|
||||
p_size int,
|
||||
p_container char (10)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE part;
|
15
mysql-test/columnstore/include/ssb/createSupplier.inc
Executable file
15
mysql-test/columnstore/include/ssb/createSupplier.inc
Executable file
@ -0,0 +1,15 @@
|
||||
# create supplier table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists supplier;
|
||||
--enable_warnings
|
||||
create table supplier (
|
||||
s_suppkey int,
|
||||
s_name char (25),
|
||||
s_address varchar (25),
|
||||
s_city char (10),
|
||||
s_nation char (15),
|
||||
s_region char (12),
|
||||
s_phone char (15)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE supplier;
|
95
mysql-test/columnstore/include/ssb/createTables.inc
Executable file
95
mysql-test/columnstore/include/ssb/createTables.inc
Executable file
@ -0,0 +1,95 @@
|
||||
# create ssb tables
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists customer;
|
||||
--enable_warnings
|
||||
create table customer (
|
||||
c_custkey int,
|
||||
c_name varchar (25),
|
||||
c_address varchar (25),
|
||||
c_city char (10),
|
||||
c_nation char (15),
|
||||
c_region char (12),
|
||||
c_phone char (15),
|
||||
c_mktsegment char (10)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE customer;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists dateinfo;
|
||||
--enable_warnings
|
||||
create table `dateinfo` (
|
||||
d_datekey int,
|
||||
d_date char (18),
|
||||
d_dayofweek char (9),
|
||||
d_month char (9),
|
||||
d_year int,
|
||||
d_yearmonthnum int,
|
||||
d_yearmonth char (7),
|
||||
d_daynuminweek int,
|
||||
d_daynuminmonth int,
|
||||
d_daynuminyear int,
|
||||
d_monthnuminyear int,
|
||||
d_weeknuminyear int,
|
||||
d_sellingseason varchar (12),
|
||||
d_lastdayinweekfl tinyint,
|
||||
d_lastdayinmonthfl tinyint,
|
||||
d_holidayfl tinyint,
|
||||
d_weekdayfl tinyint
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE dateinfo;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists lineorder;
|
||||
--enable_warnings
|
||||
create table lineorder (
|
||||
lo_orderkey bigint,
|
||||
lo_linenumber int,
|
||||
lo_custkey int,
|
||||
lo_partkey int,
|
||||
lo_suppkey int,
|
||||
lo_orderdate int,
|
||||
lo_orderpriority char (15),
|
||||
lo_shippriority char (1),
|
||||
lo_quantity decimal (12,2),
|
||||
lo_extendedprice decimal (12,2),
|
||||
lo_ordtotalprice decimal (12,2),
|
||||
lo_discount decimal (12,2),
|
||||
lo_revenue decimal (12,2),
|
||||
lo_supplycost decimal (12,2),
|
||||
lo_tax decimal (12,2),
|
||||
lo_commitdate int,
|
||||
lo_shipmode char (10)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE lineorder;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists part;
|
||||
--enable_warnings
|
||||
create table part (
|
||||
p_partkey int,
|
||||
p_name varchar (22),
|
||||
p_mfgr char (6),
|
||||
p_category char (7),
|
||||
p_brand1 char (9),
|
||||
p_color varchar (11),
|
||||
p_type varchar (25),
|
||||
p_size int,
|
||||
p_container char (10)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE part;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists supplier;
|
||||
--enable_warnings
|
||||
create table supplier (
|
||||
s_suppkey int,
|
||||
s_name char (25),
|
||||
s_address varchar (25),
|
||||
s_city char (10),
|
||||
s_nation char (15),
|
||||
s_region char (12),
|
||||
s_phone char (15)
|
||||
) engine=Columnstore;
|
||||
SHOW CREATE TABLE supplier;
|
||||
#
|
3
mysql-test/columnstore/include/ssb/dropCustomer.inc
Executable file
3
mysql-test/columnstore/include/ssb/dropCustomer.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop customer table
|
||||
#
|
||||
drop table if exists customer;
|
3
mysql-test/columnstore/include/ssb/dropDateinfo.inc
Executable file
3
mysql-test/columnstore/include/ssb/dropDateinfo.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop dateinfo table
|
||||
#
|
||||
drop table if exists dateinfo;
|
3
mysql-test/columnstore/include/ssb/dropLineorder.inc
Executable file
3
mysql-test/columnstore/include/ssb/dropLineorder.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop lineorder table
|
||||
#
|
||||
drop table if exists lineorder;
|
3
mysql-test/columnstore/include/ssb/dropPart.inc
Executable file
3
mysql-test/columnstore/include/ssb/dropPart.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop part table
|
||||
#
|
||||
drop table if exists part;
|
3
mysql-test/columnstore/include/ssb/dropSupplier.inc
Executable file
3
mysql-test/columnstore/include/ssb/dropSupplier.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# drop supplier table
|
||||
#
|
||||
drop table if exists supplier;
|
8
mysql-test/columnstore/include/ssb/dropTables.inc
Executable file
8
mysql-test/columnstore/include/ssb/dropTables.inc
Executable file
@ -0,0 +1,8 @@
|
||||
# drop ssb tables
|
||||
#
|
||||
DROP TABLE customer;
|
||||
DROP TABLE dateinfo;
|
||||
DROP TABLE part;
|
||||
DROP TABLE lineorder;
|
||||
DROP TABLE supplier;
|
||||
#
|
3
mysql-test/columnstore/include/ssb/ldiCustomer1g.inc
Executable file
3
mysql-test/columnstore/include/ssb/ldiCustomer1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi customer table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/customer.tbl' INTO TABLE customer FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/ssb/ldiDateinfo1g.inc
Executable file
3
mysql-test/columnstore/include/ssb/ldiDateinfo1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi dateinfo table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/dateinfo.tbl' INTO TABLE dateinfo FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/ssb/ldiLineorder1g.inc
Executable file
3
mysql-test/columnstore/include/ssb/ldiLineorder1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi lineorder table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/lineorder.tbl' INTO TABLE lineorder FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/ssb/ldiPart1g.inc
Executable file
3
mysql-test/columnstore/include/ssb/ldiPart1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi part table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/part.tbl' INTO TABLE part FIELDS TERMINATED BY '|';
|
3
mysql-test/columnstore/include/ssb/ldiSupplier1g.inc
Executable file
3
mysql-test/columnstore/include/ssb/ldiSupplier1g.inc
Executable file
@ -0,0 +1,3 @@
|
||||
# ldi supplier table
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/supplier.tbl' INTO TABLE supplier FIELDS TERMINATED BY '|';
|
8
mysql-test/columnstore/include/ssb/ldiTables1g.inc
Executable file
8
mysql-test/columnstore/include/ssb/ldiTables1g.inc
Executable file
@ -0,0 +1,8 @@
|
||||
# ldi ssb tables - 1g
|
||||
#
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/customer.tbl' INTO TABLE customer FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/dateinfo.tbl' INTO TABLE dateinfo FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/lineorder.tbl' INTO TABLE lineorder FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/part.tbl' INTO TABLE part FIELDS TERMINATED BY '|';
|
||||
LOAD DATA INFILE '/data/qa/source/ssb/1g/supplier.tbl' INTO TABLE supplier FIELDS TERMINATED BY '|';
|
||||
#
|
Reference in New Issue
Block a user