File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/com/geckotechnology/mySqlDataCompare Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 44import java .sql .DriverManager ;
55import java .sql .ResultSet ;
66import java .sql .Statement ;
7+ import java .util .Properties ;
78
89public class MySQLSchemaRetriever {
910
@@ -20,7 +21,10 @@ public MySQLSchemaRetriever(String url) {
2021 }
2122
2223 public void openConnection () throws Exception {
23- conn = DriverManager .getConnection (url );
24+ Properties info = new Properties ();
25+ info .put ("defaultFetchSize" , Integer .toString (SELECT_FETCH_SIZE ));
26+ info .put ("useCursorFetch" , "true" );
27+ conn = DriverManager .getConnection (url , info );
2428 }
2529
2630 public void closeConnection () {
@@ -36,7 +40,6 @@ public Statement createStatement() throws Exception {
3640 ResultSet .TYPE_FORWARD_ONLY ,
3741 ResultSet .CONCUR_READ_ONLY ,
3842 ResultSet .CLOSE_CURSORS_AT_COMMIT );
39- stmt .setFetchSize (SELECT_FETCH_SIZE );
4043 return stmt ;
4144 }
4245
You can’t perform that action at this time.
0 commit comments