|
CREATE DATABASE transportation;
|
CREATE TABLE transportation.bus_routes (origin varchar(50), dst varchar(50)) engine=columnstore;
|
INSERT INTO transportation.bus_routes VALUES
|
('New York', 'Boston'),
|
('Boston', 'New York'),
|
('New York', 'Washington'),
|
('Washington', 'Boston'),
|
('Washington', 'Raleigh');
|
WITH RECURSIVE bus_dst as (
|
SELECT origin as dst FROM transportation.bus_routes WHERE origin='New York'
|
UNION
|
SELECT bus_routes.dst FROM transportation.bus_routes JOIN bus_dst ON bus_dst.dst= bus_routes.origin
|
)
|
SELECT * FROM bus_dst;
|
ERROR 2006 (HY000): MySQL server has gone away
|