This function executes an SQL string directly on a specified remote backend server, allowing for maintenance tasks or queries that bypass local parsing.
SPIDER_DIRECT_SQL('sql', 'tmp_table_list', 'parameters')A UDF installed with the Spider Storage Engine, this function is used to execute the SQL string sql on the remote server, as defined in parameters. If any resultsets are returned, they are stored in the tmp_table_list.
The function returns 1 if the SQL executes successfully, or 0 if it fails.
This page is licensed: CC BY-SA / Gnu FDL
SELECT SPIDER_DIRECT_SQL('SELECT * FROM s', '', 'srv "node1", port "8607"');
+----------------------------------------------------------------------+
| SPIDER_DIRECT_SQL('SELECT * FROM s', '', 'srv "node1", port "8607"') |
+----------------------------------------------------------------------+
| 1 |
+----------------------------------------------------------------------+