Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1307

Connection.setReadOnly(true) still allows DML statements to execute

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • JDBC compatibility
    • None

    Description

      Connection conn = ...;
      conn.setReadOnly(true);
      conn.createStatement().execute("INSERT INTO foo VALUES ('bar')");

      Result: INSERT is executed
      Expected: SQLException is thrown, no INSERT is executed

      This bug plus CONJ-1306 mean that it's not possible to establish connections where the client is unable to execute DML statements. This is okay if the user can be limited to e.g. SELECT statements, but that's not always feasible.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            chris@christopherschultz.net Christopher Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.