From 51fb3586f450e22c75ead31d7570348643c3d803 Mon Sep 17 00:00:00 2001 From: Patrick Falls Date: Fri, 12 Apr 2013 13:12:30 -0700 Subject: [PATCH] #118 Updated connection string for JDBC based tests --- finagle/src/main/scala/com/falmarri/finagle/Finagle.scala | 2 +- lift-stateless/src/main/scala/DB.scala | 2 +- play-java/conf/application.conf | 2 +- play-scala/conf/application.conf | 2 +- play1/conf/application.conf | 4 ++-- play1siena/conf/application.conf | 4 ++-- unfiltered/src/main/resources/application.conf | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/finagle/src/main/scala/com/falmarri/finagle/Finagle.scala b/finagle/src/main/scala/com/falmarri/finagle/Finagle.scala index 10d0a0f753e..5e0bde13b1d 100644 --- a/finagle/src/main/scala/com/falmarri/finagle/Finagle.scala +++ b/finagle/src/main/scala/com/falmarri/finagle/Finagle.scala @@ -55,7 +55,7 @@ object FinagleBenchmark extends App { ds.setInitialSize(20); //ds.setValidationQuery("SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS") //new java.io.File("target").mkdirs // ensure that folder for database exists - ds.setUrl("jdbc:mysql://" + System.getProperty("db.host", "localhost") + ":3306/hello_world") + ds.setUrl("jdbc:mysql://" + System.getProperty("db.host", "localhost") + ":3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true") ds } diff --git a/lift-stateless/src/main/scala/DB.scala b/lift-stateless/src/main/scala/DB.scala index c8796e59f4b..297a50c1328 100644 --- a/lift-stateless/src/main/scala/DB.scala +++ b/lift-stateless/src/main/scala/DB.scala @@ -20,7 +20,7 @@ object DB { ds.setMaxIdle(10); ds.setInitialSize(10); ds.setValidationQuery("SELECT 1") - ds.setUrl("jdbc:mysql://%s/%s?useUnicode=true&characterEncoding=UTF-8" + ds.setUrl("jdbc:mysql://%s/%s?useUnicode=true&characterEncoding=UTF-8&jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true" format (config[String]("db.host"), config[String]("db.name"))) ds } diff --git a/play-java/conf/application.conf b/play-java/conf/application.conf index 0ecd73458c9..b30b61312ea 100644 --- a/play-java/conf/application.conf +++ b/play-java/conf/application.conf @@ -30,7 +30,7 @@ application.langs="en" # You can expose this datasource via JNDI if needed (Useful for JPA) # db.default.jndiName=DefaultDS db.default.driver= com.mysql.jdbc.Driver -db.default.url="jdbc:mysql://localhost:3306/hello_world" +db.default.url="jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true" db.default.user=benchmarkdbuser db.default.password=benchmarkdbpass db.default.jndiName=DefaultDS diff --git a/play-scala/conf/application.conf b/play-scala/conf/application.conf index d57ebc42145..abacfa80d55 100644 --- a/play-scala/conf/application.conf +++ b/play-scala/conf/application.conf @@ -30,7 +30,7 @@ application.langs="en" # You can expose this datasource via JNDI if needed (Useful for JPA) # db.default.jndiName=DefaultDS db.default.driver= com.mysql.jdbc.Driver -db.default.url="jdbc:mysql://localhost:3306/hello_world" +db.default.url="jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true" #db.default.url="jdbc:mysql://192.168.100.101:3306/hello_world" db.default.user=benchmarkdbuser db.default.password=benchmarkdbpass diff --git a/play1/conf/application.conf b/play1/conf/application.conf index d09099441fc..43d39a19dfd 100644 --- a/play1/conf/application.conf +++ b/play1/conf/application.conf @@ -109,13 +109,13 @@ db.pool.minSize=10 # generic "destroy" method : # db.destroyMethod=close db.driver= com.mysql.jdbc.Driver -db.url=jdbc:mysql://localhost:3306/hello_world +db.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true db.user=benchmarkdbuser db.pass=benchmarkdbpass db.jndiName=DefaultDS db.default.driver= com.mysql.jdbc.Driver -db.default.url=jdbc:mysql://localhost:3306/hello_world +db.default.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true db.default.user=benchmarkdbuser db.default.pass=benchmarkdbpass db.default.jndiName=DefaultDS diff --git a/play1siena/conf/application.conf b/play1siena/conf/application.conf index 16bd37dc4fb..5479813b376 100644 --- a/play1siena/conf/application.conf +++ b/play1siena/conf/application.conf @@ -109,13 +109,13 @@ db.pool.minSize=10 # generic "destroy" method : # db.destroyMethod=close db.driver= com.mysql.jdbc.Driver -db.url=jdbc:mysql://localhost:3306/hello_world +db.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true db.user=benchmarkdbuser db.pass=benchmarkdbpass db.jndiName=DefaultDS db.default.driver= com.mysql.jdbc.Driver -db.default.url=jdbc:mysql://localhost:3306/hello_world +db.default.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true db.default.user=benchmarkdbuser db.default.pass=benchmarkdbpass db.default.jndiName=DefaultDS diff --git a/unfiltered/src/main/resources/application.conf b/unfiltered/src/main/resources/application.conf index 865ac0fdca6..7c283809189 100644 --- a/unfiltered/src/main/resources/application.conf +++ b/unfiltered/src/main/resources/application.conf @@ -1,5 +1,5 @@ db.default.driver=""com.mysql.jdbc.Driver"" -db.default.url = "jdbc:mysql://localhost:3306/hello_world" +db.default.url = "jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true" db.default.user = "benchmarkdbuser" db.default.password = "benchmarkdbpass" db.default.minConnections = 4