Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 91ddd0d

Browse files
committed
Remove MVCC from H2 DataSource URL
1 parent 617d1d2 commit 91ddd0d

File tree

26 files changed

+47
-50
lines changed

26 files changed

+47
-50
lines changed

boot-plugin/src/test/groovy/org/grails/datastore/gorm/boot/autoconfigure/HibernateGormAutoConfigurationSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HibernateGormAutoConfigurationSpec extends Specification{
2929
AutoConfigurationPackages.register(context, "org.grails.datastore.gorm.boot.autoconfigure")
3030
this.context.getEnvironment().getPropertySources().addFirst(new MapPropertySource("foo", ['hibernate.hbm2ddl.auto':'create']))
3131
def beanFactory = this.context.defaultListableBeanFactory
32-
beanFactory.registerSingleton("dataSource", new DriverManagerDataSource("jdbc:h2:mem:grailsDb1;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1", 'sa', ''))
32+
beanFactory.registerSingleton("dataSource", new DriverManagerDataSource("jdbc:h2:mem:grailsDb1;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1", 'sa', ''))
3333
this.context.register( TestConfiguration.class,
3434
PropertyPlaceholderAutoConfiguration.class);
3535
}

examples/grails3-database-per-tenant/grails-app/conf/application.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ dataSource:
7979
jmxExport: true
8080
driverClassName: org.h2.Driver
8181
dbCreate: create-drop
82-
url: jdbc:h2:mem:books;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
82+
url: jdbc:h2:mem:books;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
8383

8484
dataSources:
8585
moreBooks:
86-
url: jdbc:h2:mem:moreBooks;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
86+
url: jdbc:h2:mem:moreBooks;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
8787
evenMoreBooks:
88-
url: jdbc:h2:mem:evenMoreBooks;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
88+
url: jdbc:h2:mem:evenMoreBooks;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE

examples/grails3-hibernate5/grails-app/conf/application.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ environments:
9090
development:
9191
dataSource:
9292
dbCreate: create-drop
93-
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
93+
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
9494
test:
9595
dataSource:
9696
dbCreate: update
97-
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
97+
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
9898
production:
9999
dataSource:
100100
dbCreate: update
101-
url: jdbc:h2:./prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
101+
url: jdbc:h2:./prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
102102
properties:
103103
jmxEnabled: true
104104
initialSize: 5

examples/grails3-multiple-datasources/grails-app/conf/application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ dataSources:
7575
jmxExport: true
7676
driverClassName: org.h2.Driver
7777
dbCreate: create-drop
78-
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
78+
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
7979
secondary:
8080
pooled: true
8181
jmxExport: true
8282
driverClassName: org.h2.Driver
8383
dbCreate: create-drop
84-
url: jdbc:h2:mem:devDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
84+
url: jdbc:h2:mem:devDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE

examples/grails3-partitioned-multi-tenancy/grails-app/conf/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ dataSource:
7979
jmxExport: true
8080
driverClassName: org.h2.Driver
8181
dbCreate: create-drop
82-
url: jdbc:h2:mem:books;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
82+
url: jdbc:h2:mem:books;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE

examples/grails3-schema-per-tenant/grails-app/conf/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ dataSource:
7979
jmxExport: true
8080
driverClassName: org.h2.Driver
8181
dbCreate: create-drop
82-
url: jdbc:h2:mem:books;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
82+
url: jdbc:h2:mem:books;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
8383

examples/spring-boot-hibernate5/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ dataSource:
99
jmxExport: true
1010
driverClassName: org.h2.Driver
1111
dbCreate: create-drop
12-
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
12+
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE

examples/test-data-service/grails-app/conf/application.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ environments:
8787
development:
8888
dataSource:
8989
dbCreate: create-drop
90-
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
90+
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
9191
test:
9292
dataSource:
9393
dbCreate: update
94-
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
94+
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
9595
production:
9696
dataSource:
9797
dbCreate: none
98-
url: jdbc:h2:./prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
98+
url: jdbc:h2:./prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
9999
properties:
100100
jmxEnabled: true
101101
initialSize: 5

grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/SchemaNameSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import spock.lang.Specification
1515
*/
1616
class SchemaNameSpec extends Specification {
1717

18-
@Shared @AutoCleanup HibernateDatastore datastore = new HibernateDatastore(['dataSource.url':'jdbc:h2:mem:grailsDB;MVCC=TRUE;LOCK_TIMEOUT=10000;INIT=create schema if not exists myschema', (Settings.SETTING_DB_CREATE):'create-drop'],CustomSchema)
18+
@Shared @AutoCleanup HibernateDatastore datastore = new HibernateDatastore(['dataSource.url':'jdbc:h2:mem:grailsDB;LOCK_TIMEOUT=10000;INIT=create schema if not exists myschema', (Settings.SETTING_DB_CREATE):'create-drop'],CustomSchema)
1919
@Shared PlatformTransactionManager transactionManager = datastore.getTransactionManager()
2020

2121
@Rollback

grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/UniqueWithMultipleDataSourcesSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ import spock.lang.Specification
1919
class UniqueWithMultipleDataSourcesSpec extends Specification {
2020

2121
@Shared Map config = [
22-
'dataSource.url':"jdbc:h2:mem:grailsDB;MVCC=TRUE;LOCK_TIMEOUT=10000",
22+
'dataSource.url':"jdbc:h2:mem:grailsDB;LOCK_TIMEOUT=10000",
2323
'dataSource.dbCreate': 'update',
2424
'dataSource.dialect': H2Dialect.name,
2525
'dataSource.formatSql': 'true',
2626
'hibernate.flush.mode': 'COMMIT',
2727
'hibernate.cache.queries': 'true',
2828
'hibernate.cache':['use_second_level_cache':true,'region.factory_class':'org.hibernate.cache.ehcache.EhCacheRegionFactory'],
2929
'hibernate.hbm2ddl.auto': 'create',
30-
'dataSources.second':[url:"jdbc:h2:mem:second;MVCC=TRUE;LOCK_TIMEOUT=10000"],
30+
'dataSources.second':[url:"jdbc:h2:mem:second;LOCK_TIMEOUT=10000"],
3131
]
3232

3333
@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(DatastoreUtils.createPropertyResolver(config),Abc)

0 commit comments

Comments
 (0)