[PATCH] MySQL schema migration
Jeff Martin <[email protected]> Wed, 12 May 2004 12:44:54 +0100
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Ran across a problem with migrating the db schema from 0.7.2 to 0.7.6.1 The migration uses executeQuery to exec and insert statement. Seems that the mysql driver won't allow you to do this. Here's a patch which changes the executeQuery to an executeUpdate -- jeff martin information technologist mkodo limited mobile: 44 (0) 78 5547 8331 phone: 44 (0) 20 2226 4545 email: [email protected] www.mkodo.com
V072toV076SchemaConverter.java.patch
(text/x-patch, 878 B)
Index: ./src/main/org/exolab/jms/tools/db/migration/V072toV076SchemaConverter.java
===================================================================
RCS file: /cvsroot/openjms/openjms/src/main/org/exolab/jms/tools/db/migration/V072toV076SchemaConverter.java,v
retrieving revision 1.2
diff -u -p -r1.2 V072toV076SchemaConverter.java
--- ./src/main/org/exolab/jms/tools/db/migration/V072toV076SchemaConverter.java 7 Aug 2003 13:33:11 -0000 1.2
+++ ./src/main/org/exolab/jms/tools/db/migration/V072toV076SchemaConverter.java 12 May 2004 10:44:07 -0000
@@ -269,7 +269,7 @@ public class V072toV076SchemaConverter i
select = _connection.prepareStatement(
"insert into " + HANDLES_TABLE + " select * from " +
tmpName);
- select.executeQuery();
+ select.executeUpdate();
select.close();
// drop the temporary table