提交 c5fcca01 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use >> syntax in more tests

上级 67c45002
......@@ -201,37 +201,25 @@ CREATE VIEW V AS SELECT * FROM TEST;
> ok
SELECT * FROM V;
> E
> -
> B
> rows: 1
>> B
CREATE VIEW V1 AS SELECT E + 2 AS E FROM TEST;
> ok
SELECT * FROM V1;
> E
> -
> 3
> rows: 1
>> 3
CREATE VIEW V2 AS SELECT E + E AS E FROM TEST;
> ok
SELECT * FROM V2;
> E
> -
> 2
> rows: 1
>> 2
CREATE VIEW V3 AS SELECT -E AS E FROM TEST;
> ok
SELECT * FROM V3;
> E
> --
> -1
> rows: 1
>> -1
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'E' ORDER BY TABLE_NAME;
> TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_PRECISION_RADIX NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME TYPE_NAME NULLABLE IS_COMPUTED SELECTIVITY CHECK_CONSTRAINT SEQUENCE_NAME REMARKS SOURCE_DATA_TYPE COLUMN_TYPE COLUMN_ON_UPDATE
......
......@@ -50,10 +50,7 @@ INSERT INTO TEST VALUES (TIME '08:00:00');
> update count: 1
SELECT TIME FROM TEST;
> TIME
> --------
> 08:00:00
> rows: 1
>> 08:00:00
DROP TABLE TEST;
> ok
......
......@@ -14,10 +14,7 @@ select sum(n) from (
)
select n from r
);
> SUM(N)
> ------
> 6
> rows: 1
>> 6
select sum(n) from (select 0) join (
with recursive r(n) as (
......@@ -25,10 +22,7 @@ select sum(n) from (select 0) join (
)
select n from r
) on 1=1;
> SUM(N)
> ------
> 6
> rows: 1
>> 6
select 0 from (
select 0 where 0 in (
......
......@@ -23,16 +23,10 @@ EXPLAIN PLAN FOR SELECT * FROM SYSTEM_RANGE(1, 20);
select sum(x) from system_range(2, 1000) r where
not exists(select * from system_range(2, 32) r2 where r.x>r2.x and mod(r.x, r2.x)=0);
> SUM(X)
> ------
> 76127
> rows: 1
>> 76127
SELECT COUNT(*) FROM SYSTEM_RANGE(0, 2111222333);
> COUNT(*)
> ----------
> 2111222334
> rows: 1
>> 2111222334
select * from system_range(2, 100) r where
not exists(select * from system_range(2, 11) r2 where r.x>r2.x and mod(r.x, r2.x)=0);
......@@ -136,19 +130,13 @@ SELECT COUNT(*) FROM SYSTEM_RANGE(10, 2, -2);
>> 5
SELECT * FROM SYSTEM_RANGE(1, 1);
> X
> -
> 1
> rows: 1
>> 1
SELECT COUNT(*) FROM SYSTEM_RANGE(1, 1);
>> 1
SELECT * FROM SYSTEM_RANGE(1, 1, -1);
> X
> -
> 1
> rows: 1
>> 1
SELECT COUNT(*) FROM SYSTEM_RANGE(1, 1, -1);
>> 1
......
......@@ -7173,10 +7173,7 @@ CALL NEXT VALUE FOR TEST_LONG;
> rows: 1
CALL IDENTITY();
> IDENTITY()
> -----------------
> 90123456789012345
> rows: 1
>> 90123456789012345
SELECT SEQUENCE_NAME, CURRENT_VALUE, INCREMENT FROM INFORMATION_SCHEMA.SEQUENCES;
> SEQUENCE_NAME CURRENT_VALUE INCREMENT
......@@ -7825,28 +7822,19 @@ insert into test(name) values('World');
> update count: 1
call identity();
> IDENTITY()
> ----------
> 2
> rows: 1
>> 2
insert into test(id, name) values(1234567890123456, 'World');
> update count: 1
call identity();
> IDENTITY()
> ----------------
> 1234567890123456
> rows: 1
>> 1234567890123456
insert into test(name) values('World');
> update count: 1
call identity();
> IDENTITY()
> ----------------
> 1234567890123457
> rows: 1
>> 1234567890123457
select * from test order by id;
> ID NAME
......@@ -7876,28 +7864,19 @@ insert into test(name) values('World');
> update count: 1
call identity();
> IDENTITY()
> ----------
> 2
> rows: 1
>> 2
insert into test(id, name) values(1234567890123456, 'World');
> update count: 1
call identity();
> IDENTITY()
> ----------------
> 1234567890123456
> rows: 1
>> 1234567890123456
insert into test(name) values('World');
> update count: 1
call identity();
> IDENTITY()
> ----------------
> 1234567890123457
> rows: 1
>> 1234567890123457
select * from test order by id;
> ID NAME
......@@ -7997,10 +7976,7 @@ insert into x(id) values(1);
> update count: 1
select b from x;
> B
> -
> a
> rows: 1
>> a
delete from x;
> update count: 1
......@@ -8030,10 +8006,7 @@ insert into x(id) values(1);
> update count: 1
select b from x;
> B
> ----
> null
> rows: 1
>> null
delete from x;
> update count: 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论