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

open statement when the connection is closed

    XMLWordPrintable

Details

    Description

      The Connection.createStatement() return a statement even if the connection is closed.
      It should give an error when try to get a statement on close connection.

      Below sample code:

      Properties props = new Properties();
      props.put("user", "test1");
      props.put("password", "test1");
      Connection connection = java.sql.DriverManager.getConnection("jdbc:mariadb://192.168.53.30:3306/test1", props);

      Statement st1 = connection.createStatement();
      connection.close();
      Statement st2 = connection.createStatement(); // error here ???

      Attachments

        Activity

          People

            massimo.siani Massimo Siani (Inactive)
            nzanaga nzanaga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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