Updated on 2024-11-06 GMT+08:00

Modifying the Multi-statement Processing Mode of a Proxy Instance

When you enable multi-statement execution for a proxy instance, you can set multi-statement processing mode to Strict, Loose, or Parse.

Constraints

  • To configure the multi-statement processing mode on the management console, contact customer service.
  • The changed multi-statement processing mode applies to your proxy instance immediately. You do not need to reboot the proxy instance. If a read/write splitting connection fails due to a multi-statement execution, changing the multi-statement processing mode will not restore the connection. You will need to reconnect the connection manually.
  • Parse-based mode description:
    If multi-statements contain the operations listed here, all subsequent requests are routed to the primary node. To restore read/write splitting, you need to disconnect the connection and then re-establish it.
    • Creating temporary tables
    • Creating stored procedures
    • Executing uncommitted transactions (for example, begin is executed but commit or rollback is not executed)
    • Executing complex or special syntax. These statements will not be parsed.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. In the navigation pane, choose Database Proxy.
  6. Click a proxy instance name to go to the Basic Information page.
  7. In the navigation pane, choose Parameter Modifications.
  8. Configure the parameter multiStatementType as required.

    Figure 1 Configuring the parameter multiStatementType

    You can set this parameter to Strict, Loose, or Parse.

  9. Click Save to save your change. In the displayed dialog box, click Yes.