Skip to content
Merged
17 changes: 0 additions & 17 deletions test/distributed/cases/dtype/decimal.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ select floor(cast(2231231.501231 as decimal));
#Test cases of query with single table
drop table if exists t1;
create table t1 (a decimal(29,0) not null, primary key(a));
-- @bvt:issue#3364
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFE), (18446744073709551613.0000000), (18446744073709551612.0000000001);
select * from t1 order by 1 asc;
select * from t1 where a=18446744073709551615 order by a desc;
delete from t1 where a=18446744073709551615.000000000;
select * from t1;
-- @bvt:issue
drop table t1;
create table t1 ( a int not null default 1, big decimal(29,11) );
insert into t1 (big) values (-1),(12.34567891234567),(92.23372036854775807);
select * from t1 order by a desc, big asc;
select min(big),max(big),max(big)-1 from t1;
select min(big),avg(big),max(big)-1 from t1 group by a order by 1+2;
-- @bvt:issue#3364
drop table t1;
create table t1 ( a int not null default 1, big decimal(20,4) primary key);
insert into t1 (big) values (0),(18446744073), (0xFFFFFE), (184467.13), (184462);
Expand All @@ -37,7 +34,6 @@ select * from t1 order by big limit 1,2;
select * from t1 order by big limit 2 offset 1;
select min(big),max(big),max(big)-1 from t1;
select min(big),count(big),max(big)-1 from t1 group by a;
-- @bvt:issue

#Test cases of query with multi tables
drop table if exists t1;
Expand Down Expand Up @@ -69,16 +65,12 @@ select * from t1;
drop table t1;
create table t1 (decimal_col decimal(29,0));
insert into t1 values (-17666000000000000000);
-- @bvt:issue#3364
select * from t1 where decimal_col=-17666000000000000000 order by 1 asc;
-- @bvt:issue
select * from t1 where decimal_col='-17666000000000000000' order by decimal_col desc;
drop table t1;

