Skip to content

Query Tool execute options silently revert to the preference values when the transaction is re-created #10598

Closed

Description

@dpage

When the Query Tool rebuilds its server-side transaction, the auto commit, auto rollback and server cursor options go back to the preference values, but the toolbar checkboxes keep showing what the user chose. For example, auto commit can be shown as off whilst every statement is actually committed.

This happens in two places:

  • Re-initialisation: after a query hits a password prompt (HTTP 428) or a missing master-password key (REINIT_QT_CONNECTION in ResultSet.jsx), and on the connect-with-password and Kerberos retry paths in initializeQueryTool. The initialise request sends no execute options, so _init_sqleditor falls back to the preferences for all three.
  • Changing connection with the connection selector: update_sqleditor_connection carries auto_commit and auto_rollback over from the old transaction, but not server_cursor, so the client's server cursor state then disagrees with the server's, which affects result paging and the commit/rollback prompts.

The fix is to send the current toolbar values in the initialise request (falling back to the preferences when they're absent), and to carry server_cursor over on a connection change.

Found whilst working on #9603 (#10593).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions