question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

when using h2 database mode=MySQL ColumnMetaDataLoader.generateEmptyResultSQL get wrong result

See original GitHub issue

with shardingspere 4.1.0 or 4.1.1, spring.datasource.url=jdbc:h2:mem:db;MODE=MySQL;DB_CLOSE_DELAY=-1 the error is : Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table “t_order” not found; SQL statement: SELECT * FROM “t_order” WHERE 1 != 1; [42102-199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:451) … … at org.apache.shardingsphere.sql.parser.binder.metadata.column.ColumnMetaDataLoader.load(ColumnMetaDataLoader.java:75) at org.apache.shardingsphere.sql.parser.binder.metadata.table.TableMetaDataLoader.load(TableMetaDataLoader.java:46) at org.apache.shardingsphere.core.metadata.ShardingMetaDataLoader.load(ShardingMetaDataLoader.java:83) at org.apache.shardingsphere.core.metadata.ShardingMetaDataLoader.loadShardingSchemaMetaData(ShardingMetaDataLoader.java:134) at org.apache.shardingsphere.core.metadata.ShardingMetaDataLoader.load(ShardingMetaDataLoader.java:125) at org.apache.shardingsphere.shardingjdbc.jdbc.core.context.ShardingRuntimeContext.loadSchemaMetaData(ShardingRuntimeContext.java:65)

in H2 MySQL compatible mode, should use ` for table or field name

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
whg903commented, Aug 19, 2020

OK, I’ll try submit pull request this weekend, tks.

0reactions
tuohai666commented, Aug 19, 2020

It seems like H2 decide to support both from 1.4.200. So, let’s change to 1.4.200 to resolve this problem. What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced - H2 Database Engine
When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the...
Read more >
java h2 in-memory database error: Table not found
This means that your H2 in memory database is not initialized. If you are using Hibernate you can use <property name="hbm2ddl.auto" value="create"/> for...
Read more >
h2database - Google Code
ID Status Summary 509 Fixed Important fix on ValueGeometry 508 Invalid ResultSet.absolute(0) should be rejected 505 PatchesWelcome SQL SET SQL_MODE= NO_AUTO_VALUE_ON_ZERO
Read more >
Developing-with-the- H2- Database - 2.8.x - Play Framework
The H2 in memory database is very convenient for development because your ... to the url (use a semicolon as a separator) eg:...
Read more >
H2 Database Tutorial and expert Tips - Mastertheboss
It is an Opensource Java Database · It has an extremely fast DB engine. · Supports standard SQL and JDBC API. · You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found