#Test cases of cast
-- @bvt:issue#4241
select cast(10000002383263201056 as decimal) mod 50 as result;
-- @bvt:issue
select cast(cast(19999999999999999999 as decimal) as unsigned);
CREATE TABLE t1 (id INT PRIMARY KEY,
a decimal(20),
Expand Down Expand Up @@ -122,7 +114,6 @@ SELECT * FROM t1 WHERE coalesce(a) BETWEEN 0 and 0.9;
SELECT * FROM t1 WHERE coalesce(a)=0.9;
SELECT * FROM t1 WHERE coalesce(a) in (0.8,0.9);
-- @bvt:issue
-- @bvt:issue#3280
SELECT * FROM t1 WHERE a BETWEEN 0 AND 0.9;
SELECT * FROM t1 WHERE a=0.9;
SELECT * FROM t1 WHERE a IN (0.8,0.9);
Expand Down Expand Up @@ -150,13 +141,11 @@ drop table if exists t11;
drop table if exists t12;
CREATE TABLE t1 (a decimal(3,2), b decimal(5,2) primary key);
INSERT INTO t1 VALUES (1.00,1.0000),(1.00,2.0000);
-- @bvt:issue#3280
update t1 set a=2.00 where a=1 limit 1;
select * from t1;
INSERT INTO t1 VALUES (1,3);
update t1 set a=2 where a=1.00;
select * from t1;
-- @bvt:issue
drop table t1;
create table t1 (
a decimal(10,5) not null,
Expand Down Expand Up @@ -211,7 +200,6 @@ i decimal(10,5) not null default 12345.67890,
j decimal(10,5) not null default 12345.67890,
primary key (a));
insert into t1 (a) values (2.1111),(4),(00006.12311),(8.41231),(24.0000);
-- @bvt:issue#3280
delete from t1 where a=2+2.0000;
select a,b from t1 order by 1;
delete from t1 where a=24.0000;
Expand All @@ -220,7 +208,6 @@ delete from t1 where 3 < 2;
select a,b from t1 order by 1;
delete from t1 where 1 < 2;
select a,b from t1 order by 1;
-- @bvt:issue
drop table t1;
create table t1 (a decimal(10,5) primary key, b char(32));
insert into t1 values (1.000000,'apple'), (2.00,'apple');
Expand Down Expand Up @@ -425,9 +412,7 @@ SELECT a + 1 FROM decimal08;
-- Abnormal:value overflow
SELECT a * 2 FROM decimal08;

-- @bvt:issue#8513
SELECT a / 3 FROM decimal08;
-- @bvt:issue
DROP TABLE decimal08;

-- default decimal,D and M is not specified, default M is 38, default D is 0
Expand Down Expand Up @@ -642,11 +627,9 @@ SELECT col3 * col2 FROM decimal18;
SELECT col2 * col4 FROM decimal18;
-- @bvt:issue

-- @bvt:issue#8513
SELECT col1 / col2 FROM decimal18;
SELECT 12345678965412365478965444565896532145 / col1 FROM decimal18;
SELECT col2/522222222225456987.23212654569987523654 FROM decimal18;
-- @bvt:issue

DROP TABLE IF EXISTS decimal19;
CREATE TABLE decimal19 (col1 decimal(38,0),col2 decimal(19,0));
Expand Down
4 changes: 0 additions & 4 deletions test/distributed/cases/dtype/int.test
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ drop table t1;
create table t1 (int_col int unsigned);
insert into t1 values (4294960000);
select * from t1 where int_col=4294960000;
-- @bvt:issue#3276
select * from t1 where int_col='4294960000';
-- @bvt:issue
drop table t1;
select cast(4294960000 as unsigned) mod 50 as result;
select cast(2147399999 as signed);
Expand All @@ -71,9 +69,7 @@ INSERT INTO t1 (id,a) VALUES
(3,CAST(0x80000000 AS UNSIGNED)),
(4,CAST(0xFFFFFFFF AS UNSIGNED));
UPDATE t1 SET b = a;
-- @bvt:issue#3276
select * from t1 where ((a = 4294967295) and (b = '4294967295')) order by 1 desc, 2 asc;
-- @bvt:issue
CREATE TABLE t_int(id INT);
INSERT INTO t_int VALUES (1), (2);
SELECT id, id >= 1.1 FROM t_int;
Expand Down
18 changes: 0 additions & 18 deletions test/distributed/cases/dtype/numeric.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ select floor(cast(2231231.501231 as numeric));
#Test cases of query with single table
drop table if exists t1;
create table t1 (a numeric(29,0) not null, primary key(a));
-- @bvt:issue#3364
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFE), (18446744073709551613.0000000), (18446744073709551612.0000000001);
select * from t1 order by 1 asc;
select * from t1 where a=18446744073709551615 order by a desc;
delete from t1 where a=18446744073709551615.000000000;
select * from t1;
-- @bvt:issue
drop table t1;
create table t1 ( a int not null default 1, big numeric(29,11) );
insert into t1 (big) values (-1),(12.34567891234567),(92.23372036854775807);
select * from t1 order by a desc, big asc;
select min(big),max(big),max(big)-1 from t1;
select min(big),avg(big),max(big)-1 from t1 group by a order by 1+2;
-- @bvt:issue#3364
drop table t1;
create table t1 ( a int not null default 1, big numeric(20,4) primary key);
insert into t1 (big) values (0),(18446744073), (0xFFFFFE), (184467.13), (184462);
Expand All @@ -37,7 +34,6 @@ select * from t1 order by big limit 1,2;
select * from t1 order by big limit 2 offset 1;
select min(big),max(big),max(big)-1 from t1;
select min(big),count(big),max(big)-1 from t1 group by a;
-- @bvt:issue

#Test cases of query with multi tables
drop table if exists t1;
Expand Down Expand Up @@ -69,16 +65,12 @@ select * from t1;
drop table t1;
create table t1 (numeric_col numeric(29,0));
insert into t1 values (-17666000000000000000);
-- @bvt:issue#3364
select * from t1 where numeric_col=-17666000000000000000 order by 1 asc;
-- @bvt:issue
select * from t1 where numeric_col='-17666000000000000000' order by numeric_col desc;
drop table t1;

