Skip to content

Commit

Permalink
Add stateless test
Browse files Browse the repository at this point in the history
  • Loading branch information
ygf11 committed Nov 15, 2021
1 parent cde775f commit ade6f26
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/suites/0_stateless/12_0000_insert_into_select.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 2 3 4 2021-08-15 2021-09-15 2021-08-15 10:00:00 string1234
5 6 7 8 2021-10-15 2021-11-15 2021-11-15 10:00:00 string5678
21 changes: 21 additions & 0 deletions tests/suites/0_stateless/12_0000_insert_into_select.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;

CREATE TABLE IF NOT EXISTS t1(a UInt8, b UInt64, c Int8, d Int64, e Date16, f Date32, g DateTime32, h String) Engine = Memory;
CREATE TABLE IF NOT EXISTS t2(a String, b String, c String, d String, e String, f String, g String, h String) Engine = Memory;
CREATE TABLE IF NOT EXISTS t3(a String, b String, c String, d String) Engine = Memory;


INSERT INTO t1 (a,b,c,d,e) select * from t3; -- {ErrorCode 6}
INSERT INTO t1 (a,b,c,d,e) select a,b,c from t3; -- {ErrorCode 6}

INSERT INTO t2 (a,b,c,d,e,f,g,h) VALUES('1','2','3','4','2021-08-15', '2021-09-15', '2021-08-15 10:00:00', 'string1234'),
('5','6','7','8','2021-10-15', '2021-11-15', '2021-11-15 10:00:00', 'string5678');
INSERT INTO t1 (a,b,c,d,e,f,g,h) select * from t2;
SELECT * FROM t1;

DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP DATABASE db1;

0 comments on commit ade6f26

Please sign in to comment.