Bugs item #555070, was opened at 2002-05-12 20:49 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=555070&group_id=22866
Category: JBossCMP Group: CVS HEAD Status: Open Resolution: None Priority: 5 Submitted By: Dylan van Iersel (dviersel) Assigned to: Nobody/Anonymous (nobody) Summary: Incorrect CREATE statement for MySQL ds Initial Comment: The CREATE statement to create a new table in a MySQL datasource does not quote the tablename nor the column names. This causes problems when tables are created with names corresponding to MySQL reserved words. For example: when deploying an entity bean called "Group", JBoss trace shows: org.jboss.deployment.DeploymentException: Could not deploy njar:file:/C:/Java/jboss- 3.0.0RC2/server/ default/tmp/deploy/server/default/deploy/rcontrol.ear/80.rcontrol.ear^/nntp- bingrab.jar; - nested th rowable: (org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near 'Group (id VARCHAR(255) BINARY NOT NULL, CONSTRAINT pk_Group PRIMARY KEY (id))' at line 1)) When I directly enter this CREATE statement on the MySQL command-line, I get the same error, whilst when I surround them by quotes (`) the table is created correctly. OS: Win2000 JDK: 1.3.1 JBoss 3.0 RC2 ---------------------------------------------------------------------- Comment By: Stephen Coy (scoy) Date: 2002-05-13 16:30 Message: Logged In: YES user_id=463096 Further to this, I've added a feature request (555315) regarding this because I think the current behaviour is more of a limitation of the current design/implementation rather than a bug per se. ---------------------------------------------------------------------- Comment By: Stephen Coy (scoy) Date: 2002-05-13 16:06 Message: Logged In: YES user_id=463096 This issue is not limited to MySQL. It's my understanding that all JDBC 2.0 compliant drivers are supposed to support the quoting syntax. For now, you need to set up name mappings manually in jbosscmp-jdbc.xml. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=555070&group_id=22866 _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development