Documentation Home
MySQL Shell 9.5
Download this Manual
PDF (US Ltr) - 2.5Mb
PDF (A4) - 2.5Mb


MySQL Shell 9.5  / Extending MySQL Shell  /  Custom SQL Handler

11.4 Custom SQL Handler

Theshell global object is extended withregister_Sql_Handler, a function which enables you to register a custom SQL handler. This handler can execute pre-processing steps for the given SQL statements and extend the supported SQL statements with non-standard SQL.

The SQL handler detects SQL statements executed in one of the following ways:

  • Using the\sql command

  • SQL mode.

  • TherunSQL function in session objects.

  • Using the--execute/-e command line option.

  • Using the--file/-f command line option.