You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Disable warnings for 'drop if exists' and 'create if not exist' commands
This commit is contained in:
@ -7,10 +7,12 @@ DROP DATABASE IF EXISTS mcol641_delete_db;
|
|||||||
CREATE DATABASE mcol641_delete_db;
|
CREATE DATABASE mcol641_delete_db;
|
||||||
USE mcol641_delete_db;
|
USE mcol641_delete_db;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP PROCEDURE IF EXISTS signedinsertproc;
|
DROP PROCEDURE IF EXISTS signedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
||||||
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
DELIMITER //;
|
DELIMITER //;
|
||||||
|
|
||||||
@ -99,12 +101,14 @@ CREATE PROCEDURE unsigneddeleteproc ()
|
|||||||
|
|
||||||
DELIMITER ;//
|
DELIMITER ;//
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS cs1;
|
DROP TABLE IF EXISTS cs1;
|
||||||
DROP TABLE IF EXISTS cs2;
|
DROP TABLE IF EXISTS cs2;
|
||||||
DROP TABLE IF EXISTS cs3;
|
DROP TABLE IF EXISTS cs3;
|
||||||
DROP TABLE IF EXISTS cs4;
|
DROP TABLE IF EXISTS cs4;
|
||||||
DROP TABLE IF EXISTS cs5;
|
DROP TABLE IF EXISTS cs5;
|
||||||
DROP TABLE IF EXISTS cs6;
|
DROP TABLE IF EXISTS cs6;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE cs1 (d1 DECIMAL(38), d2 DECIMAL(19)) ENGINE=columnstore;
|
CREATE TABLE cs1 (d1 DECIMAL(38), d2 DECIMAL(19)) ENGINE=columnstore;
|
||||||
CREATE TABLE cs2 (d1 DECIMAL(38,10), d2 DECIMAL(19,10)) ENGINE=columnstore;
|
CREATE TABLE cs2 (d1 DECIMAL(38,10), d2 DECIMAL(19,10)) ENGINE=columnstore;
|
||||||
@ -324,8 +328,10 @@ SELECT "unsignedtest10", d1, d2 FROM cs6;
|
|||||||
# Deletes with functions and expressions in the WHERE clause
|
# Deletes with functions and expressions in the WHERE clause
|
||||||
|
|
||||||
# Clean UP
|
# Clean UP
|
||||||
|
--disable_warnings
|
||||||
DROP PROCEDURE IF EXISTS signedinsertproc;
|
DROP PROCEDURE IF EXISTS signedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
||||||
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
||||||
DROP DATABASE mcol641_delete_db;
|
DROP DATABASE mcol641_delete_db;
|
||||||
|
--enable_warnings
|
@ -7,10 +7,12 @@ DROP DATABASE IF EXISTS mcol641_update_db;
|
|||||||
CREATE DATABASE mcol641_update_db;
|
CREATE DATABASE mcol641_update_db;
|
||||||
USE mcol641_update_db;
|
USE mcol641_update_db;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP PROCEDURE IF EXISTS signedinsertproc;
|
DROP PROCEDURE IF EXISTS signedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
||||||
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
DELIMITER //;
|
DELIMITER //;
|
||||||
|
|
||||||
@ -99,12 +101,14 @@ CREATE PROCEDURE unsigneddeleteproc ()
|
|||||||
|
|
||||||
DELIMITER ;//
|
DELIMITER ;//
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS cs1;
|
DROP TABLE IF EXISTS cs1;
|
||||||
DROP TABLE IF EXISTS cs2;
|
DROP TABLE IF EXISTS cs2;
|
||||||
DROP TABLE IF EXISTS cs3;
|
DROP TABLE IF EXISTS cs3;
|
||||||
DROP TABLE IF EXISTS cs4;
|
DROP TABLE IF EXISTS cs4;
|
||||||
DROP TABLE IF EXISTS cs5;
|
DROP TABLE IF EXISTS cs5;
|
||||||
DROP TABLE IF EXISTS cs6;
|
DROP TABLE IF EXISTS cs6;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE cs1 (d1 DECIMAL(38), d2 DECIMAL(19)) ENGINE=columnstore;
|
CREATE TABLE cs1 (d1 DECIMAL(38), d2 DECIMAL(19)) ENGINE=columnstore;
|
||||||
CREATE TABLE cs2 (d1 DECIMAL(38,10), d2 DECIMAL(19,10)) ENGINE=columnstore;
|
CREATE TABLE cs2 (d1 DECIMAL(38,10), d2 DECIMAL(19,10)) ENGINE=columnstore;
|
||||||
@ -350,8 +354,11 @@ SELECT "unsignedtest10a", d1, d2 FROM cs6;
|
|||||||
# Updates with functions and expressions in the WHERE clause
|
# Updates with functions and expressions in the WHERE clause
|
||||||
|
|
||||||
# Clean UP
|
# Clean UP
|
||||||
|
--disable_warnings
|
||||||
DROP PROCEDURE IF EXISTS signedinsertproc;
|
DROP PROCEDURE IF EXISTS signedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
DROP PROCEDURE IF EXISTS signeddeleteproc;
|
||||||
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
DROP PROCEDURE IF EXISTS unsignedinsertproc;
|
||||||
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
DROP PROCEDURE IF EXISTS unsigneddeleteproc;
|
||||||
DROP DATABASE mcol641_update_db;
|
DROP DATABASE mcol641_update_db;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
@ -69,4 +69,8 @@ SELECT * FROM mcs13_db1.t1;
|
|||||||
disconnect addconroot1;
|
disconnect addconroot1;
|
||||||
disconnect addconroot2;
|
disconnect addconroot2;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP DATABASE mcs13_db1;
|
DROP DATABASE mcs13_db1;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
|
@ -87,4 +87,7 @@ SELECT count(*) FROM t2;
|
|||||||
disconnect addconroot1;
|
disconnect addconroot1;
|
||||||
disconnect addconroot2;
|
disconnect addconroot2;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP DATABASE mcs14_db1;
|
DROP DATABASE mcs14_db1;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
@ -40,4 +40,7 @@ SELECT * FROm t1 ORDER BY a;
|
|||||||
SELECT * FROm t2 ORDER BY a;
|
SELECT * FROm t2 ORDER BY a;
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
--disable_warnings
|
||||||
DROP DATABASE IF EXISTS mcs31_db1;
|
DROP DATABASE IF EXISTS mcs31_db1;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
@ -27,4 +27,8 @@ DROP TABLE t1;
|
|||||||
DROP TABLE t1 RESTRICT;
|
DROP TABLE t1 RESTRICT;
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
--disable_warnings
|
||||||
DROP DATABASE IF EXISTS mcs89_db;
|
DROP DATABASE IF EXISTS mcs89_db;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@ DROP DATABASE IF EXISTS unsigned_bug5712_db;
|
|||||||
CREATE DATABASE unsigned_bug5712_db;
|
CREATE DATABASE unsigned_bug5712_db;
|
||||||
USE unsigned_bug5712_db;
|
USE unsigned_bug5712_db;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS bug5712;
|
DROP TABLE IF EXISTS bug5712;
|
||||||
|
--enable_warnings
|
||||||
CREATE TABLE bug5712 (`time_tk` INT(11) UNSIGNED NOT NULL) ENGINE=Columnstore DEFAULT CHARSET=latin1;
|
CREATE TABLE bug5712 (`time_tk` INT(11) UNSIGNED NOT NULL) ENGINE=Columnstore DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
INSERT INTO bug5712 VALUES
|
INSERT INTO bug5712 VALUES
|
||||||
@ -25,4 +27,6 @@ SELECT RIGHT(time_tk,6) AS time_tk_right FROM bug5712;
|
|||||||
DROP TABLE IF EXISTS bug5712;
|
DROP TABLE IF EXISTS bug5712;
|
||||||
|
|
||||||
# Clean UP
|
# Clean UP
|
||||||
|
--disable_warnings
|
||||||
DROP DATABASE unsigned_bug5712_db;
|
DROP DATABASE unsigned_bug5712_db;
|
||||||
|
--enable_warnings
|
||||||
|
@ -14,14 +14,19 @@ SELECT @cs_conn := @@character_set_connection;
|
|||||||
SET character_set_connection=latin1;
|
SET character_set_connection=latin1;
|
||||||
|
|
||||||
# Test COLLATE in ORDER BY
|
# Test COLLATE in ORDER BY
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS test_collate;
|
DROP TABLE IF EXISTS test_collate;
|
||||||
|
--enable_warnings
|
||||||
CREATE TABLE test_collate (a INT, b INT) ENGINE=columnstore;
|
CREATE TABLE test_collate (a INT, b INT) ENGINE=columnstore;
|
||||||
INSERT INTO test_collate VALUES (1,2), (2,4);
|
INSERT INTO test_collate VALUES (1,2), (2,4);
|
||||||
SELECT a, b FROM test_collate ORDER BY a COLLATE latin1_german2_ci;
|
SELECT a, b FROM test_collate ORDER BY a COLLATE latin1_german2_ci;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
SELECT a, b FROM test_collate ORDER BY a COLLATE latin1_german2_ci DESC;
|
SELECT a, b FROM test_collate ORDER BY a COLLATE latin1_german2_ci DESC;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS test_collate;
|
DROP TABLE IF EXISTS test_collate;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
# Test COLLATE in table definition and column definition
|
# Test COLLATE in table definition and column definition
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
@ -29,14 +34,22 @@ CREATE TABLE t1 (col1 CHAR(10)) CHARSET latin1 COLLATE latin1_bin ENGINE=columns
|
|||||||
INSERT INTO t1 VALUES ('a'), ('1'), ('-1');
|
INSERT INTO t1 VALUES ('a'), ('1'), ('-1');
|
||||||
SELECT col1 FROM t1;
|
SELECT col1 FROM t1;
|
||||||
DESCRIBE t1;
|
DESCRIBE t1;
|
||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE t1 (col1 CHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=columnstore;
|
CREATE TABLE t1 (col1 CHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=columnstore;
|
||||||
INSERT INTO t1 VALUES ('a'), ('1'), ('-1');
|
INSERT INTO t1 VALUES ('a'), ('1'), ('-1');
|
||||||
SELECT col1 FROM t1;
|
SELECT col1 FROM t1;
|
||||||
DESCRIBE t1;
|
DESCRIBE t1;
|
||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP DATABASE `mcol_3721`;
|
DROP DATABASE `mcol_3721`;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
SET character_set_connection=@cs_conn;
|
SET character_set_connection=@cs_conn;
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists foo;
|
drop table if exists foo;
|
||||||
|
--enable_warnings
|
||||||
create table foo (col1 int(11) null default null) engine=columnstore;
|
create table foo (col1 int(11) null default null) engine=columnstore;
|
||||||
|
--disable_warnings
|
||||||
drop table foo;
|
drop table foo;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug2835;
|
drop table if exists bug2835;
|
||||||
|
--enable_warnings
|
||||||
create table bug2835 (c1 int, c2 varchar(6), c3 varchar(20), c4 datetime)engine=columnstore;
|
create table bug2835 (c1 int, c2 varchar(6), c3 varchar(20), c4 datetime)engine=columnstore;
|
||||||
insert into bug2835 values (1, 'one', 'one', '2010-01-01'), (2, 'two', 'two', '2010-02-02'), (null, null, null, null);
|
insert into bug2835 values (1, 'one', 'one', '2010-01-01'), (2, 'two', 'two', '2010-02-02'), (null, null, null, null);
|
||||||
select c1, c2, c3, ifnull(c1,"z"), ifnull(c2,''), ifnull(c3,''), ifnull(c4,'') from bug2835;
|
select c1, c2, c3, ifnull(c1,"z"), ifnull(c2,''), ifnull(c3,''), ifnull(c4,'') from bug2835;
|
||||||
|
--disable_warnings
|
||||||
drop table bug2835;
|
drop table bug2835;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug2845;
|
drop table if exists bug2845;
|
||||||
|
--enable_warnings
|
||||||
create table bug2845(c1 int, c2 varchar(7), c3 varchar(30))engine=columnstore;
|
create table bug2845(c1 int, c2 varchar(7), c3 varchar(30))engine=columnstore;
|
||||||
insert into bug2845 values (1, 'A\'s', 'Joe\'s');
|
insert into bug2845 values (1, 'A\'s', 'Joe\'s');
|
||||||
select * from bug2845;
|
select * from bug2845;
|
||||||
@ -16,7 +18,8 @@ update bug2845 set c2='Bubba\'s', c3='Uncle Julio\'s';
|
|||||||
select * from bug2845;
|
select * from bug2845;
|
||||||
delete from bug2845;
|
delete from bug2845;
|
||||||
select count(*) from bug2845;
|
select count(*) from bug2845;
|
||||||
|
--disable_warnings
|
||||||
drop table bug2845;
|
drop table bug2845;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug2873;
|
drop table if exists bug2873;
|
||||||
|
--enable_warnings
|
||||||
create table bug2873(id int, logtime int, filename varchar(20))engine=columnstore;
|
create table bug2873(id int, logtime int, filename varchar(20))engine=columnstore;
|
||||||
insert into bug2873 values
|
insert into bug2873 values
|
||||||
(1, unix_timestamp('2010-05-23 10:00:10'), 'Cam1.jpg'),
|
(1, unix_timestamp('2010-05-23 10:00:10'), 'Cam1.jpg'),
|
||||||
@ -32,6 +34,8 @@ select if(filename rlike '^Cam1.jpg$',filename ,'no') datei from bug2873 limit 1
|
|||||||
select if(filename rlike '^Cam1.jpg$',filename ,'no') datei from bug2873;
|
select if(filename rlike '^Cam1.jpg$',filename ,'no') datei from bug2873;
|
||||||
select if(filename rlike '^Cam1.jpg$',filename ,'no') datei from bug2873 where if(filename rlike '^Cam1.jpg$',filename ,'no')='no' limit 1;
|
select if(filename rlike '^Cam1.jpg$',filename ,'no') datei from bug2873 where if(filename rlike '^Cam1.jpg$',filename ,'no')='no' limit 1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug2873;
|
drop table bug2873;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug2876;
|
drop table if exists bug2876;
|
||||||
|
--enable_warnings
|
||||||
create table bug2876(c1 int, c2 varchar(117))engine=columnstore;
|
create table bug2876(c1 int, c2 varchar(117))engine=columnstore;
|
||||||
insert into bug2876 values (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3);
|
insert into bug2876 values (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3);
|
||||||
insert into bug2876 values (1, null), (2, null), (3, null), (null, 1), (null, 2), (null, 3), (null, null);
|
insert into bug2876 values (1, null), (2, null), (3, null), (null, 1), (null, 2), (null, 3), (null, null);
|
||||||
@ -20,6 +22,8 @@ select * from bug2876 where c1 <= c2 order by 1, 2;
|
|||||||
select * from bug2876 where c1 >= c2 order by 1, 2;
|
select * from bug2876 where c1 >= c2 order by 1, 2;
|
||||||
delete from bug2876 where c1 = c2;
|
delete from bug2876 where c1 = c2;
|
||||||
select * from bug2876 order by 1, 2;
|
select * from bug2876 order by 1, 2;
|
||||||
|
--disable_warnings
|
||||||
drop table bug2876;
|
drop table bug2876;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists tbl1;
|
drop table if exists tbl1;
|
||||||
drop table if exists tbl2;
|
drop table if exists tbl2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table tbl1 (c1 char(1), c2 char(255))engine=columnstore;
|
create table tbl1 (c1 char(1), c2 char(255))engine=columnstore;
|
||||||
create table tbl2 (c1 char(1), c2 char(255))engine=columnstore;
|
create table tbl2 (c1 char(1), c2 char(255))engine=columnstore;
|
||||||
@ -32,7 +34,9 @@ select count(*) from tbl1 right join tbl2 on tbl1.c1 = tbl2.c2;
|
|||||||
select count(*) from tbl1 right join tbl2 on tbl1.c2 = tbl2.c1;
|
select count(*) from tbl1 right join tbl2 on tbl1.c2 = tbl2.c1;
|
||||||
select count(*) from tbl1 right join tbl2 on tbl1.c2 = tbl2.c2;
|
select count(*) from tbl1 right join tbl2 on tbl1.c2 = tbl2.c2;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table tbl1;
|
drop table tbl1;
|
||||||
drop table tbl2;
|
drop table tbl2;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -12,22 +12,27 @@ USE tpch1;
|
|||||||
* Bug 2976. Lost connection with from clause subselect against MyISAM tables in an InfiniDB instance.
|
* Bug 2976. Lost connection with from clause subselect against MyISAM tables in an InfiniDB instance.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists a;
|
drop table if exists a;
|
||||||
|
--disable_warnings
|
||||||
drop table if exists b;
|
drop table if exists b;
|
||||||
create table a (c1 int)engine=myisam;
|
create table a (c1 int)engine=myisam;
|
||||||
create table b (c2 int)engine=myisam;
|
create table b (c2 int)engine=myisam;
|
||||||
insert into a values (1), (2);
|
insert into a values (1), (2);
|
||||||
insert into b values (1), (2);
|
insert into b values (1), (2);
|
||||||
select * from a, (select * from b) x;
|
select * from a, (select * from b) x;
|
||||||
|
--disable_warnings
|
||||||
drop table a;
|
drop table a;
|
||||||
drop table b;
|
drop table b;
|
||||||
|
--enable_warnings
|
||||||
/*
|
/*
|
||||||
* Skinit example.
|
* Skinit example.
|
||||||
*/
|
*/
|
||||||
|
--disable_warnings
|
||||||
drop table if exists shipamounts;
|
drop table if exists shipamounts;
|
||||||
drop table if exists ship1;
|
drop table if exists ship1;
|
||||||
drop table if exists ship2;
|
drop table if exists ship2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `shipamounts` (
|
CREATE TABLE `shipamounts` (
|
||||||
`OrderNum` varchar(50) DEFAULT NULL,
|
`OrderNum` varchar(50) DEFAULT NULL,
|
||||||
@ -95,19 +100,22 @@ SELECT s.OrderNum, s.OrderLine, s.ShippingAmount, s.ShippingOrderAmount,
|
|||||||
FROM ship2 GROUP BY OrderNum
|
FROM ship2 GROUP BY OrderNum
|
||||||
) AS total ON s.OrderNum = total.OrderNum;
|
) AS total ON s.OrderNum = total.OrderNum;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists shipamounts;
|
drop table if exists shipamounts;
|
||||||
drop table if exists ship1;
|
drop table if exists ship1;
|
||||||
drop table if exists ship2;
|
drop table if exists ship2;
|
||||||
|
--enable_warnings
|
||||||
/*
|
/*
|
||||||
* Lurn India example.
|
* Lurn India example.
|
||||||
*/
|
*/
|
||||||
|
--disable_warnings
|
||||||
drop table if exists users;
|
drop table if exists users;
|
||||||
drop table if exists user_login_log;
|
drop table if exists user_login_log;
|
||||||
drop table if exists user_groups;
|
drop table if exists user_groups;
|
||||||
drop table if exists user_types;
|
drop table if exists user_types;
|
||||||
drop table if exists system;
|
drop table if exists system;
|
||||||
drop table if exists user_system;
|
drop table if exists user_system;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table users(
|
create table users(
|
||||||
id int,
|
id int,
|
||||||
@ -183,11 +191,13 @@ AND u.status IN ('active')
|
|||||||
AND ug.start_date BETWEEN '2010-06-01' AND '2010-06-30'
|
AND ug.start_date BETWEEN '2010-06-01' AND '2010-06-30'
|
||||||
ORDER BY DATE(ug.start_date) DESC, u.users_id DESC;
|
ORDER BY DATE(ug.start_date) DESC, u.users_id DESC;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists users;
|
drop table if exists users;
|
||||||
drop table if exists user_login_log;
|
drop table if exists user_login_log;
|
||||||
drop table if exists user_groups;
|
drop table if exists user_groups;
|
||||||
drop table if exists user_types;
|
drop table if exists user_types;
|
||||||
drop table if exists system;
|
drop table if exists system;
|
||||||
drop table if exists user_system;
|
drop table if exists user_system;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,14 +8,20 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
create database if not exists bug3007;
|
create database if not exists bug3007;
|
||||||
drop table if exists bug3007.bug;
|
drop table if exists bug3007.bug;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3007.bug(c1 int)engine=columnstore;
|
create table bug3007.bug(c1 int)engine=columnstore;
|
||||||
insert into bug3007.bug values (1), (2);
|
insert into bug3007.bug values (1), (2);
|
||||||
select * from bug3007.bug;
|
select * from bug3007.bug;
|
||||||
update bug3007.bug set c1=99;
|
update bug3007.bug set c1=99;
|
||||||
delete from bug3007.bug;
|
delete from bug3007.bug;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3007.bug;
|
drop table if exists bug3007.bug;
|
||||||
drop database if exists bug3007;
|
drop database if exists bug3007;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3012;
|
drop table if exists bug3012;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3012 (anz int, mx varchar(20)) engine=columnstore;
|
create table bug3012 (anz int, mx varchar(20)) engine=columnstore;
|
||||||
insert into bug3012 values (1,'hotmail.com'), (2,'hotmail.com'), (3,'foo.com'),
|
insert into bug3012 values (1,'hotmail.com'), (2,'hotmail.com'), (3,'foo.com'),
|
||||||
(4,'www.1and1.net'), (5,'1and1.com');
|
(4,'www.1and1.net'), (5,'1and1.com');
|
||||||
@ -17,6 +20,8 @@ select * from bug3012;
|
|||||||
SELECT * FROM bug3012 WHERE (mx RLIKE 'hotmail' OR mx RLIKE '1and1');
|
SELECT * FROM bug3012 WHERE (mx RLIKE 'hotmail' OR mx RLIKE '1and1');
|
||||||
SELECT * FROM bug3012 WHERE (mx RLIKE '1and1' OR mx RLIKE 'hotmail');
|
SELECT * FROM bug3012 WHERE (mx RLIKE '1and1' OR mx RLIKE 'hotmail');
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3012;
|
drop table if exists bug3012;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -11,13 +11,19 @@ USE tpch1;
|
|||||||
select date('2010-02-01') into @xxx;
|
select date('2010-02-01') into @xxx;
|
||||||
select @xxx;
|
select @xxx;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3021;
|
drop table if exists bug3021;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3021(c1 date)engine=columnstore;
|
create table bug3021(c1 date)engine=columnstore;
|
||||||
insert into bug3021 values ('2001-01-01');
|
insert into bug3021 values ('2001-01-01');
|
||||||
update bug3021 set c1=@xxx;
|
update bug3021 set c1=@xxx;
|
||||||
select * from bug3021;
|
select * from bug3021;
|
||||||
update bug3021 set c1=date('2010-11-14');
|
update bug3021 set c1=date('2010-11-14');
|
||||||
select * from bug3021;
|
select * from bug3021;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3021;
|
drop table bug3021;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -12,12 +12,17 @@ select * from nation where n_nationkey=@value;
|
|||||||
set @value=5;
|
set @value=5;
|
||||||
select * from nation where n_nationkey=@value;
|
select * from nation where n_nationkey=@value;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
create table if not exists bug3024 (c1 int) engine=columnstore;
|
create table if not exists bug3024 (c1 int) engine=columnstore;
|
||||||
|
--enable_warnings
|
||||||
insert into bug3024 values (1), (2);
|
insert into bug3024 values (1), (2);
|
||||||
update bug3024 set c1=3 where c1=@value;
|
update bug3024 set c1=3 where c1=@value;
|
||||||
set @value=2;
|
set @value=2;
|
||||||
update bug3024 set c1=3 where c1=@value;
|
update bug3024 set c1=3 where c1=@value;
|
||||||
select * from bug3024;
|
select * from bug3024;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3024;
|
drop table if exists bug3024;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3025;
|
drop table if exists bug3025;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3025(value integer(5)) engine=Columnstore;
|
create table bug3025(value integer(5)) engine=Columnstore;
|
||||||
insert into bug3025 values (1), (1001), (24), (2123), (null), (123), (888), (8421), (231), (-100), (null);
|
insert into bug3025 values (1), (1001), (24), (2123), (null), (123), (888), (8421), (231), (-100), (null);
|
||||||
@ -37,7 +39,8 @@ order by 1, 2;
|
|||||||
|
|
||||||
select IF(value<=1000,'<=1000', '>1000') a, isnull(IF(value<=1000,'<=1000', '>1000')) b from bug3025 group by 1,2 order by 2,1;
|
select IF(value<=1000,'<=1000', '>1000') a, isnull(IF(value<=1000,'<=1000', '>1000')) b from bug3025 group by 1,2 order by 2,1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3025;
|
drop table if exists bug3025;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3051;
|
drop table if exists bug3051;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `bug3051` (
|
CREATE TABLE `bug3051` (
|
||||||
`c1` int(11) DEFAULT NULL,
|
`c1` int(11) DEFAULT NULL,
|
||||||
`c2` varchar(17) DEFAULT NULL,
|
`c2` varchar(17) DEFAULT NULL,
|
||||||
@ -32,5 +35,8 @@ alter table bug3051 drop column c7;
|
|||||||
alter table bug3051 add column c7 datetime;
|
alter table bug3051 add column c7 datetime;
|
||||||
select count(*) from bug3051;
|
select count(*) from bug3051;
|
||||||
update bug3051 set c7=now();
|
update bug3051 set c7=now();
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3051;
|
drop table bug3051;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3137;
|
drop table if exists bug3137;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `bug3137` (
|
CREATE TABLE `bug3137` (
|
||||||
`id` INTEGER DEFAULT NULL,
|
`id` INTEGER DEFAULT NULL,
|
||||||
@ -26,8 +28,8 @@ select * from bug3137 where (value = 1 OR 1 = 1);
|
|||||||
select * from bug3137 where id >= 0 and (value = 1 or 1 = -1);
|
select * from bug3137 where id >= 0 and (value = 1 or 1 = -1);
|
||||||
select n_nationkey from nation where n_nationkey <=5 and (n_nationkey=2 or 1=-1);
|
select n_nationkey from nation where n_nationkey <=5 and (n_nationkey=2 or 1=-1);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3137;
|
drop table if exists bug3137;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,9 +8,15 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3203;
|
drop table if exists bug3203;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3203 (c1 varchar(20))engine=columnstore;
|
create table bug3203 (c1 varchar(20))engine=columnstore;
|
||||||
select * from bug3203 where c1 = 'x';
|
select * from bug3203 where c1 = 'x';
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3203;
|
drop table if exists bug3203;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists testnulldate;
|
drop table if exists testnulldate;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table testnulldate (id int, time_stamp datetime) engine=columnstore;
|
create table testnulldate (id int, time_stamp datetime) engine=columnstore;
|
||||||
|
|
||||||
insert into testnulldate values (1, '2010-11-08 17:46:44');
|
insert into testnulldate values (1, '2010-11-08 17:46:44');
|
||||||
@ -44,7 +47,8 @@ select
|
|||||||
case when `time_stamp` is null then 'N/A' end as `Test1`
|
case when `time_stamp` is null then 'N/A' end as `Test1`
|
||||||
from testnulldate;
|
from testnulldate;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists testnulldate;
|
drop table if exists testnulldate;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists var_between;
|
drop table if exists var_between;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table var_between (c1 varchar(10), c2 char(7)) engine=columnstore;
|
create table var_between (c1 varchar(10), c2 char(7)) engine=columnstore;
|
||||||
insert into var_between values ('099', '099');
|
insert into var_between values ('099', '099');
|
||||||
insert into var_between values ('9', '9');
|
insert into var_between values ('9', '9');
|
||||||
@ -17,12 +20,13 @@ select 'q1', var_between.* from var_between where substr(c1,1,1) between '0' and
|
|||||||
select 'q2', var_between.* from var_between where substr(c1,1,1) not between '0' and '9';
|
select 'q2', var_between.* from var_between where substr(c1,1,1) not between '0' and '9';
|
||||||
select 'q3', var_between.* from var_between where substr(c2,1,1) between '0' and '9';
|
select 'q3', var_between.* from var_between where substr(c2,1,1) between '0' and '9';
|
||||||
select 'q4', var_between.* from var_between where substr(c2,1,1) not between '0' and '9';
|
select 'q4', var_between.* from var_between where substr(c2,1,1) not between '0' and '9';
|
||||||
drop table var_between;
|
|
||||||
|
|
||||||
select 'q5', count(*) from orders where substr(o_comment, 1, 1) between 'a' and 'f';
|
select 'q5', count(*) from orders where substr(o_comment, 1, 1) between 'a' and 'f';
|
||||||
select 'q6', count(*) from orders where substr(o_orderpriority, 1, 1) between '2' and '3';
|
select 'q6', count(*) from orders where substr(o_orderpriority, 1, 1) between '2' and '3';
|
||||||
select 'q7', count(*) from orders where substr(o_orderpriority, 1, 1) not between '2' and '3';
|
select 'q7', count(*) from orders where substr(o_orderpriority, 1, 1) not between '2' and '3';
|
||||||
select 'q8', count(*) from orders where substr(o_totalprice, 2, 3) between '200' and '300';
|
select 'q8', count(*) from orders where substr(o_totalprice, 2, 3) between '200' and '300';
|
||||||
select 'q9', count(*) from orders where substr(o_totalprice, 2, 3) not between '200' and '300';
|
select 'q9', count(*) from orders where substr(o_totalprice, 2, 3) not between '200' and '300';
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
|
drop table var_between;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
@ -8,11 +8,17 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3267;
|
drop table if exists bug3267;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3267 (c1 decimal(12, 6), c2 float) engine=columnstore;
|
create table bug3267 (c1 decimal(12, 6), c2 float) engine=columnstore;
|
||||||
insert into bug3267 values (5.240620, 5.24062e+06), (7.240620, 7.24062e+06), (9.940620, 9.94062e+06), (5.240620, 5.24062), (-4.44, -4.44), (-8.87, -8.87);
|
insert into bug3267 values (5.240620, 5.24062e+06), (7.240620, 7.24062e+06), (9.940620, 9.94062e+06), (5.240620, 5.24062), (-4.44, -4.44), (-8.87, -8.87);
|
||||||
select floor(c1), ceil(c1), c1 from bug3267;
|
select floor(c1), ceil(c1), c1 from bug3267;
|
||||||
select floor(c2), ceil(c2), c2 from bug3267;
|
select floor(c2), ceil(c2), c2 from bug3267;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3267;
|
drop table if exists bug3267;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3270;
|
drop table if exists bug3270;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3270 (c1 decimal(12, 6), c2 float) engine=columnstore;
|
create table bug3270 (c1 decimal(12, 6), c2 float) engine=columnstore;
|
||||||
insert into bug3270
|
insert into bug3270
|
||||||
values (5.240620, 5.24062e+06), (7.240620, 7.24062e+06), (9.940620, 9.94062e+06), (5.240620, 5.24062), (5.240720, 5.240720),
|
values (5.240620, 5.24062e+06), (7.240620, 7.24062e+06), (9.940620, 9.94062e+06), (5.240620, 5.24062), (5.240720, 5.240720),
|
||||||
@ -23,6 +26,8 @@ select truncate(c1, 0), truncate(c1, 1), truncate(c1, 2) from bug3270 order by 1
|
|||||||
select truncate(c2, 0), truncate(c2, 1), truncate(c2, 2) from bug3270 order by 1,2,3;
|
select truncate(c2, 0), truncate(c2, 1), truncate(c2, 2) from bug3270 order by 1,2,3;
|
||||||
|
|
||||||
select truncate(c2 ,2), count(*) from bug3270 group by 1 order by 1, 2;
|
select truncate(c2 ,2), count(*) from bug3270 group by 1 order by 1, 2;
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3270;
|
drop table if exists bug3270;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3272;
|
drop table if exists bug3272;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3272 (c1 float, c2 char(12)) engine=columnstore;
|
create table bug3272 (c1 float, c2 char(12)) engine=columnstore;
|
||||||
|
|
||||||
insert into bug3272 values (5.24062, '5.24062'), (7.24062, '7.24062'), (9.94062, '9.94062');
|
insert into bug3272 values (5.24062, '5.24062'), (7.24062, '7.24062'), (9.94062, '9.94062');
|
||||||
@ -21,6 +24,8 @@ select cast(c1 as decimal(0,0)) floattype, cast(c2 as decimal(0,0)) chartype fro
|
|||||||
select cast(c1 as signed) floattype, cast(c2 as signed) chartype from bug3272 order by 1, 2;
|
select cast(c1 as signed) floattype, cast(c2 as signed) chartype from bug3272 order by 1, 2;
|
||||||
select cast(cast(c1 as decimal(4,2)) as signed) decimaltype, cast(c2 as signed) chartype from bug3272 order by 1, 2;
|
select cast(cast(c1 as decimal(4,2)) as signed) decimaltype, cast(c2 as signed) chartype from bug3272 order by 1, 2;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3272;
|
drop table if exists bug3272;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,14 +8,19 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3274;
|
drop table if exists bug3274;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3274(d2 decimal(4,2), f float);
|
create table bug3274(d2 decimal(4,2), f float);
|
||||||
insert into bug3274 values (43.34, 43.345), (13.54, 13.545);
|
insert into bug3274 values (43.34, 43.345), (13.54, 13.545);
|
||||||
select d2, count(*) from bug3274 group by 1 order by 1;
|
select d2, count(*) from bug3274 group by 1 order by 1;
|
||||||
select f, count(*) from bug3274 group by 1 order by 1;
|
select f, count(*) from bug3274 group by 1 order by 1;
|
||||||
select * from (select d2, count(*) from bug3274 group by 1 order by 1) a;
|
select * from (select d2, count(*) from bug3274 group by 1 order by 1) a;
|
||||||
select * from (select f, count(*) from bug3274 group by 1 order by 1) a;
|
select * from (select f, count(*) from bug3274 group by 1 order by 1) a;
|
||||||
drop table if exists bug3274;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists bug3274;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3292;
|
drop table if exists bug3292;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3292 (c1 double, c2 float, c3 char(12)) engine=columnstore;
|
create table bug3292 (c1 double, c2 float, c3 char(12)) engine=columnstore;
|
||||||
insert into bug3292 values
|
insert into bug3292 values
|
||||||
(5.24062, 5.24062, '5.24062'),
|
(5.24062, 5.24062, '5.24062'),
|
||||||
@ -40,6 +43,8 @@ select c1, format(c1, 5), format(c2,2), format(c3,2) from bug3292;
|
|||||||
select c1, format(c1, 6), format(c2,6), format(c3,6) from bug3292;
|
select c1, format(c1, 6), format(c2,6), format(c3,6) from bug3292;
|
||||||
select c1, format(c1, -1), format(c2,-1), format(c3,-1) from bug3292;
|
select c1, format(c1, -1), format(c2,-1), format(c3,-1) from bug3292;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3292;
|
drop table if exists bug3292;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists visit;
|
drop table if exists visit;
|
||||||
drop table if exists client;
|
drop table if exists client;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table visit (id_client integer,nb_event integer,update_date datetime, visit_date datetime) engine=columnstore;
|
create table visit (id_client integer,nb_event integer,update_date datetime, visit_date datetime) engine=columnstore;
|
||||||
create table client (id_client integer,id_event integer,event_date datetime) engine=columnstore;
|
create table client (id_client integer,id_event integer,event_date datetime) engine=columnstore;
|
||||||
|
|
||||||
@ -80,7 +83,9 @@ WHERE
|
|||||||
V.visit_date ="2010-09-08"
|
V.visit_date ="2010-09-08"
|
||||||
AND V.id_client = Res.id_client order by 1, 2, 3;
|
AND V.id_client = Res.id_client order by 1, 2, 3;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists visit;
|
drop table if exists visit;
|
||||||
drop table if exists client;
|
drop table if exists client;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists user_prop_by_game;
|
drop table if exists user_prop_by_game;
|
||||||
drop table if exists visit;
|
drop table if exists visit;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table user_prop_by_game(cl_id int, last_visit_date date)engine=columnstore;
|
create table user_prop_by_game(cl_id int, last_visit_date date)engine=columnstore;
|
||||||
create table visit(cl_id int, visit_date date)engine=columnstore;
|
create table visit(cl_id int, visit_date date)engine=columnstore;
|
||||||
@ -24,7 +26,9 @@ UPBG.cl_id = sub.cl_id;
|
|||||||
|
|
||||||
select * from user_prop_by_game;
|
select * from user_prop_by_game;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists user_prop_by_game;
|
drop table if exists user_prop_by_game;
|
||||||
drop table if exists visit;
|
drop table if exists visit;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists paa;
|
drop table if exists paa;
|
||||||
drop table if exists dates;
|
drop table if exists dates;
|
||||||
drop table if exists t;
|
drop table if exists t;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table paa (
|
create table paa (
|
||||||
p_id int,
|
p_id int,
|
||||||
@ -61,8 +63,10 @@ left outer join (select t.date_id, t.p_id, a_id,
|
|||||||
and p.date_id = tx.date_id)
|
and p.date_id = tx.date_id)
|
||||||
order by 1, 2, 3;
|
order by 1, 2, 3;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists paa;
|
drop table if exists paa;
|
||||||
drop table if exists dates;
|
drop table if exists dates;
|
||||||
drop table if exists t;
|
drop table if exists t;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE ssb1;
|
USE ssb1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists datetest;
|
drop table if exists datetest;
|
||||||
create table if not exists datetest (rowid int, c1 varchar(20), c2 bigint) engine=columnstore;
|
create table if not exists datetest (rowid int, c1 varchar(20), c2 bigint) engine=columnstore;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
insert into datetest values (1, "1990-10-20", 19901121), (2, "1997-01-01 10:00:05", 19970201000000), (3, "0705", 0805), (4, "20120230", 20120230),(5, "20110229", 20110229),(6, "9905", 9905),(7, "20011010888888", 20031010888888),(8, "20011011124455", 20011010122233);
|
insert into datetest values (1, "1990-10-20", 19901121), (2, "1997-01-01 10:00:05", 19970201000000), (3, "0705", 0805), (4, "20120230", 20120230),(5, "20110229", 20110229),(6, "9905", 9905),(7, "20011010888888", 20031010888888),(8, "20011011124455", 20011010122233);
|
||||||
select 'q1', rowid, c1, c2, cast(c1 as date), cast(c2 as date) from datetest where c2 <> 0805 order by rowid;
|
select 'q1', rowid, c1, c2, cast(c1 as date), cast(c2 as date) from datetest where c2 <> 0805 order by rowid;
|
||||||
select 'q1b', rowid, c1, c2, cast(c1 as date), substr(cast(c2 as date), 6, 5) from datetest where c2 = 0805 order by rowid;
|
select 'q1b', rowid, c1, c2, cast(c1 as date), substr(cast(c2 as date), 6, 5) from datetest where c2 = 0805 order by rowid;
|
||||||
@ -36,7 +39,10 @@ select 'q15', rowid, c1, c2, year(c1), year(c2) from datetest where c2 <> 0805 o
|
|||||||
select 'q16', rowid, c1, c2, month(c1), month(c2) from datetest order by 1,2;
|
select 'q16', rowid, c1, c2, month(c1), month(c2) from datetest order by 1,2;
|
||||||
select 'q17', rowid, c1, c2, time(c1), time(c2) from datetest order by 1,2;
|
select 'q17', rowid, c1, c2, time(c1), time(c2) from datetest order by 1,2;
|
||||||
|
|
||||||
drop table if exists datetest;
|
|
||||||
select 'q18', year(lo_orderdate), month(lo_orderdate), count(*) from ssb1.lineorder group by 1, 2, 3 order by 1, 2, 3;
|
select 'q18', year(lo_orderdate), month(lo_orderdate), count(*) from ssb1.lineorder group by 1, 2, 3 order by 1, 2, 3;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists datetest;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS bug3398_1;
|
DROP TABLE IF EXISTS bug3398_1;
|
||||||
DROP TABLE IF EXISTS bug3398_2;
|
DROP TABLE IF EXISTS bug3398_2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE bug3398_1 (lid int, name char(10)) engine=columnstore;
|
CREATE TABLE bug3398_1 (lid int, name char(10)) engine=columnstore;
|
||||||
INSERT INTO bug3398_1 (lid, name) VALUES (1, 'YES'), (2, 'NO');
|
INSERT INTO bug3398_1 (lid, name) VALUES (1, 'YES'), (2, 'NO');
|
||||||
@ -23,7 +25,9 @@ SELECT DISTINCT tt.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2
|
|||||||
|
|
||||||
SELECT DISTINCT bug3398_2.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2 WHERE bug3398_1.lid = bug3398_2.lid AND bug3398_2.gid = lgid and bug3398_1.name > 'NO' ORDER BY bug3398_2.dt) as clid FROM bug3398_2 ORDER BY 1;
|
SELECT DISTINCT bug3398_2.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2 WHERE bug3398_1.lid = bug3398_2.lid AND bug3398_2.gid = lgid and bug3398_1.name > 'NO' ORDER BY bug3398_2.dt) as clid FROM bug3398_2 ORDER BY 1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE bug3398_1;
|
DROP TABLE bug3398_1;
|
||||||
DROP TABLE bug3398_2;
|
DROP TABLE bug3398_2;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,16 +8,19 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists qa_cast;
|
drop table if exists qa_cast;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table qa_cast ( s1 varchar(20), qaint1 int, qadouble double) engine=columnstore;
|
create table qa_cast ( s1 varchar(20), qaint1 int, qadouble double) engine=columnstore;
|
||||||
insert into qa_cast values ('123456789',123456789, 1234);
|
insert into qa_cast values ('123456789',123456789, 1234);
|
||||||
insert into qa_cast values ('123.45',123456789, 123.45);
|
insert into qa_cast values ('123.45',123456789, 123.45);
|
||||||
insert into qa_cast values ('abc',123456789, 1.5);
|
insert into qa_cast values ('abc',123456789, 1.5);
|
||||||
insert into qa_cast values ('0.001',123456789, 0.001);
|
insert into qa_cast values ('0.001',123456789, 0.001);
|
||||||
select s1, qaint1, mod(s1, 10), mod(qaint1, 10), mod(qadouble, 10) from qa_cast;
|
select s1, qaint1, mod(s1, 10), mod(qaint1, 10), mod(qadouble, 10) from qa_cast;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table qa_cast;
|
drop table qa_cast;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3436a;
|
drop table if exists bug3436a;
|
||||||
drop table if exists bug3436b;
|
drop table if exists bug3436b;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3436a (i int, j int, c1 tinyint, c2 decimal(2,1), c3 decimal(4,0), c4 decimal(4,2), c5 float, c6 double) engine=columnstore;
|
create table bug3436a (i int, j int, c1 tinyint, c2 decimal(2,1), c3 decimal(4,0), c4 decimal(4,2), c5 float, c6 double) engine=columnstore;
|
||||||
insert into bug3436a values (1, 1, 1, 1.1, 9991, 99.1, 1.1, 1.1), (1, 1, 2, 2.2, 9992, 99.2, 2.2, 2.2), (2, 2, 1, 1.1, 9993, 99.3, 1.1, 1.1), (2, 2, 2, 2.2, 9994, 99.4, 2.2, 2.2), (1, 1, 127, 9.1, 9995, 99.5, 127.1, 127.1), (1, 2, 100, 9.2, 9996, 99.6, 100.2, 100.2);
|
insert into bug3436a values (1, 1, 1, 1.1, 9991, 99.1, 1.1, 1.1), (1, 1, 2, 2.2, 9992, 99.2, 2.2, 2.2), (2, 2, 1, 1.1, 9993, 99.3, 1.1, 1.1), (2, 2, 2, 2.2, 9994, 99.4, 2.2, 2.2), (1, 1, 127, 9.1, 9995, 99.5, 127.1, 127.1), (1, 2, 100, 9.2, 9996, 99.6, 100.2, 100.2);
|
||||||
|
|
||||||
@ -29,8 +32,9 @@ select s/d from (select k, stddev(c4) s, count(distinct j) d from bug3436a join
|
|||||||
select s/d from (select k, stddev(c5) s, count(distinct j) d from bug3436a join bug3436b on i=k group by 1) a order by 1;
|
select s/d from (select k, stddev(c5) s, count(distinct j) d from bug3436a join bug3436b on i=k group by 1) a order by 1;
|
||||||
select s/d from (select k, stddev(c6) s, count(distinct j) d from bug3436a join bug3436b on i=k group by 1) a order by 1;
|
select s/d from (select k, stddev(c6) s, count(distinct j) d from bug3436a join bug3436b on i=k group by 1) a order by 1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3436a;
|
drop table bug3436a;
|
||||||
drop table bug3436b;
|
drop table bug3436b;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists optest;
|
drop table if exists optest;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table optest (id int, c1 date, c2 decimal(4,2), c3 date) engine=columnstore;
|
create table optest (id int, c1 date, c2 decimal(4,2), c3 date) engine=columnstore;
|
||||||
insert into optest values (0, '2011-01-27', null, '1999-08-25'), (1, null, null, null), (2, '2001-01-05', 2.34, null), (3, null, null, '2001-05-03');
|
insert into optest values (0, '2011-01-27', null, '1999-08-25'), (1, null, null, null), (2, '2001-01-05', 2.34, null), (3, null, null, '2001-05-03');
|
||||||
select * from optest where (year(c1) = 2011 or c2 = 2.34) or month(c3) = 1;
|
select * from optest where (year(c1) = 2011 or c2 = 2.34) or month(c3) = 1;
|
||||||
@ -27,7 +30,9 @@ select * from optest where (null or year(ifnull(c1, c3)) > 2000 and isnull(c2))
|
|||||||
select * from optest where ((null or year(ifnull(c1, c3)) > 2000) and isnull(c2)) or ( (c3 is not null or null) and null);
|
select * from optest where ((null or year(ifnull(c1, c3)) > 2000) and isnull(c2)) or ( (c3 is not null or null) and null);
|
||||||
select * from optest where (null or c2+1 between 0 and 4 or isnull(c2)) and ( c3 is not null or null);
|
select * from optest where (null or c2+1 between 0 and 4 or isnull(c2)) and ( c3 is not null or null);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3442b;
|
drop table if exists bug3442b;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3442b (
|
create table bug3442b (
|
||||||
idx int,
|
idx int,
|
||||||
@ -89,8 +94,10 @@ bi2 < 4;
|
|||||||
select 'q10', idx from bug3442b where hour(dtm1)=9 or i1 = 2 or i2 = 5 or f2 is null or f1 > 6 or year(dtm2)= 2012 or
|
select 'q10', idx from bug3442b where hour(dtm1)=9 or i1 = 2 or i2 = 5 or f2 is null or f1 > 6 or year(dtm2)= 2012 or
|
||||||
vc1 = 9 or bi2 = 4;
|
vc1 = 9 or bi2 = 4;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3442b;
|
drop table bug3442b;
|
||||||
drop table optest;
|
drop table optest;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
select count(*) from nation where n_nationkey < 3 OR NULL;
|
select count(*) from nation where n_nationkey < 3 OR NULL;
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3483;
|
drop table if exists bug3483;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3483 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
|
create table bug3483 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
|
||||||
insert into bug3483 values
|
insert into bug3483 values
|
||||||
(1, 1.1, 1.1, 1.1, '1.1', '1.1'),
|
(1, 1.1, 1.1, 1.1, '1.1', '1.1'),
|
||||||
@ -30,7 +33,8 @@ select c4, ceil(c4), ceiling(c4), floor(c4) from bug3483;
|
|||||||
select c5, ceil(c5), ceiling(c5), floor(c5), truncate(c5, 2) from bug3483;
|
select c5, ceil(c5), ceiling(c5), floor(c5), truncate(c5, 2) from bug3483;
|
||||||
select c6, ceil(c6), ceiling(c6), floor(c6), truncate(c6, 2) from bug3483;
|
select c6, ceil(c6), ceiling(c6), floor(c6), truncate(c6, 2) from bug3483;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3483;
|
drop table bug3483;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3488;
|
drop table if exists bug3488;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3488 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
|
create table bug3488 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
|
||||||
insert into bug3488 values
|
insert into bug3488 values
|
||||||
(1, 1.1, 1.1, 1.1, '1.1', '1.1'),
|
(1, 1.1, 1.1, 1.1, '1.1', '1.1'),
|
||||||
@ -36,7 +39,8 @@ select c4, format(c4, -2), format(c4, 0), format(c4, 2) from (select * from bug3
|
|||||||
select c5, format(c5, -2), format(c5, 0), format(c5, 2) from (select * from bug3488) sub;
|
select c5, format(c5, -2), format(c5, 0), format(c5, 2) from (select * from bug3488) sub;
|
||||||
select c6, format(c6, -2), format(c6, 0), format(c6, 2) from (select * from bug3488) sub;
|
select c6, format(c6, -2), format(c6, 0), format(c6, 2) from (select * from bug3488) sub;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3488;
|
drop table bug3488;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3496;
|
drop table if exists bug3496;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table `bug3496` (`c1` int(11) default null,`c2` char(6) default null, `c3` char(11) default null) engine=columnstore;
|
create table `bug3496` (`c1` int(11) default null,`c2` char(6) default null, `c3` char(11) default null) engine=columnstore;
|
||||||
insert into bug3496 values
|
insert into bug3496 values
|
||||||
(1, 'abc', 'abc'),
|
(1, 'abc', 'abc'),
|
||||||
@ -115,7 +118,8 @@ select c1, c3 from bug3496 where c3 like '%_%';
|
|||||||
select c1, c3 from bug3496 where c3 like 'a_%';
|
select c1, c3 from bug3496 where c3 like 'a_%';
|
||||||
select c1, c3 from bug3496 where c3 like 'a(b)|(c)%';
|
select c1, c3 from bug3496 where c3 like 'a(b)|(c)%';
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3496;
|
drop table bug3496;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3497a;
|
drop table if exists bug3497a;
|
||||||
drop table if exists bug3497b;
|
drop table if exists bug3497b;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE bug3497a (col1 int, col2 varchar(10)) engine=columnstore;
|
CREATE TABLE bug3497a (col1 int, col2 varchar(10)) engine=columnstore;
|
||||||
INSERT INTO bug3497a VALUES(1,'trudy');
|
INSERT INTO bug3497a VALUES(1,'trudy');
|
||||||
@ -45,7 +47,9 @@ SELECT a.col1,a.col2,b.col2,b.col3 FROM bug3497b b RIGHT JOIN bug3497a a ON
|
|||||||
a.col1=b.col1 WHERE b.col1 IN (1,5,9) AND b.col2=(SELECT MAX(col2) FROM bug3497b b2
|
a.col1=b.col1 WHERE b.col1 IN (1,5,9) AND b.col2=(SELECT MAX(col2) FROM bug3497b b2
|
||||||
WHERE b2.col1=b.col1) order by 1, 2;
|
WHERE b2.col1=b.col1) order by 1, 2;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3497a;
|
drop table if exists bug3497a;
|
||||||
drop table if exists bug3497b;
|
drop table if exists bug3497b;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -102,6 +102,8 @@ select b.cidx from qa_dict_join_1 a, qa_dict_join_2 b where a.CBIGINT = b.CBIG
|
|||||||
select a.cidx, b.cidx from qa_dict_join_1 a, qa_dict_join_2 b where a.CBIGINT = b.CBIGINT order by abs(a.cidx), abs(b.cidx);
|
select a.cidx, b.cidx from qa_dict_join_1 a, qa_dict_join_2 b where a.CBIGINT = b.CBIGINT order by abs(a.cidx), abs(b.cidx);
|
||||||
select abs(a.cidx), b.cidx from qa_dict_join_1 a, qa_dict_join_2 b where a.CBIGINT = b.CBIGINT order by a.cidx, b.cidx;
|
select abs(a.cidx), b.cidx from qa_dict_join_1 a, qa_dict_join_2 b where a.CBIGINT = b.CBIGINT order by a.cidx, b.cidx;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists qa_dict_join_1;
|
drop table if exists qa_dict_join_1;
|
||||||
drop table if exists qa_dict_join_2;
|
drop table if exists qa_dict_join_2;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists a1;
|
drop table if exists a1;
|
||||||
drop table if exists a2;
|
drop table if exists a2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table a1 (c1 int, c2 int)engine=columnstore;
|
create table a1 (c1 int, c2 int)engine=columnstore;
|
||||||
create table a2 (c1 int, c2 int)engine=columnstore;
|
create table a2 (c1 int, c2 int)engine=columnstore;
|
||||||
insert into a1 values (1, 1),(2,2),(3,null),(null,3),(null,null);
|
insert into a1 values (1, 1),(2,2),(3,null),(null,3),(null,null);
|
||||||
@ -28,10 +31,10 @@ select * from a1 where c1 not in (select c2 from a2 where a1.c2>a2.c2);
|
|||||||
select * from a1 where c1 not in (select 1 from a2 where a1.c1=a2.c1);
|
select * from a1 where c1 not in (select 1 from a2 where a1.c1=a2.c1);
|
||||||
select count(*) from a1 where c1 not in (select c2 from a2 where a1.c2=a2.c2);
|
select count(*) from a1 where c1 not in (select c2 from a2 where a1.c2=a2.c2);
|
||||||
select count(*) from a1 where not exists (select c2 from a2 where a1.c2=a2.c2 and a1.c1=a2.c1);
|
select count(*) from a1 where not exists (select c2 from a2 where a1.c2=a2.c2 and a1.c1=a2.c1);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table a1;
|
drop table a1;
|
||||||
drop table a2;
|
drop table a2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,11 +8,16 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3532;
|
drop table if exists bug3532;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table `bug3532` (`c1` char(1) default null, `c2` int(11) default null) engine=columnstore;
|
create table `bug3532` (`c1` char(1) default null, `c2` int(11) default null) engine=columnstore;
|
||||||
insert into bug3532 values (1,1), (0,0), (1,12), (1,-1), (null, null);
|
insert into bug3532 values (1,1), (0,0), (1,12), (1,-1), (null, null);
|
||||||
select round(c1,c1) from bug3532 where c1 = 1;
|
select round(c1,c1) from bug3532 where c1 = 1;
|
||||||
drop table bug3532;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table bug3532;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,9 +8,12 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists qatabledecimal2byte;
|
drop table if exists qatabledecimal2byte;
|
||||||
drop table if exists qatabledecimal4byte;
|
drop table if exists qatabledecimal4byte;
|
||||||
drop table if exists qatabletinyint;
|
drop table if exists qatabletinyint;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table qatabledecimal2byte (col1 decimal(1), col2 decimal(4), col3 decimal(4,2)) engine=columnstore;
|
create table qatabledecimal2byte (col1 decimal(1), col2 decimal(4), col3 decimal(4,2)) engine=columnstore;
|
||||||
create table qatabledecimal4byte (col1 decimal(5), col2 decimal(9), col3 decimal(9,2)) engine=columnstore;
|
create table qatabledecimal4byte (col1 decimal(5), col2 decimal(9), col3 decimal(9,2)) engine=columnstore;
|
||||||
create table qatabletinyint (col numeric(2,0)) engine=columnstore;
|
create table qatabletinyint (col numeric(2,0)) engine=columnstore;
|
||||||
@ -38,12 +41,11 @@ insert into qatabletinyint values (99);
|
|||||||
select * from qatabledecimal2byte;
|
select * from qatabledecimal2byte;
|
||||||
select * from qatabledecimal4byte;
|
select * from qatabledecimal4byte;
|
||||||
select * from qatabletinyint;
|
select * from qatabletinyint;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists qatabledecimal2byte;
|
drop table if exists qatabledecimal2byte;
|
||||||
drop table if exists qatabledecimal4byte;
|
drop table if exists qatabledecimal4byte;
|
||||||
drop table if exists qatabletinyint;
|
drop table if exists qatabletinyint;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3565;
|
drop table if exists bug3565;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
#-- Create a table with a tinyint.
|
#-- Create a table with a tinyint.
|
||||||
create table bug3565(c1 tinyint)engine=columnstore;
|
create table bug3565(c1 tinyint)engine=columnstore;
|
||||||
@ -22,6 +24,8 @@ select count(c1) from bug3565;
|
|||||||
select count(c2) from bug3565;
|
select count(c2) from bug3565;
|
||||||
select count(c3) from bug3565;
|
select count(c3) from bug3565;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3565;
|
drop table if exists bug3565;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3582;
|
drop table if exists bug3582;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3582 (c1 decimal(4,2), c2 char(4), c3 varchar(15)) engine=columnstore;
|
create table bug3582 (c1 decimal(4,2), c2 char(4), c3 varchar(15)) engine=columnstore;
|
||||||
insert into bug3582 values (4.00,'a','b');
|
insert into bug3582 values (4.00,'a','b');
|
||||||
select * from bug3582;
|
select * from bug3582;
|
||||||
select *, round(c1,1), round(c1,10) from bug3582;
|
select *, round(c1,1), round(c1,10) from bug3582;
|
||||||
update bug3582 set c2=round(c1,1), c3=round(c1,10);
|
update bug3582 set c2=round(c1,1), c3=round(c1,10);
|
||||||
select *, round(c1,1), round(c1,10) from bug3582;
|
select *, round(c1,1), round(c1,10) from bug3582;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3582;
|
drop table if exists bug3582;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists stringtest;
|
drop table if exists stringtest;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table stringtest (c1 char(10), c2 varchar(10), c3 varchar(6))engine=columnstore;
|
create table stringtest (c1 char(10), c2 varchar(10), c3 varchar(6))engine=columnstore;
|
||||||
insert into stringtest values ('abc','cde','abc'), ('cde','abc','cde');
|
insert into stringtest values ('abc','cde','abc'), ('cde','abc','cde');
|
||||||
select * from stringtest where c1='abc' or c2='abc';
|
select * from stringtest where c1='abc' or c2='abc';
|
||||||
@ -17,6 +20,9 @@ select * from stringtest where c2='abc ';
|
|||||||
select * from stringtest where c1='abc ' or c2='abc ';
|
select * from stringtest where c1='abc ' or c2='abc ';
|
||||||
select * from stringtest where c1 = 'abc' or c3='cde ';
|
select * from stringtest where c1 = 'abc' or c3='cde ';
|
||||||
select concat('abc ', c2), concat('cde ', c3) from stringtest;
|
select concat('abc ', c2), concat('cde ', c3) from stringtest;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table stringtest;
|
drop table stringtest;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists month;
|
drop table if exists month;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table month(id int, month varchar(20), season varchar(6))engine=columnstore;
|
create table month(id int, month varchar(20), season varchar(6))engine=columnstore;
|
||||||
insert into month values (1, 'Jan', 'Winter');
|
insert into month values (1, 'Jan', 'Winter');
|
||||||
SELECT *,
|
SELECT *,
|
||||||
@ -28,6 +31,9 @@ AND (@_season := season) IS NOT NULL;
|
|||||||
|
|
||||||
SELECT * FROM ( SELECT m.* FROM
|
SELECT * FROM ( SELECT m.* FROM
|
||||||
( SELECT @_season is NULL a) vars, month m where a=m.id ORDER BY season, id ) mo;
|
( SELECT @_season is NULL a) vars, month m where a=m.id ORDER BY season, id ) mo;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table month;
|
drop table month;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists pts_agg_url_report;
|
drop table if exists pts_agg_url_report;
|
||||||
drop table if exists pts_dim_publisher;
|
drop table if exists pts_dim_publisher;
|
||||||
drop table if exists pts_dim_subsite;
|
drop table if exists pts_dim_subsite;
|
||||||
drop table if exists pts_meta_ad;
|
drop table if exists pts_meta_ad;
|
||||||
drop table if exists pts_meta_campaign;
|
drop table if exists pts_meta_campaign;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `pts_agg_url_report` (
|
CREATE TABLE `pts_agg_url_report` (
|
||||||
`agg_date` date DEFAULT NULL,
|
`agg_date` date DEFAULT NULL,
|
||||||
@ -60,7 +62,7 @@ CREATE TABLE `pts_meta_ad` (
|
|||||||
`dimensionName` varchar(250) DEFAULT NULL
|
`dimensionName` varchar(250) DEFAULT NULL
|
||||||
) engine=columnstore;
|
) engine=columnstore;
|
||||||
|
|
||||||
cREATE TABLE `pts_meta_campaign` (
|
CREATE TABLE `pts_meta_campaign` (
|
||||||
`clientId` varchar(32) DEFAULT NULL,
|
`clientId` varchar(32) DEFAULT NULL,
|
||||||
`externalClientId` int(11) DEFAULT NULL,
|
`externalClientId` int(11) DEFAULT NULL,
|
||||||
`id` varchar(32) DEFAULT NULL,
|
`id` varchar(32) DEFAULT NULL,
|
||||||
@ -90,6 +92,7 @@ pts_meta_campaign pmc on pmc.id = s.cid
|
|||||||
where cid is not null order by agg_date,pmc.displayname,publisher,pds.subsite,pma.dimensionname
|
where cid is not null order by agg_date,pmc.displayname,publisher,pds.subsite,pma.dimensionname
|
||||||
;
|
;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table pts_agg_url_report;
|
drop table pts_agg_url_report;
|
||||||
drop table pts_dim_publisher;
|
drop table pts_dim_publisher;
|
||||||
drop table pts_dim_subsite;
|
drop table pts_dim_subsite;
|
||||||
@ -99,6 +102,7 @@ drop table pts_meta_campaign;
|
|||||||
drop table if exists marketing_conversions;
|
drop table if exists marketing_conversions;
|
||||||
drop table if exists marketing_events;
|
drop table if exists marketing_events;
|
||||||
drop table if exists marketing_leads;
|
drop table if exists marketing_leads;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `marketing_conversions` (
|
CREATE TABLE `marketing_conversions` (
|
||||||
`pkMarketingConversionID` int(10) DEFAULT NULL,
|
`pkMarketingConversionID` int(10) DEFAULT NULL,
|
||||||
@ -184,8 +188,10 @@ marketing_conversions where createdon > '2011-01-01' and newuser = 1 and
|
|||||||
productid = 'Business-2010' group by xdate ) bus on bus.xdate=ml.xdate group
|
productid = 'Business-2010' group by xdate ) bus on bus.xdate=ml.xdate group
|
||||||
by ml.xdate order by ml.xdate;
|
by ml.xdate order by ml.xdate;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table marketing_conversions;
|
drop table marketing_conversions;
|
||||||
drop table marketing_events;
|
drop table marketing_events;
|
||||||
drop table marketing_leads;
|
drop table marketing_leads;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -66,4 +66,7 @@ insert into bug3682 values
|
|||||||
('2011-01-29 23:46:13');
|
('2011-01-29 23:46:13');
|
||||||
select date(c1), count(*) from bug3682 group by 1 order by 1;
|
select date(c1), count(*) from bug3682 group by 1 order by 1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3682;
|
drop table if exists bug3682;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
@ -8,12 +8,18 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table t1(f1 varchar(5)) engine=columnstore;
|
create table t1(f1 varchar(5)) engine=columnstore;
|
||||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||||
select * from t1 order by 1;
|
select * from t1 order by 1;
|
||||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||||
select * from t1 order by 1;
|
select * from t1 order by 1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,12 +8,18 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists looooooooooooooooooooooooooooooooooooooooong_tb_name;
|
drop table if exists looooooooooooooooooooooooooooooooooooooooong_tb_name;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table looooooooooooooooooooooooooooooooooooooooong_tb_name (looooooooooooooooooooooooooooooooooooooooong_col_name int)engine=columnstore;
|
create table looooooooooooooooooooooooooooooooooooooooong_tb_name (looooooooooooooooooooooooooooooooooooooooong_col_name int)engine=columnstore;
|
||||||
insert into looooooooooooooooooooooooooooooooooooooooong_tb_name values (10);
|
insert into looooooooooooooooooooooooooooooooooooooooong_tb_name values (10);
|
||||||
select looooooooooooooooooooooooooooooooooooooooong_col_name from looooooooooooooooooooooooooooooooooooooooong_tb_name
|
select looooooooooooooooooooooooooooooooooooooooong_col_name from looooooooooooooooooooooooooooooooooooooooong_tb_name
|
||||||
order by isnull(looooooooooooooooooooooooooooooooooooooooong_col_name);
|
order by isnull(looooooooooooooooooooooooooooooooooooooooong_col_name);
|
||||||
select concat('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', looooooooooooooooooooooooooooooooooooooooong_col_name) from looooooooooooooooooooooooooooooooooooooooong_tb_name;
|
select concat('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', looooooooooooooooooooooooooooooooooooooooong_col_name) from looooooooooooooooooooooooooooooooooooooooong_tb_name;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table looooooooooooooooooooooooooooooooooooooooong_tb_name;
|
drop table looooooooooooooooooooooooooooooooooooooooong_tb_name;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,11 +8,15 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
create database if not exists geo;
|
create database if not exists geo;
|
||||||
|
--enable_warnings
|
||||||
use geo;
|
use geo;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists `geo_tag_values`;
|
drop table if exists `geo_tag_values`;
|
||||||
drop table if exists `geo_tags`;
|
drop table if exists `geo_tags`;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `geo_tag_values` (
|
CREATE TABLE `geo_tag_values` (
|
||||||
`id` int(11) DEFAULT NULL,
|
`id` int(11) DEFAULT NULL,
|
||||||
@ -29,8 +33,12 @@ CREATE TABLE `geo_tags` (
|
|||||||
`lock_version` int(11) DEFAULT NULL
|
`lock_version` int(11) DEFAULT NULL
|
||||||
) engine=columnstore;
|
) engine=columnstore;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
create database if not exists pbkt;
|
create database if not exists pbkt;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
use pbkt;
|
use pbkt;
|
||||||
|
--disable_warnings
|
||||||
drop table if exists `areas`;
|
drop table if exists `areas`;
|
||||||
drop table if exists `bigsumplus`;
|
drop table if exists `bigsumplus`;
|
||||||
drop table if exists `dim_date`;
|
drop table if exists `dim_date`;
|
||||||
@ -39,6 +47,7 @@ drop table if exists `tag_values`;
|
|||||||
drop view if exists `tag_values_geo_country`;
|
drop view if exists `tag_values_geo_country`;
|
||||||
drop view if exists `tag_values_geo_region`;
|
drop view if exists `tag_values_geo_region`;
|
||||||
drop view if exists `tag_values_ptype`;
|
drop view if exists `tag_values_ptype`;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `areas` (
|
CREATE TABLE `areas` (
|
||||||
`id` int(11) DEFAULT NULL,
|
`id` int(11) DEFAULT NULL,
|
||||||
@ -279,9 +288,13 @@ select `tag_values_ptype`.value from (select * from tag_values_ptype) t1, tag_va
|
|||||||
where tag_values_ptype.id = t1.id;
|
where tag_values_ptype.id = t1.id;
|
||||||
|
|
||||||
use geo;
|
use geo;
|
||||||
|
--disable_warnings
|
||||||
drop table `geo_tag_values`;
|
drop table `geo_tag_values`;
|
||||||
drop table `geo_tags`;
|
drop table `geo_tags`;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
use pbkt;
|
use pbkt;
|
||||||
|
--disable_warnings
|
||||||
drop table `areas`;
|
drop table `areas`;
|
||||||
drop table `bigsumplus`;
|
drop table `bigsumplus`;
|
||||||
drop table `dim_date`;
|
drop table `dim_date`;
|
||||||
@ -292,7 +305,6 @@ drop view `tag_values_geo_region`;
|
|||||||
drop view `tag_values_ptype`;
|
drop view `tag_values_ptype`;
|
||||||
drop database geo;
|
drop database geo;
|
||||||
drop database pbkt;
|
drop database pbkt;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3783;
|
drop table if exists bug3783;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
set max_length_for_sort_data = 8192;
|
set max_length_for_sort_data = 8192;
|
||||||
create table bug3783 (id int, name varchar(1000))engine=columnstore;
|
create table bug3783 (id int, name varchar(1000))engine=columnstore;
|
||||||
insert into bug3783 values (1,'yionfsdayfeiwajg'),(2,'gretsuyhejkstj jkete');
|
insert into bug3783 values (1,'yionfsdayfeiwajg'),(2,'gretsuyhejkstj jkete');
|
||||||
@ -16,7 +19,9 @@ select id, hex(name) from bug3783 order by 1,2;
|
|||||||
select id, group_concat(name) from bug3783 group by 1 order by 1;
|
select id, group_concat(name) from bug3783 group by 1 order by 1;
|
||||||
select id, min(repeat(name,3)) from bug3783 group by 1 order by 1;
|
select id, min(repeat(name,3)) from bug3783 group by 1 order by 1;
|
||||||
select id, repeat(name,3) from bug3783 order by 1,2;
|
select id, repeat(name,3) from bug3783 order by 1,2;
|
||||||
drop table bug3783;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table bug3783;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3792;
|
drop table if exists bug3792;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3792 (c1 int, c2 datetime) engine=columnstore;
|
create table bug3792 (c1 int, c2 datetime) engine=columnstore;
|
||||||
insert into bug3792 values (1, '9999-12-31 23:59:59');
|
insert into bug3792 values (1, '9999-12-31 23:59:59');
|
||||||
@ -23,6 +25,8 @@ select c1, c2, subtime(c2, '2:0:0') x from bug3792 where c1 = 1;
|
|||||||
select c1, c2, subtime(c2, '2:0:0') x from bug3792 where c1 = 2;
|
select c1, c2, subtime(c2, '2:0:0') x from bug3792 where c1 = 2;
|
||||||
select c1, c2, subtime(c2, '2:0:0') x from bug3792 where c1 = 3;
|
select c1, c2, subtime(c2, '2:0:0') x from bug3792 where c1 = 3;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3792;
|
drop table bug3792;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -9,11 +9,16 @@
|
|||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
select cidx, CDOUBLE, CAST(CDOUBLE AS DECIMAL(9)) from datatypetestm order by cidx;
|
select cidx, CDOUBLE, CAST(CDOUBLE AS DECIMAL(9)) from datatypetestm order by cidx;
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3798;
|
drop table if exists bug3798;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3798 (c1 float) engine=columnstore;
|
create table bug3798 (c1 float) engine=columnstore;
|
||||||
insert into bug3798 values (1234567), (1.2345678);
|
insert into bug3798 values (1234567), (1.2345678);
|
||||||
select c1, cast(c1 as decimal(9,2)), cast(c1 as decimal(14,12)) from bug3798;
|
select c1, cast(c1 as decimal(9,2)), cast(c1 as decimal(14,12)) from bug3798;
|
||||||
drop table bug3798;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table bug3798;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists dw_entradas_fact;
|
drop table if exists dw_entradas_fact;
|
||||||
drop table if exists dw_entradas_fact_1;
|
drop table if exists dw_entradas_fact_1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table dw_entradas_fact (fecha date) engine=columnstore;
|
create table dw_entradas_fact (fecha date) engine=columnstore;
|
||||||
create table dw_entradas_fact_1 (fecha date) engine=columnstore;
|
create table dw_entradas_fact_1 (fecha date) engine=columnstore;
|
||||||
@ -91,11 +93,11 @@ union
|
|||||||
FROM DW_ENTRADAS_FACT_1
|
FROM DW_ENTRADAS_FACT_1
|
||||||
WHERE FECHA BETWEEN '2010-02-01' and '2010-02-28')) AS TY;
|
WHERE FECHA BETWEEN '2010-02-01' and '2010-02-28')) AS TY;
|
||||||
|
|
||||||
|
|
||||||
drop table if exists dw_entradas_fact;
|
|
||||||
drop table if exists dw_entradas_fact_1;
|
|
||||||
|
|
||||||
select * from region where 2=2 union select n_regionkey, n_nationkey, n_name from nation where 0=1;
|
select * from region where 2=2 union select n_regionkey, n_nationkey, n_name from nation where 0=1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists dw_entradas_fact;
|
||||||
|
drop table if exists dw_entradas_fact_1;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
# -------------------------------------------------------------- #
|
# -------------------------------------------------------------- #
|
||||||
# Test case migrated from regression test suite: bug3932.sql
|
# Test case migrated from regression test suite: bug3932.sql
|
||||||
#
|
#
|
||||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||||
# -------------------------------------------------------------- #
|
# -------------------------------------------------------------- #
|
||||||
#
|
#
|
||||||
--source ../include/have_columnstore.inc
|
--source ../include/have_columnstore.inc
|
||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists qa_nation;
|
drop table if exists qa_nation;
|
||||||
drop table if exists qa_customer;
|
drop table if exists qa_customer;
|
||||||
drop table if exists qa_region;
|
drop table if exists qa_region;
|
||||||
drop table if exists qa_orders;
|
drop table if exists qa_orders;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table qa_nation (n_id int, n_name char(20), regionid int) engine=columnstore;
|
create table qa_nation (n_id int, n_name char(20), regionid int) engine=columnstore;
|
||||||
create table qa_customer (c_id int, c_custname char(20), nationid int) engine=columnstore;
|
create table qa_customer (c_id int, c_custname char(20), nationid int) engine=columnstore;
|
||||||
@ -24,7 +25,6 @@ insert into qa_nation values (1, 'UNITED STATES', 2), (2, 'CANADA', 2), (3, 'JAP
|
|||||||
insert into qa_customer values (1, 'Cust_US', 1), (2, 'Cust_Japan', 3), (3, 'Cust_Italy', 6);
|
insert into qa_customer values (1, 'Cust_US', 1), (2, 'Cust_Japan', 3), (3, 'Cust_Italy', 6);
|
||||||
insert into qa_orders values (1, 'Order_US#1', 1), (2, 'Order_US#2', 1), (3, 'Order_Japan#1', 2);
|
insert into qa_orders values (1, 'Order_US#1', 1), (2, 'Order_US#2', 1), (3, 'Order_Japan#1', 2);
|
||||||
|
|
||||||
|
|
||||||
select n.n_name, c.c_custname
|
select n.n_name, c.c_custname
|
||||||
from qa_nation n
|
from qa_nation n
|
||||||
join qa_customer c on n.n_id = c.nationid
|
join qa_customer c on n.n_id = c.nationid
|
||||||
@ -55,10 +55,6 @@ from qa_nation n
|
|||||||
left outer join qa_customer c on n.n_id = c.nationid
|
left outer join qa_customer c on n.n_id = c.nationid
|
||||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) group by n.n_name order by n.n_name;
|
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) group by n.n_name order by n.n_name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select r.r_name, n.n_name, c.c_custname
|
select r.r_name, n.n_name, c.c_custname
|
||||||
from qa_region r
|
from qa_region r
|
||||||
join qa_nation n on r.r_id = n.regionid
|
join qa_nation n on r.r_id = n.regionid
|
||||||
@ -95,11 +91,6 @@ from qa_region r
|
|||||||
left outer join qa_customer c on n.n_id = c.nationid
|
left outer join qa_customer c on n.n_id = c.nationid
|
||||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select r.r_name, n.n_name, c.c_custname
|
select r.r_name, n.n_name, c.c_custname
|
||||||
from qa_region r
|
from qa_region r
|
||||||
join qa_nation n on r.r_id = n.regionid
|
join qa_nation n on r.r_id = n.regionid
|
||||||
@ -136,10 +127,6 @@ from qa_region r
|
|||||||
left outer join qa_customer c on n.n_id = c.nationid
|
left outer join qa_customer c on n.n_id = c.nationid
|
||||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||||
from qa_region r
|
from qa_region r
|
||||||
join qa_nation n on r.r_id = n.regionid
|
join qa_nation n on r.r_id = n.regionid
|
||||||
@ -182,9 +169,6 @@ from qa_region r
|
|||||||
left outer join qa_orders o on c.c_id = o.custid
|
left outer join qa_orders o on c.c_id = o.custid
|
||||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||||
from qa_region r
|
from qa_region r
|
||||||
join qa_nation n on r.r_id = n.regionid
|
join qa_nation n on r.r_id = n.regionid
|
||||||
@ -227,10 +211,6 @@ from qa_region r
|
|||||||
left outer join qa_orders o on c.c_id = o.custid
|
left outer join qa_orders o on c.c_id = o.custid
|
||||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||||
from qa_region r
|
from qa_region r
|
||||||
join qa_nation n on r.r_id = n.regionid
|
join qa_nation n on r.r_id = n.regionid
|
||||||
@ -273,10 +253,6 @@ from qa_region r
|
|||||||
left outer join qa_orders o on c.c_id = o.custid
|
left outer join qa_orders o on c.c_id = o.custid
|
||||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||||
from qa_region r
|
from qa_region r
|
||||||
join qa_nation n on r.r_id = n.regionid
|
join qa_nation n on r.r_id = n.regionid
|
||||||
@ -340,13 +316,11 @@ from qa_region r
|
|||||||
left outer join qa_orders o on c.c_id = o.custid
|
left outer join qa_orders o on c.c_id = o.custid
|
||||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
|
||||||
|
|
||||||
drop table if exists qa_nation;
|
drop table if exists qa_nation;
|
||||||
drop table if exists qa_customer;
|
drop table if exists qa_customer;
|
||||||
drop table if exists qa_region;
|
drop table if exists qa_region;
|
||||||
drop table if exists qa_orders;
|
drop table if exists qa_orders;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
|
@ -8,10 +8,12 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists fct_summary_transactional_snapshot;
|
drop table if exists fct_summary_transactional_snapshot;
|
||||||
drop table if exists dim_c_bridge_duration;
|
drop table if exists dim_c_bridge_duration;
|
||||||
drop table if exists fct_macro_payment_details;
|
drop table if exists fct_macro_payment_details;
|
||||||
drop table if exists dim_c_calendar;
|
drop table if exists dim_c_calendar;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `fct_macro_payment_details` (
|
CREATE TABLE `fct_macro_payment_details` (
|
||||||
`TRANSACTION_DW_ID` bigint(20) DEFAULT NULL,
|
`TRANSACTION_DW_ID` bigint(20) DEFAULT NULL,
|
||||||
@ -196,11 +198,11 @@ ON b.PeriodDesc = d.PeriodDesc ;
|
|||||||
)b
|
)b
|
||||||
ON b.PeriodDesc= d.PeriodDesc;
|
ON b.PeriodDesc= d.PeriodDesc;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table fct_summary_transactional_snapshot;
|
drop table fct_summary_transactional_snapshot;
|
||||||
drop table dim_c_bridge_duration;
|
drop table dim_c_bridge_duration;
|
||||||
drop table fct_macro_payment_details;
|
drop table fct_macro_payment_details;
|
||||||
drop table dim_c_calendar;
|
drop table dim_c_calendar;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,10 +8,16 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3952;
|
drop table if exists bug3952;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3952 (id int, name varchar(25));
|
create table bug3952 (id int, name varchar(25));
|
||||||
insert into bug3952 values (1,'aaa'),(2,'bbb');
|
insert into bug3952 values (1,'aaa'),(2,'bbb');
|
||||||
select * from bug3952 n1, (select * from bug3952)n2 where n1.id=n2.id;
|
select * from bug3952 n1, (select * from bug3952)n2 where n1.id=n2.id;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug3952;
|
drop table bug3952;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
# -------------------------------------------------------------- #
|
# -------------------------------------------------------------- #
|
||||||
# Test case migrated from regression test suite: bug3998.sql
|
# Test case migrated from regression test suite: bug3998.sql
|
||||||
#
|
#
|
||||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||||
# -------------------------------------------------------------- #
|
# -------------------------------------------------------------- #
|
||||||
#
|
#
|
||||||
--source ../include/have_columnstore.inc
|
--source ../include/have_columnstore.inc
|
||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3998a;
|
drop table if exists bug3998a;
|
||||||
drop table if exists bug3998b;
|
drop table if exists bug3998b;
|
||||||
drop table if exists bug3998c;
|
drop table if exists bug3998c;
|
||||||
drop table if exists bug3998d;
|
drop table if exists bug3998d;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
||||||
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||||
@ -38,10 +40,12 @@ select * from bug3998b;
|
|||||||
update bug3998c right join bug3998d on bug3998c.c1 = bug3998d.c1 set bug3998c.c1=9;
|
update bug3998c right join bug3998d on bug3998c.c1 = bug3998d.c1 set bug3998c.c1=9;
|
||||||
select * from bug3998c;
|
select * from bug3998c;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3998a;
|
drop table if exists bug3998a;
|
||||||
drop table if exists bug3998b;
|
drop table if exists bug3998b;
|
||||||
drop table if exists bug3998c;
|
drop table if exists bug3998c;
|
||||||
drop table if exists bug3998d;
|
drop table if exists bug3998d;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
||||||
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||||
@ -68,9 +72,11 @@ select * from bug3998b;
|
|||||||
delete c from bug3998c c right join bug3998d d on c.c1 = d.c1;
|
delete c from bug3998c c right join bug3998d d on c.c1 = d.c1;
|
||||||
select * from bug3998c;
|
select * from bug3998c;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3998a;
|
drop table if exists bug3998a;
|
||||||
drop table if exists bug3998b;
|
drop table if exists bug3998b;
|
||||||
drop table if exists bug3998c;
|
drop table if exists bug3998c;
|
||||||
drop table if exists bug3998d;
|
drop table if exists bug3998d;
|
||||||
#
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists product;
|
drop table if exists product;
|
||||||
drop table if exists product_tag;
|
drop table if exists product_tag;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table product_tag (product_id bigint)engine=columnstore;
|
create table product_tag (product_id bigint)engine=columnstore;
|
||||||
|
|
||||||
@ -34,8 +36,10 @@ set brand=p.product_id, price=555, modified_dtm='2011-12-15 15:15:30',
|
|||||||
short_description=concat(short_description,modified_by);
|
short_description=concat(short_description,modified_by);
|
||||||
|
|
||||||
select * from product;
|
select * from product;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table product;
|
drop table product;
|
||||||
drop table product_tag;
|
drop table product_tag;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -32,5 +32,7 @@ select 'q5', birthdate, age, id, col8 from bug3657 where col8=6;
|
|||||||
select calflushcache();
|
select calflushcache();
|
||||||
select 'q6', birthdate, age, id, col8 from bug3657 where col8=2;
|
select 'q6', birthdate, age, id, col8 from bug3657 where col8=2;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug3657;
|
drop table if exists bug3657;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists dim_day;
|
drop table if exists dim_day;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `dim_day` (
|
CREATE TABLE `dim_day` (
|
||||||
`dayId` SMALLINT(5) DEFAULT NULL,
|
`dayId` SMALLINT(5) DEFAULT NULL,
|
||||||
`displayDate` DATE DEFAULT NULL
|
`displayDate` DATE DEFAULT NULL
|
||||||
@ -17,5 +20,9 @@ INSERT INTO dim_day (dayId, displayDate) VALUES (1,'2012-01-01') ,
|
|||||||
(2,'2012-02-01');
|
(2,'2012-02-01');
|
||||||
SELECT STR_TO_DATE(CONCAT(YEARWEEK(displayDate,2),'-01'),'%X%V-%w')
|
SELECT STR_TO_DATE(CONCAT(YEARWEEK(displayDate,2),'-01'),'%X%V-%w')
|
||||||
FROM dim_day;
|
FROM dim_day;
|
||||||
drop table dim_day;#
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table dim_day;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug4359;
|
drop table if exists bug4359;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE bug4359 (
|
CREATE TABLE bug4359 (
|
||||||
sdate datetime DEFAULT NULL,
|
sdate datetime DEFAULT NULL,
|
||||||
@ -21,7 +23,8 @@ insert into bug4359 values ('2009-01-05 13:30:00','2009-01-05 14:00:00');
|
|||||||
select timediff(edate,sdate) from bug4359;
|
select timediff(edate,sdate) from bug4359;
|
||||||
select time_to_sec(timediff(edate,sdate)) from bug4359;
|
select time_to_sec(timediff(edate,sdate)) from bug4359;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug4359;
|
drop table bug4359;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,9 +8,15 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--enable_warnings
|
||||||
create table if not exists mkr (c1 int, select_b int) engine=columnstore;
|
create table if not exists mkr (c1 int, select_b int) engine=columnstore;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
insert into mkr (c1, select_b) (select n_nationkey, n_regionkey from nation);
|
insert into mkr (c1, select_b) (select n_nationkey, n_regionkey from nation);
|
||||||
select * from mkr;
|
select * from mkr;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table mkr;
|
drop table mkr;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists dim_date;
|
drop table if exists dim_date;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table dim_date ( companycode integer, FinancialQuarterID integer,
|
create table dim_date ( companycode integer, FinancialQuarterID integer,
|
||||||
FinancialQuarter integer, FinancialYear integer ) engine=columnstore;
|
FinancialQuarter integer, FinancialYear integer ) engine=columnstore;
|
||||||
insert into dim_date values (1,1,2,1);
|
insert into dim_date values (1,1,2,1);
|
||||||
@ -19,7 +22,9 @@ select count(*) from dim_date x_varDate where FinancialQuarterID B
|
|||||||
x_varDate.FinancialQuarter <= 3 THEN ((x_varDate.FinancialYear - 1) * 10) +
|
x_varDate.FinancialQuarter <= 3 THEN ((x_varDate.FinancialYear - 1) * 10) +
|
||||||
(1 + x_varDate.FinancialQuarter) ELSE (x_varDate.FinancialYear * 10) +
|
(1 + x_varDate.FinancialQuarter) ELSE (x_varDate.FinancialYear * 10) +
|
||||||
(x_varDate.FinancialQuarter - 3) END AND x_varDate.FinancialQuarterID;
|
(x_varDate.FinancialQuarter - 3) END AND x_varDate.FinancialQuarterID;
|
||||||
drop table dim_date;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table dim_date;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -99,6 +99,10 @@ insert into t3 values
|
|||||||
|
|
||||||
select * from (select a,b from t1 union select a,b from t2 union select a,b from t3) tu order by a,b;
|
select * from (select a,b from t1 union select a,b from t2 union select a,b from t3) tu order by a,b;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
drop table t3;
|
drop table t3;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
|
@ -18,5 +18,7 @@ insert into bug4391 (c2) values (1);
|
|||||||
insert into bug4391 (c2) values (2),(3);
|
insert into bug4391 (c2) values (2),(3);
|
||||||
select * from bug4391;
|
select * from bug4391;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug4391;
|
drop table if exists bug4391;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -10,10 +10,16 @@ USE tpch1;
|
|||||||
#
|
#
|
||||||
# Prior to bug 4629, this was a negative test case. The year range was expanded from 1000 on the low end to the year 0 on the low end with the bug.
|
# Prior to bug 4629, this was a negative test case. The year range was expanded from 1000 on the low end to the year 0 on the low end with the bug.
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug4394;
|
drop table if exists bug4394;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug4394(c1 datetime) engine=columnstore;
|
create table bug4394(c1 datetime) engine=columnstore;
|
||||||
insert into bug4394 values('1000-01-01 00:00:00');
|
insert into bug4394 values('1000-01-01 00:00:00');
|
||||||
select * from bug4394;
|
select * from bug4394;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug4394;
|
drop table bug4394;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,12 +8,13 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bigsumplus;
|
drop table if exists bigsumplus;
|
||||||
drop table if exists areas;
|
drop table if exists areas;
|
||||||
drop table if exists geo_tag_values;
|
drop table if exists geo_tag_values;
|
||||||
drop table if exists geo_tags;
|
drop table if exists geo_tags;
|
||||||
drop view if exists tag_values_geo_country;
|
drop view if exists tag_values_geo_country;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table if not exists
|
create table if not exists
|
||||||
`bigsumplus` (
|
`bigsumplus` (
|
||||||
@ -119,12 +120,12 @@ select g.name,g.country,g.served from (select b.area as name,gc.value as country
|
|||||||
bigsumplus b join tag_values_geo_country gc on b.geo_country=gc.id join areas a on b.area=a.id where
|
bigsumplus b join tag_values_geo_country gc on b.geo_country=gc.id join areas a on b.area=a.id where
|
||||||
cdate='2012-05-15' group by b.area,gc.value) g where g.served <= 3;
|
cdate='2012-05-15' group by b.area,gc.value) g where g.served <= 3;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bigsumplus;
|
drop table bigsumplus;
|
||||||
drop table areas;
|
drop table areas;
|
||||||
drop table geo_tag_values;
|
drop table geo_tag_values;
|
||||||
drop table geo_tags;
|
drop table geo_tags;
|
||||||
drop view tag_values_geo_country;
|
drop view tag_values_geo_country;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,21 +8,26 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug4431_1;
|
drop table if exists bug4431_1;
|
||||||
drop table if exists bug4431_2;
|
drop table if exists bug4431_2;
|
||||||
drop table if exists bug4431_3;
|
drop table if exists bug4431_3;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug4431_1 (date int, col2 date) engine=columnstore;
|
create table bug4431_1 (date int, col2 date) engine=columnstore;
|
||||||
create table bug4431_2 (`date` int, col2 date) engine=columnstore;
|
create table bug4431_2 (`date` int, col2 date) engine=columnstore;
|
||||||
create table bug4431_3 (col2 date) engine=columnstore;
|
create table bug4431_3 (col2 date) engine=columnstore;
|
||||||
alter table bug4431_3 add column date int;
|
alter table bug4431_3 add column date int;
|
||||||
alter table bug4431_3 drop column date;
|
alter table bug4431_3 --disable_warnings
|
||||||
|
drop column date;
|
||||||
|
|
||||||
insert into bug4431_1 values (1, '2012-06-06'),(2, '2012-06-06'),(3, '2012-06-06'),(4, '2012-06-06');
|
insert into bug4431_1 values (1, '2012-06-06'),(2, '2012-06-06'),(3, '2012-06-06'),(4, '2012-06-06');
|
||||||
select * from bug4431_1;
|
select * from bug4431_1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug4431_1;
|
drop table bug4431_1;
|
||||||
drop table bug4431_2;
|
drop table bug4431_2;
|
||||||
drop table bug4431_3;
|
drop table bug4431_3;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -137,8 +137,10 @@ SET C.pef_ind_trc_CEN06_date_partid = D.pepf_int_date_trc_partid_date,
|
|||||||
C.pef_id_fonctionnel_tournee = D.pepf_id_fonctionnel_tournee
|
C.pef_id_fonctionnel_tournee = D.pepf_id_fonctionnel_tournee
|
||||||
WHERE C.pef_env_id_env= D.pef_env_id_env;
|
WHERE C.pef_env_id_env= D.pef_env_id_env;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table poc_enveloppe_fact;
|
drop table poc_enveloppe_fact;
|
||||||
drop table poc_enveloppe_partid_fact;
|
drop table poc_enveloppe_partid_fact;
|
||||||
drop table poc_tmp_calc_indic;
|
drop table poc_tmp_calc_indic;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -33,8 +33,9 @@ homemcc, COUNT(*) AS gtot, count(distinct imei) as ugtot FROM `sessions` WHERE
|
|||||||
appname='WP Exchange Activation Tracking OBA QA' AND DATE(stime)>='2012-05-28'
|
appname='WP Exchange Activation Tracking OBA QA' AND DATE(stime)>='2012-05-28'
|
||||||
GROUP BY devname, homemcc, appversion, applang;
|
GROUP BY devname, homemcc, appversion, applang;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table `sessions`;
|
drop table `sessions`;
|
||||||
drop table myfil;
|
drop table myfil;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -29,7 +29,10 @@ insert into bug4509 values (1,2),(2,3),(3,4);
|
|||||||
insert into bug4509_myisam values (1,2),(2,4),(3,4);
|
insert into bug4509_myisam values (1,2),(2,4),(3,4);
|
||||||
select * from bug4509 join bug4509_myisam using (id);
|
select * from bug4509 join bug4509_myisam using (id);
|
||||||
select * from bug4509_myisam join bug4509 using (c1, id);
|
select * from bug4509_myisam join bug4509 using (c1, id);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug4509;
|
drop table bug4509;
|
||||||
drop table bug4509_myisam;
|
drop table bug4509_myisam;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
DROP USER 'cejuser'@'localhost';
|
DROP USER 'cejuser'@'localhost';
|
||||||
|
@ -51,5 +51,7 @@ select date_stamp, sum(adjusted_imp)
|
|||||||
#
|
#
|
||||||
select count(*) from bug4543 where dart_ad_id >= 1;
|
select count(*) from bug4543 where dart_ad_id >= 1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug4543;
|
drop table if exists bug4543;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists cat;
|
drop table if exists cat;
|
||||||
drop table if exists dog;
|
drop table if exists dog;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table cat(id int, f float, d double)engine=columnstore;
|
create table cat(id int, f float, d double)engine=columnstore;
|
||||||
create table dog(id int, f float, d double)engine=columnstore;
|
create table dog(id int, f float, d double)engine=columnstore;
|
||||||
@ -37,7 +39,9 @@ select 'q4', cat.* from cat;
|
|||||||
|
|
||||||
select 'q5', cat.id, dog.id from cat join dog on cat.f = dog.f and cat.d = dog.d;
|
select 'q5', cat.id, dog.id from cat join dog on cat.f = dog.f and cat.d = dog.d;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table cat;
|
drop table cat;
|
||||||
drop table dog;
|
drop table dog;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -92,5 +92,7 @@ select 12, count(o_orderpriority) from orders2;
|
|||||||
|
|
||||||
select count(distinct o_orderkey) from orders2;
|
select count(distinct o_orderkey) from orders2;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists orders2;
|
drop table if exists orders2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
@ -8,11 +8,17 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
create table if not exists casetest (id int, c1 int, c2 int, c3 int) engine=columnstore;
|
create table if not exists casetest (id int, c1 int, c2 int, c3 int) engine=columnstore;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
insert into casetest values (1, 1, 1, 1), (2, null, null, null), (3, 1, 1, null), (4, 1, null, null);
|
insert into casetest values (1, 1, 1, 1), (2, null, null, null), (3, 1, 1, null), (4, 1, null, null);
|
||||||
select id, case when c1 is not null and c2 is not null and c3 is not null then 'A' when c1 is not null and c2 is
|
select id, case when c1 is not null and c2 is not null and c3 is not null then 'A' when c1 is not null and c2 is
|
||||||
not null and c3 is null then 'B' when c1 is not null and c2 is null and c3 is not null then 'C' when c1 is not null
|
not null and c3 is null then 'B' when c1 is not null and c2 is null and c3 is not null then 'C' when c1 is not null
|
||||||
and c2 is null and c3 is null then 'D' end case_func from casetest;
|
and c2 is null and c3 is null then 'D' end case_func from casetest;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table casetest;
|
drop table casetest;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
create table if not exists bug5096 (id int, c1 int)engine=columnstore;
|
create table if not exists bug5096 (id int, c1 int)engine=columnstore;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
insert into bug5096 values (1,1),(2,2),(3,3),(4,4);
|
insert into bug5096 values (1,1),(2,2),(3,3),(4,4);
|
||||||
set autocommit=0;
|
set autocommit=0;
|
||||||
update bug5096 set id = 10 limit 2;
|
update bug5096 set id = 10 limit 2;
|
||||||
@ -27,7 +30,9 @@ select * from bug5096 limit 10;
|
|||||||
rollback;
|
rollback;
|
||||||
delete from bug5096 limit 2;
|
delete from bug5096 limit 2;
|
||||||
select * from bug5096;
|
select * from bug5096;
|
||||||
drop table bug5096;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table bug5096;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE if exists bug5099;
|
DROP TABLE if exists bug5099;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `bug5099` (`col1` datetime DEFAULT NULL, `col2` datetime DEFAULT NULL ) ENGINE=Columnstore;
|
CREATE TABLE `bug5099` (`col1` datetime DEFAULT NULL, `col2` datetime DEFAULT NULL ) ENGINE=Columnstore;
|
||||||
insert into bug5099 (col1, col2) values ('2012-09-24 11:00:01', '2012-09-24 11:00:00');
|
insert into bug5099 (col1, col2) values ('2012-09-24 11:00:01', '2012-09-24 11:00:00');
|
||||||
insert into bug5099 (col1, col2) values ('2012-09-24 11:01:00', '2012-09-24 11:02:00');
|
insert into bug5099 (col1, col2) values ('2012-09-24 11:01:00', '2012-09-24 11:02:00');
|
||||||
@ -21,7 +24,8 @@ insert into bug5099 (col1, col2) values ('2012-01-24 12:00:00', '2012-01-29 11:0
|
|||||||
insert into bug5099 (col1, col2) values ('2012-09-29 12:00:00', '2012-01-24 11:00:00');
|
insert into bug5099 (col1, col2) values ('2012-09-29 12:00:00', '2012-01-24 11:00:00');
|
||||||
select col1,col2,timediff(col1, col2),time_to_sec(timediff(col1, col2) ) from bug5099;
|
select col1,col2,timediff(col1, col2),time_to_sec(timediff(col1, col2) ) from bug5099;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5099;
|
drop table if exists bug5099;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists qadefaulttest;
|
drop table if exists qadefaulttest;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table qadefaulttest (cidx int) engine=columnstore;
|
create table qadefaulttest (cidx int) engine=columnstore;
|
||||||
ALTER TABLE qadefaulttest ADD column MYDOUBLE2 DOUBLE not null DEFAULT -88.88;
|
ALTER TABLE qadefaulttest ADD column MYDOUBLE2 DOUBLE not null DEFAULT -88.88;
|
||||||
insert into qadefaulttest values (1, -88.88);
|
insert into qadefaulttest values (1, -88.88);
|
||||||
@ -17,5 +20,8 @@ ALTER TABLE qadefaulttest ADD column MYFLOAT3 FLOAT not null DEFAULT -88.88;
|
|||||||
select * from qadefaulttest;
|
select * from qadefaulttest;
|
||||||
ALTER TABLE qadefaulttest ADD column MYDECIMAL2 DECIMAL(4,2) not null DEFAULT -88.88;
|
ALTER TABLE qadefaulttest ADD column MYDECIMAL2 DECIMAL(4,2) not null DEFAULT -88.88;
|
||||||
select * from qadefaulttest;
|
select * from qadefaulttest;
|
||||||
drop table qadefaulttest;#
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table qadefaulttest;#
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
@ -9,7 +9,10 @@
|
|||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
set @@sql_select_limit=4;
|
set @@sql_select_limit=4;
|
||||||
|
--disable_warnings
|
||||||
create table if not exists bug5054(id int)engine=columnstore;
|
create table if not exists bug5054(id int)engine=columnstore;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
insert into bug5054 values (1),(2),(3),(4),(5),(6),(7),(8);
|
insert into bug5054 values (1),(2),(3),(4),(5),(6),(7),(8);
|
||||||
update bug5054 set id=4 where id>5;
|
update bug5054 set id=4 where id>5;
|
||||||
select * from bug5054 order by 1;
|
select * from bug5054 order by 1;
|
||||||
@ -20,9 +23,9 @@ select count(*) from bug5054 order by 1;
|
|||||||
insert into bug5054 select * from bug5054;
|
insert into bug5054 select * from bug5054;
|
||||||
select * from bug5054 order by 1;
|
select * from bug5054 order by 1;
|
||||||
select count(*) from bug5054;
|
select count(*) from bug5054;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table bug5054;
|
drop table bug5054;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -34,8 +34,6 @@ ORDER BY
|
|||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.eigyo_shimei) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END),
|
(CASE (T1.eigyo_shimei) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END),
|
||||||
@ -48,7 +46,6 @@ ORDER BY
|
|||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END) number,
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END) number,
|
||||||
@ -61,7 +58,6 @@ ORDER BY
|
|||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END),
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END),
|
||||||
@ -74,7 +70,6 @@ ORDER BY
|
|||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.eigyo_shimei) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END),
|
(CASE (T1.eigyo_shimei) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END),
|
||||||
@ -87,7 +82,6 @@ ORDER BY
|
|||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.eigyo_shimei) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END) number,
|
(CASE (T1.eigyo_shimei) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END) number,
|
||||||
@ -100,6 +94,8 @@ ORDER BY
|
|||||||
T1.`eigyo_shimei`,
|
T1.`eigyo_shimei`,
|
||||||
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
(CASE (T1.`eigyo_shimei`) WHEN 'SMITH' THEN 1 WHEN 'ALLEN' THEN 2 WHEN 'JONES' THEN 3 ELSE 4 END);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table uriage_inf;
|
drop table uriage_inf;
|
||||||
drop table uriage_my;
|
drop table uriage_my;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -8,13 +8,17 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists uriage_inf;
|
drop table if exists uriage_inf;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table uriage_inf(eigyo_shimei varchar(20),uriage numeric) engine=columnstore default charset=utf8;
|
create table uriage_inf(eigyo_shimei varchar(20),uriage numeric) engine=columnstore default charset=utf8;
|
||||||
|
|
||||||
insert into uriage_inf values('SMITH',1000); insert into uriage_inf values('ALLEN',2000); insert into uriage_inf values('JONES',3000); insert into uriage_inf values('SMITH',4000); insert into uriage_inf values('BLAKE',5000);
|
insert into uriage_inf values('SMITH',1000); insert into uriage_inf values('ALLEN',2000); insert into uriage_inf values('JONES',3000); insert into uriage_inf values('SMITH',4000); insert into uriage_inf values('BLAKE',5000);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists uriage_my;
|
drop table if exists uriage_my;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table uriage_my (eigyo_shimei varchar(20),uriage numeric) engine=myisam default charset=utf8;
|
create table uriage_my (eigyo_shimei varchar(20),uriage numeric) engine=myisam default charset=utf8;
|
||||||
|
|
||||||
@ -61,6 +65,8 @@ GROUP BY
|
|||||||
ORDER BY
|
ORDER BY
|
||||||
T1.`eigyo_shimei`;
|
T1.`eigyo_shimei`;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table uriage_inf;
|
drop table uriage_inf;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists region1;
|
drop table if exists region1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table region1
|
create table region1
|
||||||
(
|
(
|
||||||
r_regionkey int,
|
r_regionkey int,
|
||||||
@ -23,7 +26,9 @@ start transaction;
|
|||||||
insert into region1 select * from tpch1.region;
|
insert into region1 select * from tpch1.region;
|
||||||
commit;
|
commit;
|
||||||
select * from region1;
|
select * from region1;
|
||||||
drop table region1;
|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table region1;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists test;
|
drop table if exists test;
|
||||||
drop view if exists test_v;
|
drop view if exists test_v;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table test (test1 numeric,test2 varchar(20)) engine=columnstore;
|
create table test (test1 numeric,test2 varchar(20)) engine=columnstore;
|
||||||
create view test_v as select * from test;
|
create view test_v as select * from test;
|
||||||
insert into test values (1,'data1');
|
insert into test values (1,'data1');
|
||||||
@ -19,7 +22,10 @@ insert into test values (3,'data3');
|
|||||||
select T.test1,T.test2 from test_v T;
|
select T.test1,T.test2 from test_v T;
|
||||||
select T.test1,T.test2 from test_v t;
|
select T.test1,T.test2 from test_v t;
|
||||||
select T.test1 from (select * from test_v)T;
|
select T.test1 from (select * from test_v)T;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table test;
|
drop table test;
|
||||||
drop view test_v;
|
drop view test_v;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5289a;
|
drop table if exists bug5289a;
|
||||||
drop table if exists bug5289b;
|
drop table if exists bug5289b;
|
||||||
drop view if exists bug5289b_v;
|
drop view if exists bug5289b_v;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug5289a(
|
create table bug5289a(
|
||||||
a decimal(10,0),
|
a decimal(10,0),
|
||||||
@ -32,8 +34,10 @@ select 'q1', count(*) from bug5289a a,bug5289_v b where a.a = b.a;
|
|||||||
select 'q2', count(*) from bug5289a a left join bug5289_v b on (a.a = b.a);
|
select 'q2', count(*) from bug5289a a left join bug5289_v b on (a.a = b.a);
|
||||||
select 'q3', count(*) from bug5289a a, bug5289b b where a.a = cast(b.a as decimal(10,0));
|
select 'q3', count(*) from bug5289a a, bug5289b b where a.a = cast(b.a as decimal(10,0));
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5289a;
|
drop table if exists bug5289a;
|
||||||
drop table if exists bug5289b;
|
drop table if exists bug5289b;
|
||||||
drop view if exists bug5289b_v;
|
drop view if exists bug5289b_v;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS bug5319_a;
|
DROP TABLE IF EXISTS bug5319_a;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `bug5319_a` (
|
CREATE TABLE `bug5319_a` (
|
||||||
`col1` int(11) DEFAULT NULL,
|
`col1` int(11) DEFAULT NULL,
|
||||||
`col2` int(11) DEFAULT NULL
|
`col2` int(11) DEFAULT NULL
|
||||||
@ -16,7 +19,10 @@ CREATE TABLE `bug5319_a` (
|
|||||||
insert into bug5319_a values (1,2);
|
insert into bug5319_a values (1,2);
|
||||||
insert into bug5319_a values (1,2);
|
insert into bug5319_a values (1,2);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS bug5319_b;
|
DROP TABLE IF EXISTS bug5319_b;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE `bug5319_b` (
|
CREATE TABLE `bug5319_b` (
|
||||||
`col1` int(11) DEFAULT NULL,
|
`col1` int(11) DEFAULT NULL,
|
||||||
`col2` int(11) DEFAULT NULL
|
`col2` int(11) DEFAULT NULL
|
||||||
@ -25,15 +31,20 @@ insert into bug5319_b values (1,2);
|
|||||||
insert into bug5319_b values (1,3);
|
insert into bug5319_b values (1,3);
|
||||||
insert into bug5319_b values (1,4);
|
insert into bug5319_b values (1,4);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP VIEW IF EXISTS view_bug5319_b;
|
DROP VIEW IF EXISTS view_bug5319_b;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create view view_bug5319_b as select bug5319_b.col1 AS col1, bug5319_b.col2 AS col2,sum(bug5319_b.col2) AS
|
create view view_bug5319_b as select bug5319_b.col1 AS col1, bug5319_b.col2 AS col2,sum(bug5319_b.col2) AS
|
||||||
kensyu_gk_total from bug5319_b group by bug5319_b.col1,bug5319_b.col2;
|
kensyu_gk_total from bug5319_b group by bug5319_b.col1,bug5319_b.col2;
|
||||||
Select bug5319_a.col1,bv.col2 from bug5319_a left join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2 ;
|
Select bug5319_a.col1,bv.col2 from bug5319_a left join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2 ;
|
||||||
Select bug5319_a.col1,bv.col2 from bug5319_a join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2;
|
Select bug5319_a.col1,bv.col2 from bug5319_a join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2;
|
||||||
Select bug5319_a.col1,bv.col2 from bug5319_a right join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2;
|
Select bug5319_a.col1,bv.col2 from bug5319_a right join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE bug5319_a;
|
DROP TABLE bug5319_a;
|
||||||
DROP TABLE bug5319_b;
|
DROP TABLE bug5319_b;
|
||||||
DROP VIEW view_bug5319_b;
|
DROP VIEW view_bug5319_b;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5448;
|
drop table if exists bug5448;
|
||||||
|
|
||||||
create table bug5448 (mst_date datetime) engine=columnstore;
|
create table bug5448 (mst_date datetime) engine=columnstore;
|
||||||
@ -17,6 +18,7 @@ insert into bug5448 values ('2012-03-01');
|
|||||||
|
|
||||||
select mst_date, date_add(date(mst_date), interval - 30 day) from bug5448;
|
select mst_date, date_add(date(mst_date), interval - 30 day) from bug5448;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5448;
|
drop table if exists bug5448;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5687;
|
drop table if exists bug5687;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create table bug5687(col1 datetime DEFAULT NULL) engine=columnstore;
|
create table bug5687(col1 datetime DEFAULT NULL) engine=columnstore;
|
||||||
insert into bug5687 (col1) values ("2012-01-24 11:00:01");
|
insert into bug5687 (col1) values ("2012-01-24 11:00:01");
|
||||||
@ -22,6 +24,8 @@ insert into bug5687 (col1) values ("2052-08-24 11:00:31");
|
|||||||
insert into bug5687 (col1) values ("3002-09-24 11:00:41");
|
insert into bug5687 (col1) values ("3002-09-24 11:00:41");
|
||||||
select TIMESTAMPADD(SECOND, 25284748647, col1) from bug5687;
|
select TIMESTAMPADD(SECOND, 25284748647, col1) from bug5687;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5687;
|
drop table if exists bug5687;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS bug5712;
|
DROP TABLE IF EXISTS bug5712;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE bug5712 (`time_tk` INT(11) UNSIGNED NOT NULL) ENGINE=Columnstore DEFAULT CHARSET=latin1;
|
CREATE TABLE bug5712 (`time_tk` INT(11) UNSIGNED NOT NULL) ENGINE=Columnstore DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
INSERT INTO bug5712 VALUES
|
INSERT INTO bug5712 VALUES
|
||||||
@ -23,5 +26,8 @@ INSERT INTO bug5712 VALUES
|
|||||||
SELECT LEFT(time_tk,6) AS time_tk_left FROM bug5712;
|
SELECT LEFT(time_tk,6) AS time_tk_left FROM bug5712;
|
||||||
SELECT RIGHT(time_tk,6) AS time_tk_right FROM bug5712;
|
SELECT RIGHT(time_tk,6) AS time_tk_right FROM bug5712;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS bug5712;#
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS bug5712;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ select col1*4.00040040003599959959996 from bug2437;
|
|||||||
|
|
||||||
select (count(*)/72143371)*100,(6001215/72143371)*100,(count(*)*100)/72143371,(6001215*100)/72143371 from lineitem;
|
select (count(*)/72143371)*100,(6001215/72143371)*100,(count(*)*100)/72143371,(6001215*100)/72143371 from lineitem;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table `p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess`;
|
drop table `p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess`;
|
||||||
drop table bug2437;
|
drop table bug2437;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
@ -8,10 +8,12 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop view if exists vwBug;
|
drop view if exists vwBug;
|
||||||
drop view if exists vwBug2;
|
drop view if exists vwBug2;
|
||||||
drop view if exists vwBug3;
|
drop view if exists vwBug3;
|
||||||
drop view if exists vwBug4;
|
drop view if exists vwBug4;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create view vwBug as
|
create view vwBug as
|
||||||
select sub1.c1 s1c1, sub1.c2 s1c2, sub2.c1 s2c1, sub2.c2 s2c2, sub3.c1 s3c1, sub3.c2 s3c2
|
select sub1.c1 s1c1, sub1.c2 s1c2, sub2.c1 s2c1, sub2.c2 s2c2, sub3.c1 s3c1, sub3.c2 s3c2
|
||||||
@ -38,10 +40,11 @@ select 'q9', vwBug.s1c1, vwBug2.s1c1 from vwBug right join vwBug2 on (vwBug.s1c1
|
|||||||
create view vwBug4 as (select * from vwBug3 where s1c1 in (select s1c2 from vwBug2 where s1c1 in (select s1c1 from vwBug)));
|
create view vwBug4 as (select * from vwBug3 where s1c1 in (select s1c2 from vwBug2 where s1c1 in (select s1c1 from vwBug)));
|
||||||
select 'q10', vwBug4.s1c1, vwBug4.s1c2, count(*) from vwBug4 group by 1, 2, 3 order by 1, 2, 3;
|
select 'q10', vwBug4.s1c1, vwBug4.s1c2, count(*) from vwBug4 group by 1, 2, 3 order by 1, 2, 3;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop view vwBug;
|
drop view vwBug;
|
||||||
drop view vwBug2;
|
drop view vwBug2;
|
||||||
drop view vwBug3;
|
drop view vwBug3;
|
||||||
drop view vwBug4;
|
drop view vwBug4;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists mk_calendar;
|
drop table if exists mk_calendar;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE if not exists `mk_calendar` (
|
CREATE TABLE if not exists `mk_calendar` (
|
||||||
`nengetsu_yyyymmdd` date DEFAULT NULL,
|
`nengetsu_yyyymmdd` date DEFAULT NULL,
|
||||||
`shukei_dd` varchar(6) DEFAULT NULL,
|
`shukei_dd` varchar(6) DEFAULT NULL,
|
||||||
@ -23,7 +26,10 @@ insert into mk_calendar values
|
|||||||
('2009-04-01', 1, 200904),
|
('2009-04-01', 1, 200904),
|
||||||
('2009-04-02', 2, 200904);
|
('2009-04-02', 2, 200904);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists mk_kishu_gaibu;
|
drop table if exists mk_kishu_gaibu;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE if not exists `mk_kishu_gaibu` (
|
CREATE TABLE if not exists `mk_kishu_gaibu` (
|
||||||
`Jyohokei_Denwa_Shurui` varchar(100) DEFAULT NULL,
|
`Jyohokei_Denwa_Shurui` varchar(100) DEFAULT NULL,
|
||||||
`Shuryoku_Hanbai_Kishu_Key` varchar(100) DEFAULT NULL
|
`Shuryoku_Hanbai_Kishu_Key` varchar(100) DEFAULT NULL
|
||||||
@ -39,7 +45,10 @@ insert into mk_kishu_gaibu values
|
|||||||
('A1', '508G'),
|
('A1', '508G'),
|
||||||
('GT', 'HD60');
|
('GT', 'HD60');
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists mk_kishubetsu_report2;
|
drop table if exists mk_kishubetsu_report2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE if not exists `mk_kishubetsu_report2` (
|
CREATE TABLE if not exists `mk_kishubetsu_report2` (
|
||||||
`KEYNO` int(10) DEFAULT NULL
|
`KEYNO` int(10) DEFAULT NULL
|
||||||
) ENGINE=Columnstore DEFAULT CHARSET=utf8;
|
) ENGINE=Columnstore DEFAULT CHARSET=utf8;
|
||||||
@ -56,7 +65,10 @@ insert into mk_kishubetsu_report2 values
|
|||||||
(1000009),
|
(1000009),
|
||||||
(6000001);
|
(6000001);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists mk_organization;
|
drop table if exists mk_organization;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE if not exists `mk_organization` (
|
CREATE TABLE if not exists `mk_organization` (
|
||||||
`Tokatsuten_Code` varchar(30) DEFAULT NULL,
|
`Tokatsuten_Code` varchar(30) DEFAULT NULL,
|
||||||
`Kyoten_Code` varchar(30) DEFAULT NULL
|
`Kyoten_Code` varchar(30) DEFAULT NULL
|
||||||
@ -74,7 +86,10 @@ insert into mk_organization values
|
|||||||
('EK21', '017'),
|
('EK21', '017'),
|
||||||
('NESM', '021');
|
('NESM', '021');
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists mk_shuryoku_hanbai_kishu;
|
drop table if exists mk_shuryoku_hanbai_kishu;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE if not exists `mk_shuryoku_hanbai_kishu` (
|
CREATE TABLE if not exists `mk_shuryoku_hanbai_kishu` (
|
||||||
`catalog_nengetsu` varchar(6) DEFAULT NULL,
|
`catalog_nengetsu` varchar(6) DEFAULT NULL,
|
||||||
`kata_shiki` varchar(20) DEFAULT NULL
|
`kata_shiki` varchar(20) DEFAULT NULL
|
||||||
@ -89,7 +104,10 @@ insert into mk_shuryoku_hanbai_kishu values
|
|||||||
(200905, 'S002'),
|
(200905, 'S002'),
|
||||||
(200905, 'BUGS');
|
(200905, 'BUGS');
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists ts_kishubetsu_hibetsu_pfmtst;
|
drop table if exists ts_kishubetsu_hibetsu_pfmtst;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE if not exists `ts_kishubetsu_hibetsu_pfmtst` (
|
CREATE TABLE if not exists `ts_kishubetsu_hibetsu_pfmtst` (
|
||||||
`keijyo_yyyymm` int(6) DEFAULT NULL,
|
`keijyo_yyyymm` int(6) DEFAULT NULL,
|
||||||
`keijyo_dd` varchar(6) DEFAULT '@',
|
`keijyo_dd` varchar(6) DEFAULT '@',
|
||||||
@ -109,7 +127,10 @@ insert into ts_kishubetsu_hibetsu_pfmtst values
|
|||||||
(200904, 3, 'K554', 'M18', 'GT', 1000004),
|
(200904, 3, 'K554', 'M18', 'GT', 1000004),
|
||||||
(200904, 4, 'K554', '021', 'ZZ', 3333333);
|
(200904, 4, 'K554', '021', 'ZZ', 3333333);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu_base;
|
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu_base;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE VIEW `v_kyotenbetsu_kishubetsu_hibetsu_base`
|
CREATE VIEW `v_kyotenbetsu_kishubetsu_hibetsu_base`
|
||||||
AS
|
AS
|
||||||
(
|
(
|
||||||
@ -137,7 +158,10 @@ AS
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu;
|
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
CREATE VIEW `v_kyotenbetsu_kishubetsu_hibetsu`
|
CREATE VIEW `v_kyotenbetsu_kishubetsu_hibetsu`
|
||||||
AS
|
AS
|
||||||
(
|
(
|
||||||
@ -153,10 +177,6 @@ AS
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select count(*) count1
|
select count(*) count1
|
||||||
from
|
from
|
||||||
(
|
(
|
||||||
@ -170,6 +190,7 @@ from (
|
|||||||
|
|
||||||
select count(*) count2 from v_kyotenbetsu_kishubetsu_hibetsu;
|
select count(*) count2 from v_kyotenbetsu_kishubetsu_hibetsu;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists mk_calendar;
|
drop table if exists mk_calendar;
|
||||||
drop table if exists mk_kishu_gaibu;
|
drop table if exists mk_kishu_gaibu;
|
||||||
drop table if exists mk_kishubetsu_report2;
|
drop table if exists mk_kishubetsu_report2;
|
||||||
@ -178,6 +199,6 @@ drop table if exists mk_shuryoku_hanbai_kishu;
|
|||||||
drop table if exists ts_kishubetsu_hibetsu_pfmtst;
|
drop table if exists ts_kishubetsu_hibetsu_pfmtst;
|
||||||
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu_base;
|
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu_base;
|
||||||
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu;
|
drop view if exists v_kyotenbetsu_kishubetsu_hibetsu;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS query_class_metrics_float;
|
DROP TABLE IF EXISTS query_class_metrics_float;
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -39,5 +40,6 @@ SELECT start_ts, Query_time_sum,FIRST_VALUE(Query_time_sum) OVER(order by start_
|
|||||||
SELECT start_ts, Query_time_sum,LAST_VALUE(Query_time_sum) OVER(order by start_ts) prev_sum from query_class_metrics_float where agent_id=1 and query_class=1563 limit 50;
|
SELECT start_ts, Query_time_sum,LAST_VALUE(Query_time_sum) OVER(order by start_ts) prev_sum from query_class_metrics_float where agent_id=1 and query_class=1563 limit 50;
|
||||||
SELECT start_ts, Query_time_sum,NTH_VALUE(Query_time_sum, 3) OVER(order by start_ts) prev_sum from query_class_metrics_float where agent_id=1 and query_class=1563 limit 50;
|
SELECT start_ts, Query_time_sum,NTH_VALUE(Query_time_sum, 3) OVER(order by start_ts) prev_sum from query_class_metrics_float where agent_id=1 and query_class=1563 limit 50;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE query_class_metrics_float;
|
DROP TABLE query_class_metrics_float;
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#
|
#
|
||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5932;
|
drop table if exists bug5932;
|
||||||
|
|
||||||
create table bug5932(c1 int)engine=columnstore;
|
create table bug5932(c1 int)engine=columnstore;
|
||||||
@ -25,6 +26,7 @@ select * from bug5932 where c1=2;
|
|||||||
|
|
||||||
select distinct c1 from bug5932 order by 1;
|
select distinct c1 from bug5932 order by 1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
drop table if exists bug5932;
|
drop table if exists bug5932;
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
USE tpch1;
|
USE tpch1;
|
||||||
#
|
#
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS `pv_facts`;
|
DROP TABLE IF EXISTS `pv_facts`;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
#
|
#
|
||||||
@ -348,5 +349,6 @@ count(*) over (partition by visit_id ) as pvs,
|
|||||||
from pv_facts
|
from pv_facts
|
||||||
where visit_id='U1mQdAoBCjUAAHbgZcsAAABS') a;
|
where visit_id='U1mQdAoBCjUAAHbgZcsAAABS') a;
|
||||||
#
|
#
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE `pv_facts`;
|
DROP TABLE `pv_facts`;
|
||||||
#
|
#
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user