fix: drop table 0 rows affected (#2515)

This commit is contained in:
JeremyHi
2023-09-28 14:21:18 +08:00
committed by GitHub
parent 1f1d72bdb8
commit 52ac093110
82 changed files with 152 additions and 153 deletions

View File

@@ -166,41 +166,41 @@ limit 1;
drop table t_1;
Affected Rows: 1
Affected Rows: 0
drop table t_2;
Affected Rows: 1
Affected Rows: 0
drop table t_3;
Affected Rows: 1
Affected Rows: 0
drop table t_4;
Affected Rows: 1
Affected Rows: 0
drop table t_5;
Affected Rows: 1
Affected Rows: 0
drop table t_6;
Affected Rows: 1
Affected Rows: 0
drop table t_7;
Affected Rows: 1
Affected Rows: 0
drop table t_8;
Affected Rows: 1
Affected Rows: 0
drop table t_9;
Affected Rows: 1
Affected Rows: 0
drop table t_10;
Affected Rows: 1
Affected Rows: 0

View File

@@ -34,5 +34,5 @@ explain SELECT * FROM demo WHERE ts > cast(1000000000 as timestamp) ORDER BY hos
drop table demo;
Affected Rows: 1
Affected Rows: 0

View File

@@ -28,7 +28,7 @@ EXPLAIN SELECT DISTINCT i%2 FROM integers ORDER BY 1;
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE test (a INTEGER, b INTEGER, t TIMESTAMP TIME INDEX);
@@ -77,5 +77,5 @@ EXPLAIN SELECT DISTINCT a, b FROM test ORDER BY a, b;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -65,5 +65,5 @@ EXPLAIN SELECT * FROM single_partition ORDER BY i DESC;
drop table single_partition;
Affected Rows: 1
Affected Rows: 0

View File

@@ -123,9 +123,9 @@ EXPLAIN INSERT INTO other SELECT i, 2 FROM integers WHERE i=(SELECT MAX(i) FROM
drop table other;
Affected Rows: 1
Affected Rows: 0
drop table integers;
Affected Rows: 1
Affected Rows: 0

View File

@@ -245,5 +245,5 @@ Error: 3001(EngineExecuteQuery), Error during planning: Attempted to create Filt
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0

View File

@@ -49,7 +49,7 @@ SHOW CREATE TABLE system_metrics;
DROP TABLE system_metrics;
Affected Rows: 1
Affected Rows: 0
create table table_without_partition (
ts TIMESTAMP TIME INDEX NOT NULL DEFAULT current_timestamp()
@@ -75,7 +75,7 @@ show create table table_without_partition;
drop table table_without_partition;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE not_supported_table_options_keys (
id INT UNSIGNED,

View File

@@ -29,5 +29,5 @@ TQL ANALYZE (0, 10, '5s') test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -30,7 +30,7 @@ TQL EXPLAIN (0, 10, '5s') test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE host_load1 (
ts TIMESTAMP(3) NOT NULL,
@@ -65,5 +65,5 @@ TQL EXPLAIN host_load1{__field__="val"};
DROP TABLE host_load1;
Affected Rows: 1
Affected Rows: 0

View File

@@ -71,5 +71,5 @@ SELECT DISTINCT CASE WHEN a > 11 THEN 11 ELSE a END FROM test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -63,5 +63,5 @@ SELECT DISTINCT integers.i FROM integers ORDER BY integers.i DESC;
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0

View File

@@ -72,9 +72,9 @@ SELECT sum(n) from doubles;
DROP TABLE bigints;
Affected Rows: 1
Affected Rows: 0
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -89,5 +89,5 @@ DESC TABLE test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -34,5 +34,5 @@ SELECT * FROM test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -21,5 +21,5 @@ SELECT * FROM test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -21,5 +21,5 @@ SELECT * FROM table_should_not_break_after_incorrect_alter;
DROP TABLE table_should_not_break_after_incorrect_alter;
Affected Rows: 1
Affected Rows: 0

View File

@@ -43,5 +43,5 @@ DESC TABLE test_alt_table;
DROP TABLE test_alt_table;
Affected Rows: 1
Affected Rows: 0

View File

@@ -170,5 +170,5 @@ Error: 1001(Unsupported), SQL statement is not supported: ALTER TABLE t ADD COLU
DROP TABLE t;
Affected Rows: 1
Affected Rows: 0

View File

@@ -25,5 +25,5 @@ Error: 1004(InvalidArguments), Not allowed to remove index column j from table t
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -35,5 +35,5 @@ SELECT * FROM test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -40,5 +40,5 @@ SELECT * FROM test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -71,9 +71,9 @@ Error: 4000(TableAlreadyExists), Table already exists, table: greptime.public.t
DROP TABLE t;
Affected Rows: 1
Affected Rows: 0
DROP TABLE new_table;
Affected Rows: 1
Affected Rows: 0

View File

@@ -56,7 +56,7 @@ SELECT idc, avg(memory_util) FROM system_metrics GROUP BY idc ORDER BY idc;
DROP TABLE system_metrics;
Affected Rows: 1
Affected Rows: 0
create table foo (
host string,
@@ -92,5 +92,5 @@ select * from foo;
DROP TABLE foo;
Affected Rows: 1
Affected Rows: 0

View File

@@ -37,7 +37,7 @@ Affected Rows: 0
DROP TABLE hello;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE hello(i TIMESTAMP TIME INDEX);
@@ -83,7 +83,7 @@ SHOW TABLES;
DROP TABLE hello;
Affected Rows: 1
Affected Rows: 0
DROP TABLE hello;

View File

@@ -63,17 +63,17 @@ select * from with_pattern order by ts;
drop table demo;
Affected Rows: 1
Affected Rows: 0
drop table with_filename;
Affected Rows: 1
Affected Rows: 0
drop table with_path;
Affected Rows: 1
Affected Rows: 0
drop table with_pattern;
Affected Rows: 1
Affected Rows: 0

View File

@@ -63,17 +63,17 @@ select * from with_pattern order by ts;
drop table demo;
Affected Rows: 1
Affected Rows: 0
drop table with_filename;
Affected Rows: 1
Affected Rows: 0
drop table with_path;
Affected Rows: 1
Affected Rows: 0
drop table with_pattern;
Affected Rows: 1
Affected Rows: 0

View File

@@ -63,17 +63,17 @@ select * from with_pattern order by ts;
drop table demo;
Affected Rows: 1
Affected Rows: 0
drop table with_filename;
Affected Rows: 1
Affected Rows: 0
drop table with_path;
Affected Rows: 1
Affected Rows: 0
drop table with_pattern;
Affected Rows: 1
Affected Rows: 0

View File

@@ -20,5 +20,5 @@ Affected Rows: 2
drop table demo;
Affected Rows: 1
Affected Rows: 0

View File

@@ -74,19 +74,19 @@ DESC TABLE test2;
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0
DROP TABLE times;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test1;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test2;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE test_pk ("timestamp" TIMESTAMP TIME INDEX, host STRING PRIMARY KEY, "value" DOUBLE);
@@ -104,7 +104,7 @@ DESC TABLE test_pk;
DROP TABLE test_pk;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE test_multiple_pk_definitions ("timestamp" TIMESTAMP TIME INDEX, host STRING PRIMARY KEY, "value" DOUBLE, PRIMARY KEY(host));

View File

@@ -76,5 +76,5 @@ DESC TABLE data_types;
DROP TABLE data_types;
Affected Rows: 1
Affected Rows: 0

View File

@@ -29,7 +29,7 @@ select * from "system_Metric";
drop table system_Metric;
Affected Rows: 1
Affected Rows: 0
use public;

View File

@@ -125,5 +125,5 @@ Error: 3000(PlanQuery), No field named alias2. Valid fields are a.
drop table a;
Affected Rows: 1
Affected Rows: 0

View File

@@ -73,5 +73,5 @@ Error: 3000(PlanQuery), Error during planning: Table not found: greptime.public.
drop table a;
Affected Rows: 1
Affected Rows: 0

View File

@@ -58,5 +58,5 @@ SELECT ts, host, cpu, memory FROM monitor ORDER BY ts;
DROP TABLE monitor;
Affected Rows: 1
Affected Rows: 0

View File

@@ -54,5 +54,5 @@ desc host_load1;
drop table host_load1;
Affected Rows: 1
Affected Rows: 0

View File

@@ -16,7 +16,7 @@ SELECT COUNT(*) FROM integers;
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE integers(i BIGINT, j INTEGER, ts TIMESTAMP TIME INDEX);
@@ -37,5 +37,5 @@ SELECT * FROM integers;
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0

View File

@@ -40,9 +40,9 @@ Affected Rows: 1
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0
DROP TABLE presentations;
Affected Rows: 1
Affected Rows: 0

View File

@@ -58,9 +58,9 @@ SELECT * FROM test2;
DROP TABLE test1;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test2;
Affected Rows: 1
Affected Rows: 0

View File

@@ -44,9 +44,9 @@ Error: 1004(InvalidArguments), Invalid SQL, error: column count mismatch, column
DROP TABLE strings;
Affected Rows: 1
Affected Rows: 0
DROP TABLE a;
Affected Rows: 1
Affected Rows: 0

View File

@@ -37,9 +37,9 @@ select * from demo2 order by ts;
drop table demo1;
Affected Rows: 1
Affected Rows: 0
drop table demo2;
Affected Rows: 1
Affected Rows: 0

View File

@@ -27,5 +27,5 @@ Error: 3001(EngineExecuteQuery), Cast error: Cannot cast string 'infinityyyy' to
drop table data;
Affected Rows: 1
Affected Rows: 0

View File

@@ -121,13 +121,13 @@ Error: 3000(PlanQuery), Error during planning: LIMIT must not be negative
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test2;
Affected Rows: 1
Affected Rows: 0

View File

@@ -30,5 +30,5 @@ SELECT COUNT(*) FROM (SELECT * FROM integers UNION ALL SELECT * FROM integers LI
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0

View File

@@ -106,5 +106,5 @@ SELECT * FROM test ORDER BY i NULLS LAST;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -227,5 +227,5 @@ Error: 3000(PlanQuery), Error during planning: For SELECT DISTINCT, ORDER BY exp
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -62,5 +62,5 @@ Error: 3000(PlanQuery), Error during planning: Union queries must have the same
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -392,41 +392,41 @@ ORDER BY "Sort", "EmployeeID";
DROP TABLE t0;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test0;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test1;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test4;
Affected Rows: 1
Affected Rows: 0
DROP TABLE tpch_q1_agg;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test5;
Affected Rows: 1
Affected Rows: 0
DROP TABLE test6;
Affected Rows: 1
Affected Rows: 0
DROP table test7;
Affected Rows: 1
Affected Rows: 0
DROP table test8;
Affected Rows: 1
Affected Rows: 0
DROP TABLE DirectReports;
Affected Rows: 1
Affected Rows: 0

View File

@@ -109,5 +109,5 @@ select TO_UNIXTIME(b) from test_unixtime;
DROP TABLE test_unixtime;
Affected Rows: 1
Affected Rows: 0

View File

@@ -26,5 +26,5 @@ SELECT * FROM host WHERE host LIKE '%+%';
DROP TABLE host;
Affected Rows: 1
Affected Rows: 0

View File

@@ -284,7 +284,7 @@ Error: 1003(Internal), Error during planning: Illegal argument in range select q
DROP TABLE host;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE host_sec (
ts timestamp(0) time index,
@@ -320,5 +320,5 @@ Affected Rows: 18
-- SELECT ts, host, min(val) RANGE '10s', max(val) RANGE '10s' FROM host_sec ALIGN '5s' ORDER BY host, ts;
DROP TABLE host_sec;
Affected Rows: 1
Affected Rows: 0

View File

@@ -80,5 +80,5 @@ SELECT * FROM timestamp_with_precision ORDER BY ts ASC;
DROP TABLE timestamp_with_precision;
Affected Rows: 1
Affected Rows: 0

View File

@@ -59,7 +59,7 @@ tql eval (60, 60, '1s') stddev_over_time((metric[1m]));
drop table metric;
Affected Rows: 1
Affected Rows: 0
-- load 10s
-- metric 1.5990505637277868 1.5990505637277868 1.5990505637277868
@@ -97,7 +97,7 @@ tql eval (60, 60, '1s') stddev_over_time(metric[1m]);
drop table metric;
Affected Rows: 1
Affected Rows: 0
-- Port from functions.test L632 - L680, commit 001ee2620e094970e5657ce39275b2fccdbd1359
-- Include quantile over time
@@ -163,7 +163,7 @@ Affected Rows: 8
-- tql eval (60, 60, '1s') (quantile_over_time(2, (data[1m])));
drop table data;
Affected Rows: 1
Affected Rows: 0
-- Port from functions.test L773 - L802, commit 001ee2620e094970e5657ce39275b2fccdbd1359
-- Include max/min/last over time
@@ -219,5 +219,5 @@ Affected Rows: 15
-- tql eval (60, 60, '1s') last_over_time(data[1m]);
drop table data;
Affected Rows: 1
Affected Rows: 0

View File

@@ -32,5 +32,5 @@ TQL EVAL (0, 10, '5s') test{k="a"};
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -35,7 +35,7 @@ tql eval (0, 30, '10s'), data + (1 > bool 2);
drop table data;
Affected Rows: 1
Affected Rows: 0
-- Binary operator on table with multiple field columns
create table data (ts timestamp time index, val1 double, val2 double, val3 double);
@@ -84,5 +84,5 @@ tql eval (0, 30, '10s'), data{__field__="val1", __field__="val2"} + data{__field
drop table data;
Affected Rows: 1
Affected Rows: 0

View File

@@ -94,9 +94,9 @@ tql eval(0, 10, '5s') sum(completion / 1000) + sum(completion / 1000);
drop table completion;
Affected Rows: 1
Affected Rows: 0
drop table prompt;
Affected Rows: 1
Affected Rows: 0

View File

@@ -68,13 +68,13 @@ tql eval (300, 300, '1s') 10 atan2 NaN;
drop table trigx;
Affected Rows: 1
Affected Rows: 0
drop table trigy;
Affected Rows: 1
Affected Rows: 0
drop table trignan;
Affected Rows: 1
Affected Rows: 0

View File

@@ -72,5 +72,5 @@ SELECT ts, host, cpu, memory FROM monitor ORDER BY ts;
DROP TABLE monitor;
Affected Rows: 1
Affected Rows: 0

View File

@@ -130,9 +130,9 @@ SELECT '\x7F'::BYTEA;
drop table blobs;
Affected Rows: 1
Affected Rows: 0
drop table blob_empty;
Affected Rows: 1
Affected Rows: 0

View File

@@ -211,7 +211,7 @@ SELECT f FROM floats WHERE f<='-inf'::FLOAT ORDER BY f;
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- DOUBLE type
-- inf as a constant
@@ -425,5 +425,5 @@ SELECT d FROM doubles WHERE d<='-inf'::DOUBLE ORDER BY d;
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -155,7 +155,7 @@ SELECT f FROM floats WHERE f<='nan'::FLOAT;
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- DOUBLE type
-- nan as a constant
@@ -312,5 +312,5 @@ SELECT d FROM doubles WHERE d<='nan'::DOUBLE;
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -44,7 +44,7 @@ SELECT SUM(f) FROM floats;
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- double
CREATE TABLE doubles(f DOUBLE, i INT, ts TIMESTAMP TIME INDEX);
@@ -91,7 +91,7 @@ SELECT SUM(f) FROM doubles;
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0
-- float double
CREATE TABLE floats_doubles (f FLOAT, d DOUBLE, ts TIMESTAMP TIME INDEX);
@@ -133,5 +133,5 @@ SELECT SUM(d) FROM floats_doubles WHERE d > 0;
DROP TABLE floats_doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -42,7 +42,7 @@ SELECT MIN(f), MAX(f) FROM floats;
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- double --
SELECT SUM('inf'::DOUBLE), SUM('-inf'::DOUBLE), SUM('nan'::DOUBLE);
@@ -87,5 +87,5 @@ SELECT MIN(f), MAX(f) FROM doubles;
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -31,7 +31,7 @@ Error: 3000(PlanQuery), Schema contains qualified field name floats.f and unqual
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- DOUBLE type
CREATE TABLE doubles(d DOUBLE, ts TIMESTAMP TIME INDEX);
@@ -64,5 +64,5 @@ Error: 3000(PlanQuery), Schema contains qualified field name doubles.d and unqua
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -96,7 +96,7 @@ SELECT COUNT(*) FROM floats WHERE f < 0;
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- DOUBLE type
-- storing nan in a table
@@ -195,5 +195,5 @@ SELECT COUNT(*) FROM doubles WHERE d < 0;
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -62,7 +62,7 @@ SELECT i, f, SUM(i) OVER (ORDER BY i, f) FROM floats ORDER BY i, f;
DROP TABLE floats;
Affected Rows: 1
Affected Rows: 0
-- grouping by inf and nan
CREATE TABLE doubles(f DOUBLE, i INT, ts TIMESTAMP TIME INDEX);
@@ -127,5 +127,5 @@ SELECT i, f, SUM(i) OVER (ORDER BY i, f) FROM doubles ORDER BY i, f;
DROP TABLE doubles;
Affected Rows: 1
Affected Rows: 0

View File

@@ -265,5 +265,5 @@ Error: 3000(PlanQuery), Error during planning: The function Avg does not support
DROP TABLE intervals;
Affected Rows: 1
Affected Rows: 0

View File

@@ -34,5 +34,5 @@ SELECT LENGTH(a) FROM test ORDER BY 1;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -224,9 +224,9 @@ SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0
DROP TABLE bigtable;
Affected Rows: 1
Affected Rows: 0

View File

@@ -64,5 +64,5 @@ SELECT length(s) FROM emojis ORDER BY id;
DROP TABLE emojis;
Affected Rows: 1
Affected Rows: 0

View File

@@ -60,5 +60,5 @@ Error: 2000(InvalidSyntax), Failed to parse value: Failed to parse 1900-1-1 00-0
DROP TABLE timestamp;
Affected Rows: 1
Affected Rows: 0

View File

@@ -173,5 +173,5 @@ Error: 3001(EngineExecuteQuery), Parser error: Error parsing timestamp from '100
DROP TABLE timestamp;
Affected Rows: 1
Affected Rows: 0

View File

@@ -24,9 +24,9 @@ select count(*) from timestamp2 inner join timestamp1 on (timestamp1.i = timesta
DROP TABLE timestamp1;
Affected Rows: 1
Affected Rows: 0
DROP TABLE timestamp2;
Affected Rows: 1
Affected Rows: 0

View File

@@ -85,5 +85,5 @@ SELECT TIMESTAMP '2020-01-01 01:23:45.12345678'::TIMESTAMP(9);
DROP TABLE ts_precision;
Affected Rows: 1
Affected Rows: 0

View File

@@ -372,9 +372,9 @@ select '2008-01-01 00:00:11'::TIMESTAMP_NS = '2008-01-01 00:00:11'::TIMESTAMP_S;
DROP TABLE timestamp;
Affected Rows: 1
Affected Rows: 0
DROP TABLE timestamp_two;
Affected Rows: 1
Affected Rows: 0

View File

@@ -8,11 +8,11 @@ Affected Rows: 0
drop table t1;
Affected Rows: 1
Affected Rows: 0
drop table t2;
Affected Rows: 1
Affected Rows: 0
-- SQLNESS ARG restart=true
show tables;
@@ -37,5 +37,5 @@ desc table t3;
drop table t3;
Affected Rows: 1
Affected Rows: 0

View File

@@ -196,5 +196,5 @@ Error: 3001(EngineExecuteQuery), Error during planning: Attempted to create Filt
DROP TABLE integers;
Affected Rows: 1
Affected Rows: 0

View File

@@ -40,7 +40,7 @@ SHOW CREATE TABLE system_metrics;
DROP TABLE system_metrics;
Affected Rows: 1
Affected Rows: 0
CREATE TABLE not_supported_table_options_keys (
id INT UNSIGNED,

View File

@@ -29,5 +29,5 @@ TQL ANALYZE (0, 10, '5s') test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0

View File

@@ -30,5 +30,5 @@ TQL EXPLAIN (0, 10, '5s') test;
DROP TABLE test;
Affected Rows: 1
Affected Rows: 0