1

According to this question and this answer hsqldb datasource can be changed to work with enabled MySQL compatibility mode using this connection URL: jdbc:hsqldb:mem:testdb;sql.syntax_mys=true

My question is more specific: how to turn this mode when using Spring's embedded-database? So it's just:

<jdbc:embedded-database id="dataSource" type="HSQL" >
    <jdbc:script location="classpath:schema.sql"/>
</jdbc:embedded-database>

I have no idea where to place in this configuration compatibility mode parameters. Any ideas?

Community
  • 1
  • 1
Andremoniy
  • 34,031
  • 20
  • 135
  • 241
  • In this case you have to create data source by yourself. – Slava Semushin Jul 25 '16 at 14:10
  • @SlavaSemushin This is not about spring embedded database. I'm interested to keep using `org.springframework.jdbc.datasource.embedded` stuff – Andremoniy Jul 25 '16 at 14:42
  • You cannot use the namespace you will have to create the datasource yourself and you cannot use the embedded classes anymore. Unless you construct your own `EmbeddedDatabaseConfigurer` and configure everything manually instead of using the namespace. But in the end you are still using a `DataSource` a `SimpleDriverDataSource` to be exact (which is something you shouldn't be using for Production but only testing/prototyping!). – M. Deinum Jul 26 '16 at 05:37
  • You can't set compatible mode through the jdbc:embedded-database configuration. Check out this link: https://stackoverflow.com/questions/9171743/does-spring-embedded-database-support-different-sql-dialects – Thomas Jul 29 '19 at 23:44

0 Answers0