2019-03-14 15:00:42 +00:00
|
|
|
DROP TABLE IF EXISTS t_local;
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE IF EXISTS t1_00850;
|
|
|
|
DROP TABLE IF EXISTS t2_00850;
|
2019-03-14 15:00:42 +00:00
|
|
|
|
|
|
|
CREATE TABLE t_local (dummy UInt8) ENGINE = Memory;
|
2019-06-03 17:36:27 +00:00
|
|
|
CREATE TABLE t1_00850 (dummy UInt8) ENGINE = Distributed(test_shard_localhost, currentDatabase(), 't_local');
|
|
|
|
CREATE TABLE t2_00850 (dummy UInt8) ENGINE = Distributed(test_shard_localhost, currentDatabase(), 't_local');
|
2019-03-14 15:00:42 +00:00
|
|
|
|
|
|
|
INSERT INTO t_local VALUES (1);
|
|
|
|
|
2019-09-02 12:53:31 +00:00
|
|
|
SET joined_subquery_requires_alias = 0;
|
2019-03-14 15:00:42 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
SELECT * FROM t1_00850
|
2019-03-14 15:00:42 +00:00
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT *
|
2019-06-03 17:36:27 +00:00
|
|
|
FROM ( SELECT * FROM t2_00850 )
|
|
|
|
INNER JOIN ( SELECT * FROM t1_00850 )
|
2019-03-14 15:00:42 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|
|
|
|
|
2021-01-22 10:06:59 +00:00
|
|
|
-- query from fuzzer
|
|
|
|
SELECT toDateTime64(toString(toString('0000-00-00 00:00:000000-00-00 00:00:00', toDateTime64(toDateTime64('655.36', -2, NULL)))), NULL) FROM t1_00850 GLOBAL INNER JOIN (SELECT toDateTime64(toDateTime64('6553.6', '', NULL), NULL), * FROM (SELECT * FROM t2_00850) INNER JOIN (SELECT toDateTime64('6553.7', 1024, NULL), * FROM t1_00850) USING (dummy)) USING (dummy);
|
|
|
|
|
2021-07-12 13:04:59 +00:00
|
|
|
SELECT toString('0000-00-00 00:00:000000-00-00 00:00:00', toDateTime64(toDateTime64('655.36', -2, NULL)));
|
|
|
|
|
2019-03-14 15:00:42 +00:00
|
|
|
DROP TABLE t_local;
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE t1_00850;
|
|
|
|
DROP TABLE t2_00850;
|
2019-03-14 15:00:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
SELECT * FROM remote('127.0.0.2', system.one)
|
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT *
|
2019-06-03 17:36:27 +00:00
|
|
|
FROM ( SELECT dummy FROM remote('127.0.0.2', system.one) ) t1_00850
|
|
|
|
GLOBAL INNER JOIN ( SELECT dummy FROM remote('127.0.0.3', system.one) ) t2_00850
|
2019-03-14 15:00:42 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|
|
|
|
|
2019-03-18 14:56:33 +00:00
|
|
|
SELECT * FROM remote('127.0.0.2', system.one)
|
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT *, dummy
|
2019-06-03 17:36:27 +00:00
|
|
|
FROM ( SELECT dummy FROM remote('127.0.0.2', system.one) ) t1_00850
|
|
|
|
GLOBAL INNER JOIN ( SELECT dummy FROM remote('127.0.0.3', system.one) ) t2_00850
|
2019-03-18 14:56:33 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|
|
|
|
|
|
|
|
SELECT * FROM remote('127.0.0.2', system.one)
|
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
2019-06-03 17:36:27 +00:00
|
|
|
SELECT *, t1_00850.*, t2_00850.*
|
|
|
|
FROM ( SELECT toUInt8(0) AS dummy ) t1_00850
|
|
|
|
INNER JOIN ( SELECT toUInt8(0) AS dummy ) t2_00850
|
2019-03-18 14:56:33 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|
|
|
|
|
|
|
|
SELECT * FROM remote('127.0.0.2', system.one)
|
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT *, dummy
|
2019-06-03 17:36:27 +00:00
|
|
|
FROM ( SELECT toUInt8(0) AS dummy ) t1_00850
|
|
|
|
INNER JOIN ( SELECT toUInt8(0) AS dummy ) t2_00850
|
2019-03-18 14:56:33 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|
|
|
|
|
|
|
|
SELECT * FROM remote('127.0.0.2', system.one)
|
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT *, dummy as other
|
2019-06-03 17:36:27 +00:00
|
|
|
FROM ( SELECT dummy FROM remote('127.0.0.3', system.one) ) t1_00850
|
|
|
|
GLOBAL INNER JOIN ( SELECT toUInt8(0) AS dummy ) t2_00850
|
2019-03-18 14:56:33 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|
|
|
|
|
|
|
|
SELECT * FROM remote('127.0.0.2', system.one)
|
|
|
|
GLOBAL INNER JOIN
|
|
|
|
(
|
|
|
|
SELECT *, dummy, dummy as other
|
2019-06-03 17:36:27 +00:00
|
|
|
FROM ( SELECT toUInt8(0) AS dummy ) t1_00850
|
|
|
|
GLOBAL INNER JOIN ( SELECT dummy FROM remote('127.0.0.3', system.one) ) t2_00850
|
2019-03-18 14:56:33 +00:00
|
|
|
USING dummy
|
|
|
|
) USING dummy;
|