#Test cases of cast
-- @bvt:issue#4241
select cast(10000002383263201056 as numeric) mod 50 as result;
-- @bvt:issue
select cast(cast(19999999999999999999 as numeric) as unsigned);
CREATE TABLE t1 (id INT PRIMARY KEY,
a numeric(20),
Expand Down Expand Up @@ -122,7 +114,6 @@ SELECT * FROM t1 WHERE coalesce(a) BETWEEN 0 and 0.9;
SELECT * FROM t1 WHERE coalesce(a)=0.9;
SELECT * FROM t1 WHERE coalesce(a) in (0.8,0.9);
-- @bvt:issue
-- @bvt:issue#3280
SELECT * FROM t1 WHERE a BETWEEN 0 AND 0.9;
SELECT * FROM t1 WHERE a=0.9;
SELECT * FROM t1 WHERE a IN (0.8,0.9);
Expand All @@ -136,7 +127,6 @@ where id>=88947549497796.3574 and id <=889475494977969.358;
select count(*) from t
where id between 88947549497796.3574 and 889475494977969.358;
drop table t;
-- @bvt:issue
SELECT CAST(1.00 AS numeric) BETWEEN 1 AND -1;
SELECT CAST(1.00 AS numeric) NOT BETWEEN 1 AND -1;
SELECT CAST(-0 AS numeric) BETWEEN 0 AND -1;
Expand All @@ -150,13 +140,11 @@ drop table if exists t11;
drop table if exists t12;
CREATE TABLE t1 (a numeric(3,2), b numeric(5,2) primary key);
INSERT INTO t1 VALUES (1.00,1.0000),(1.00,2.0000);
-- @bvt:issue#3280
update t1 set a=2.00 where a=1 limit 1;
select * from t1;
INSERT INTO t1 VALUES (1,3);
update t1 set a=2 where a=1.00;
select * from t1;
-- @bvt:issue
drop table t1;
create table t1 (
a numeric(10,5) not null,
Expand Down Expand Up @@ -211,7 +199,6 @@ i numeric(10,5) not null default 12345.67890,
j numeric(10,5) not null default 12345.67890,
primary key (a));
insert into t1 (a) values (2.1111),(4),(00006.12311),(8.41231),(24.0000);
-- @bvt:issue#3280
delete from t1 where a=2+2.0000;
select a,b from t1 order by 1;
delete from t1 where a=24.0000;
Expand All @@ -220,7 +207,6 @@ delete from t1 where 3 < 2;
select a,b from t1 order by 1;
delete from t1 where 1 < 2;
select a,b from t1 order by 1;
-- @bvt:issue
drop table t1;
create table t1 (a numeric(10,5) primary key, b char(32));
insert into t1 values (1.000000,'apple'), (2.00,'apple');
Expand Down Expand Up @@ -425,9 +411,7 @@ SELECT a + 1 FROM numeric08;
-- Abnormal:value overflow
SELECT a * 2 FROM numeric08;

-- @bvt:issue#8513
SELECT a / 3 FROM numeric08;
-- @bvt:issue
DROP TABLE numeric08;

-- default numeric,D and M is not specified, default M is 38, default D is 0
Expand Down Expand Up @@ -642,11 +626,9 @@ SELECT col3 * col2 FROM numeric18;
SELECT col2 * col4 FROM numeric18;
-- @bvt:issue

-- @bvt:issue#8513
SELECT col1 / col2 FROM numeric18;
SELECT 12345678965412365478965444565896532145 / col1 FROM numeric18;
SELECT col2/522222222225456987.23212654569987523654 FROM numeric18;
-- @bvt:issue

DROP TABLE IF EXISTS numeric19;
CREATE TABLE numeric19 (col1 numeric(38,0),col2 numeric(19,0));
Expand Down
2 changes: 0 additions & 2 deletions test/distributed/cases/dtype/text_blob.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ select t1,t2 from text_01 minus select t1,t2 from text_05;
-- subquery
select * from (select * from text_01 where t1 like '%123%');
select * from text_01 where t1 in (select t1 from text_05);
-- @bvt:issue#7589
select * from text_01 where t2 > (select t2 from text_05 where t1='789');
-- @bvt:issue
select t1,t2,t3 from text_01 where t1 < any(select t2 from text_05);
select t1,t2,t3 from text_01 where t1 >= all(select t2 from text_05);
select t1,t2,t3 from text_01 where t1 >= some(select t2 from text_05);
Expand Down
3 changes: 1 addition & 2 deletions test/distributed/cases/dtype/year.result
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ drop table if exists t_year_uniq;
create table t_year_uniq (y year unique, name varchar(20));
insert into t_year_uniq values (2020, 'first');
insert into t_year_uniq values (2021, 'second');
insert into t_year_uniq values (2020, 'duplicate');
Duplicate entry '2020' for key 'y'
insert ignore into t_year_uniq values (2020, 'duplicate');
select * from t_year_uniq order by y;
➤ y[91,2147483647,0] ¦ name[12,-1,0] 𝄀
2020-01-01 ¦ first 𝄀
Expand Down
7 changes: 2 additions & 5 deletions test/distributed/cases/dtype/year.sql
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,8 @@ create table t_year_uniq (y year unique, name varchar(20));
insert into t_year_uniq values (2020, 'first');
insert into t_year_uniq values (2021, 'second');

-- This should fail due to unique constraint
-- @bvt:issue#23408
insert into t_year_uniq values (2020, 'duplicate');
-- @bvt:issue#23408

-- Test unique constraint with INSERT IGNORE (duplicate should be ignored)
insert ignore into t_year_uniq values (2020, 'duplicate');
select * from t_year_uniq order by y;
drop table t_year_uniq;

Expand Down
2 changes: 0 additions & 2 deletions test/distributed/cases/function/func_anyvalue.test
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ drop table t1;
#drop table t1;

#EXTREME VALUE
--- @bvt:issue#3579
select any_value(9999999999999999999999999999.9999999999);
--- @bvt:issue
select any_value("0000-00-00 00:00:00");
select any_value("你好");

Expand Down
Loading