facebook/presto — pull request #1967 by FanTn (2014-11-14 02:02:21+00:00)
Title: Support MySQL sub-table

Need to depend on sub-table info.
The create table sql is :
CREATE TABLE table_route (
id int(11) NOT NULL AUTO_INCREMENT,
catalogname varchar(50) DEFAULT NULL,
schemaname varchar(50) DEFAULT NULL,
tablename varchar(50) DEFAULT NULL,
basecatalog varchar(50) DEFAULT NULL,
baseschema varchar(50) DEFAULT NULL,
basetable varchar(50) DEFAULT NULL,
host varchar(100) DEFAULT NULL,
remotelyaccessible varchar(5) DEFAULT NULL,
connectionurl varchar(100) DEFAULT NULL,
PRIMARY KEY (id)
)

e.g.
INSERT INTO table_route VALUES (1,'','employees','dept_emp','presto','employees','dept_emp','slave1:8190','N','jdbc:mysql://slave1:3306/');

Add some session properties in the BaseJdbcConfig.
In the mysql connection properties follow like this:
connector.name=mysql
connection-url=jdbc:mysql://192.168.178.37:3306
connection-user=root
connection-password=root
jdbc-reload-subtable-interval=5m
jdbc-sub-table-connection-db=presto
jdbc-sub-table-connection-table=table_route
jdbc-sub-table-allocator-enable=true
jdbc-sub-table-enable=true

The jdbc-sub-table-allocator-enable property set to false in workers