Skip to content

Commit

Permalink
Test case for Bug#62006 (16714956), JAVA.IO.NOTSERIALIZABLEEXCEPTION:
Browse files Browse the repository at this point in the history
JAVA.IO.STRINGREADER WHEN PROFILESQL=TRUE.
  • Loading branch information
soklakov committed Feb 28, 2022
1 parent 5f5d1b9 commit 6945787
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Version 8.0.29

- Fix for Bug#104349 (33563548), com.mysql.cj NPE.

- Fix for Bug#62006 (16714956), JAVA.IO.NOTSERIALIZABLEEXCEPTION: JAVA.IO.STRINGREADER WHEN PROFILESQL=TRUE.

- WL#14750, Better unification of query bindings.

- WL#14834, Support for FIDO authentication.
Expand Down
29 changes: 29 additions & 0 deletions src/test/java/testsuite/regression/StatementRegressionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12090,4 +12090,33 @@ public void testBug104349() throws Exception {

} while (useSPS = !useSPS);
}

/**
* Tests for Bug#62006 (16714956), JAVA.IO.NOTSERIALIZABLEEXCEPTION: JAVA.IO.STRINGREADER WHEN PROFILESQL=TRUE.
*
* @throws Exception
*/
@Test
public void testBug62006() throws Exception {
createTable("testBug62006", "(f1 longtext)");

Properties props = new Properties();
props.setProperty(PropertyKey.sslMode.getKeyName(), SslMode.DISABLED.name());
props.setProperty(PropertyKey.allowPublicKeyRetrieval.getKeyName(), "true");
props.setProperty(PropertyKey.profileSQL.getKeyName(), "true");

boolean useSPS = false;
do {
props.setProperty(PropertyKey.useServerPrepStmts.getKeyName(), "" + useSPS);
Connection testConn = getConnectionWithProps(props);
this.pstmt = testConn.prepareStatement("insert into testBug62006 values(?)");
this.pstmt.setObject(1, new StringReader("test"), java.sql.Types.LONGVARCHAR, 0);
this.pstmt.execute();
this.pstmt.setObject(1, new StringReader("test"), java.sql.Types.LONGVARCHAR, 1);
this.pstmt.execute();
this.pstmt.setObject(1, new StringReader("test"));
this.pstmt.execute();
testConn.close();
} while (useSPS = !useSPS);
}
}

0 comments on commit 6945787

Please sign in to comment.