Description:
when call Connection.close() method maybe throw StackOverflowError
There program maybe dead recursive
How to repeat:
Step:
1、((StatementImpl)statement).enableStreamingResults()
2、kill session on MySserver or Disconnect the network。
3、Connection.close()
then throw StackOverflow.
stack info(use version 5.1.6):
Exception in thread "main" java.lang.StackOverflowError
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4273)
at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1248)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2569)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1564)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1485)
at com.mysql.jdbc.RowDataDynamic.close(RowDataDynamic.java:195)
at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:7473)
at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:881)
.....
stack info(use version >=5.1.25):
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4690)
at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1464)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2843)
at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1703)
at com.mysql.jdbc.RowDataDynamic.close(RowDataDynamic.java:202)
at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:7474)
at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:923)
at com.mysql.jdbc.StatementImpl.realClose(StatementImpl.java:2585)
at com.mysql.jdbc.ConnectionImpl.closeAllOpenStatements(ConnectionImpl.java:1658)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4690)
at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1464)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2843)
at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1703)
at com.mysql.jdbc.RowDataDynamic.close(RowDataDynamic.java:202)
at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:7474)
at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:923)
at com.mysql.jdbc.StatementImpl.realClose(StatementImpl.java:2585)
at com.mysql.jdbc.ConnectionImpl.closeAllOpenStatements(ConnectionImpl.java:1658)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4690)