Ah, thanks for verifying that. It turns out that mysqldump had generated in-comment directives like /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
which (as you can see) are ended with a semicolon. It appears that H2 will ignore the comment, but if the trailing semicolon is present, the parser will abort. Syntax error in SQL statement " ;[*] "; SQL statement: /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; [42000-172] I had taken this to mean that type of comment was not supported. Thanks, Patrick On Wed, Jul 17, 2013 at 6:35 PM, Thomas Mueller < [email protected]> wrote: > Hi, > > > C-style (/**/) comments are also rejected > > Actually, H2 supports them (meaning, it is threaded as a comment and > ignored). Example: > > select * from test /* comment */ > > Regards, > Thomas > > > On Wednesday, July 17, 2013, Patrick Wright wrote: > >> Hi Noel, >> >> thanks for clarifying what SET REFERENTIAL_INTEGRITY FALSE does in H2. >> >> Note that we already support a lot of MySQL-specific syntax, like the >>> "ENGINE=" stuff, which we just ignore. >>> >> >> There are some part of the CREATE TABLE syntax that are not skipped, >> which is what I was referring to; I will open a low-priority ticket to >> track these. For example >> CREATE TABLE x....) ENGINE=INNODB; >> >> is accepted, but >> CREATE TABLE x....) ENGINE=INNODB DEFAULT CHARSET=latin1; >> >> is rejected. Similarly, C-style (/**/) comments are also rejected. These >> appear in some dumps to specify MySQL-specific database settings, such as >> in >> /*!40101 SET character_set_client = @saved_cs_client */; >> >> That said, I've been able to use H2 successfully for unit-testing on >> previous projects that targeted MySQL. Apart from minor problems in SQL >> syntax the support was fantastic and I have been recommending H2 to my >> colleagues for some time now. It's a great piece of work. I'm really not >> writing to complain, but to understand what the limits of the MySQL mode >> are. >> >> >>> >>> You could try getting a schema dump where the constraints are specified >>> out-of-line, that might make it easier to apply. >>> >>> This is what I will try next. >> >> Best, >> Patrick >> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "H2 Database" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/h2-database/rrQmOzRbWgU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
