View a markdown version of this page

SHOW CREATE SCALEOUT ROUTING FUNCTION - Amazon Aurora

SHOW CREATE SCALEOUT ROUTING FUNCTION

Use SHOW CREATE SCALEOUT ROUTING FUNCTION to read back the definition of a routing function in a database cluster group for Aurora.

Description and syntax

Returns the definition of one routing function. On Aurora MySQL, the result has the columns Scaleout Routing Function and Create Scaleout Routing Function. The routing layer has no system table that lists routing functions, so this statement is the way to read a definition back.

SHOW CREATE SCALEOUT ROUTING FUNCTION function_name;

Parameters and options

The statement takes the following parameter.

function_name

The routing function to show.

Where it runs and required privileges

Run the statement at the routing endpoint, in a session that isn't pinned. A pinned session passes the statement through to the member cluster unchanged. For the details, see Where these statements run.

The statement needs no privilege for database cluster groups for Aurora. For the full list of these privileges, see Privileges.

Usage notes

Read each definition back by name, and keep a copy with your export of the data mappings. To find the names, run SHOW SCALEOUT ROUTING FUNCTIONS.

Examples

The following example shows the definition of tenant_rf.

SHOW CREATE SCALEOUT ROUTING FUNCTION tenant_rf;

Errors

The statement can return the following errors. For all errors from the routing layer, see Error codes for database cluster groups for Aurora.

Aurora MySQL Meaning
1064 Syntax error: a form outside the grammar.
1305 FUNCTION <name> does not exist (42000) No routing function has that name.

For more information, see the following: