{"thread":{"id":"20526","subject":"[EGIT] Push to GitHub caused corruption","startedAt":"2009-08-10T21:46:34Z","lastAt":"2009-08-14T16:17:22Z","messageCount":5,"participants":["John Bito","Robin Rosenberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"120208","messageId":"3ae83b000908101446q2d4f1101we4bbd7023f78b03@mail.gmail.com","threadId":"20526","inReplyTo":null,"subject":"[EGIT] Push to GitHub caused corruption","fromName":"John Bito","fromEmail":"jwbito@gmail.com","sentAt":"2009-08-10T21:46:34Z","receivedAt":"2009-08-10T21:46:34Z","isPatch":false,"sender":{"key":"jwbito@gmail.com","avatar":"https://gravatar.com/avatar/e94274c6b71a11e3fa03d91e75937609e66315f23267efd591ef1f98bb860bf9?d=mp&s=160"},"body":"Using the 'release' build of EGit (0.4.9.200906240051) I pushed a\ncommit to GitHub.  After that, using git to pull, I get 'bad tree\nobject' resulting in 'remote: aborting due to possible repository\ncorruption on the remote side'.  I had a similar problem back in April\n(using integration builds of 0.4.0).  I'm willing to investigate if\nthere's interest in finding the root of the problem.\n"},{"id":"120247","messageId":"200908110810.45369.robin.rosenberg@gmail.com","threadId":"20526","inReplyTo":"3ae83b000908101446q2d4f1101we4bbd7023f78b03@mail.gmail.com","subject":"Re: [EGIT] Push to GitHub caused corruption","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@gmail.com","sentAt":"2009-08-11T06:10:45Z","receivedAt":"2009-08-11T06:10:45Z","isPatch":false,"sender":{"key":"robin.rosenberg@gmail.com","avatar":null},"body":"måndag 10 augusti 2009 23:46:34 skrev John Bito <jwbito@gmail.com>:\n> Using the 'release' build of EGit (0.4.9.200906240051) I pushed a\n> commit to GitHub.  After that, using git to pull, I get 'bad tree\n> object' resulting in 'remote: aborting due to possible repository\n> corruption on the remote side'.  I had a similar problem back in April\n> (using integration builds of 0.4.0).  I'm willing to investigate if\n> there's interest in finding the root of the problem.\n\nFixing problems related to repository integrity is definitely interesting. One\ncan live all kinds of problem, as long as they don't destroy anything. \n\n-- robin\n"},{"id":"120317","messageId":"3ae83b000908111552o53189a44h45fc44f124850483@mail.gmail.com","threadId":"20526","inReplyTo":"200908110810.45369.robin.rosenberg@gmail.com","subject":"Re: [EGIT] Push to GitHub caused corruption","fromName":"John Bito","fromEmail":"jwbito@gmail.com","sentAt":"2009-08-11T22:52:29Z","receivedAt":"2009-08-11T22:52:29Z","isPatch":false,"sender":{"key":"jwbito@gmail.com","avatar":"https://gravatar.com/avatar/e94274c6b71a11e3fa03d91e75937609e66315f23267efd591ef1f98bb860bf9?d=mp&s=160"},"body":"Running git fsck -full on the repo that I pushed from is clean.\nHere's the git fsck -full from GitHub\n       <mojombo>       git fsck --full\n       <mojombo>       broken link from tree\nf4f9ecd1875938baa42467dfd6a8134d75fe5de4 to tree\n57548924f1eca854dc8db00844f95d3de2c82957\n       <mojombo>       broken link from tree\nf4f9ecd1875938baa42467dfd6a8134d75fe5de4 to tree\n3d1f74522c3e7c3c03390fae376446fda6eed306\n       <mojombo>       missing tree 3d1f74522c3e7c3c03390fae376446fda6eed306\n       <mojombo>       missing tree 57548924f1eca854dc8db00844f95d3de2c82957\n       <mojombo>       dangling commit ab6ce47159c1eaff0e4bae19291679267de9f669\n\nThe repo on GitHub is back where it was before the push.  I have a\ncopy of the corrupt one from GitHub (358MB tar.gz).  If there's\nsomething I can do that would help to improve JGit/EGit, please let me\nknow.\n\nThanks,\nJohn\n\nOn Mon, Aug 10, 2009 at 23:10, Robin Rosenberg<robin.rosenberg@gmail.com> wrote:\n> måndag 10 augusti 2009 23:46:34 skrev John Bito <jwbito@gmail.com>:\n>> Using the 'release' build of EGit (0.4.9.200906240051) I pushed a\n>> commit to GitHub.  After that, using git to pull, I get 'bad tree\n>> object' resulting in 'remote: aborting due to possible repository\n>> corruption on the remote side'.  I had a similar problem back in April\n>> (using integration builds of 0.4.0).  I'm willing to investigate if\n>> there's interest in finding the root of the problem.\n>\n> Fixing problems related to repository integrity is definitely interesting. One\n> can live all kinds of problem, as long as they don't destroy anything.\n>\n> -- robin\n>\n>\n"},{"id":"120627","messageId":"200908141119.49798.robin.rosenberg.lists@dewire.com","threadId":"20526","inReplyTo":"3ae83b000908111552o53189a44h45fc44f124850483@mail.gmail.com","subject":"Re: [EGIT] Push to GitHub caused corruption","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-08-14T09:19:49Z","receivedAt":"2009-08-14T09:19:49Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"onsdag 12 augusti 2009 00:52:29 skrev John Bito <jwbito@gmail.com>:\n> Running git fsck -full on the repo that I pushed from is clean.\n> Here's the git fsck -full from GitHub\n>        <mojombo>       git fsck --full\n>        <mojombo>       broken link from tree\n> f4f9ecd1875938baa42467dfd6a8134d75fe5de4 to tree\n> 57548924f1eca854dc8db00844f95d3de2c82957\n>        <mojombo>       broken link from tree\n> f4f9ecd1875938baa42467dfd6a8134d75fe5de4 to tree\n> 3d1f74522c3e7c3c03390fae376446fda6eed306\n>        <mojombo>       missing tree 3d1f74522c3e7c3c03390fae376446fda6eed306\n>        <mojombo>       missing tree 57548924f1eca854dc8db00844f95d3de2c82957\n>        <mojombo>       dangling commit ab6ce47159c1eaff0e4bae19291679267de9f669\n> \n> The repo on GitHub is back where it was before the push.  I have a\n> copy of the corrupt one from GitHub (358MB tar.gz).  If there's\n> something I can do that would help to improve JGit/EGit, please let me\n> know.\n\nI guess we'd like to try to recreate the problem, unless we see some obvious clue. What\ndoes the tres with missing links look like, i.e. f4f9ecd1875938baa42467dfd6a8134d75fe5de4.\n\nOn the recreation side we'd probably need to recreate a repo that looks somewhat like the\ngithub repo before the crash. We can do that by taking a copy of your existing (good) repo,\nreset branches and  clone it. Then push from yet another copy and hopefully it will blow up\nagain.\n\nCan we be sure it wasn't corrupt before the jgit push? \nDid f4f9ecd1875938baa42467dfd6a8134d75fe5de4 exist before the push or was it new?\n\n-- robin\n"},{"id":"120643","messageId":"3ae83b000908140917j111352f0pe728d99711466e7a@mail.gmail.com","threadId":"20526","inReplyTo":"200908141119.49798.robin.rosenberg.lists@dewire.com","subject":"Re: [EGIT] Push to GitHub caused corruption","fromName":"John Bito","fromEmail":"jwbito@gmail.com","sentAt":"2009-08-14T16:17:22Z","receivedAt":"2009-08-14T16:17:22Z","isPatch":false,"sender":{"key":"jwbito@gmail.com","avatar":"https://gravatar.com/avatar/e94274c6b71a11e3fa03d91e75937609e66315f23267efd591ef1f98bb860bf9?d=mp&s=160"},"body":"The repo that was pushed to cause the corruption GitHup has the tree\nentry f4f9ecd1875938baa42467dfd6a8134d75fe5de4 in a dangling commit.\n\nI've opened a bug in hopes that will limit the chatter on this list:\nhttps://bugs.eclipse.org/bugs/show_bug.cgi?id=286653\n\nThe information below is all in there, as well.\n\n$ git fsck --full f4f9ecd1875938baa42467dfd6a8134d75fe5de4\ndangling commit 560a391801d1712b625d4ae317a490529a4ccf08\n\n$ git ls-tree f4f9ecd1875938baa42467dfd6a8134d75fe5de4\n100644 blob 9324c851e6816962f87cb772ebc34f9c8036d832    .classpath\n100644 blob 1cb465bc1e95c2e088376ac06b363a3aa481c9ce    .project\n040000 tree f00fa742e906037190ae0cce70ec235fbf6eab83    .settings\n100644 blob 7186ec1ee04722679dd9b8c0567fa522ac0495b3    asql.jardesc\n040000 tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904    bin-groovy\n040000 tree 57548924f1eca854dc8db00844f95d3de2c82957    bin\n040000 tree 1156d24cd387c7278bc536d32b09057556a6c60d    lib\n040000 tree 3d1f74522c3e7c3c03390fae376446fda6eed306    src\n\n$ git show 560a391801d1712b625d4ae317a490529a4ccf08\ncommit 560a391801d1712b625d4ae317a490529a4ccf08\nAuthor: John W. Bito <jwbito@XXXX>\nDate:   Mon Aug 10 14:01:22 2009 -0700\n\n    Now traverse rows using DB cursor.  Enable statement cache.\n\ndiff --git a/ADS/testlib/asql.jar b/ADS/testlib/asql.jar\nindex bb434c7..155b825 100644\nBinary files a/ADS/testlib/asql.jar and b/ADS/testlib/asql.jar differ\ndiff --git a/ADS/testlib/groovy-all-1.6.1.jar b/ADS/testlib/groovy-all-1.6.1.jar\ndeleted file mode 100644\nindex a6252c2..0000000\nBinary files a/ADS/testlib/groovy-all-1.6.1.jar and /dev/null differ\ndiff --git a/ADS/testlib/groovy-all-1.7-beta-1-SNAPSHOT.jar\nb/ADS/testlib/groovy-all-1.7-beta-1-SNAPSHOT.jar\nnew file mode 100644\nindex 0000000..4d3fec8\nBinary files /dev/null and\nb/ADS/testlib/groovy-all-1.7-beta-1-SNAPSHOT.jar differ\ndiff --git a/queryengine/.classpath b/queryengine/.classpath\nindex 4aab135..9324c85 100644\n--- a/queryengine/.classpath\n+++ b/queryengine/.classpath\n@@ -1,17 +1,17 @@\n-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<classpath>\n-\t<classpathentry excluding=\"ch/viveo/query/test/resources/\"\nkind=\"src\" path=\"src\"/>\n-\t<classpathentry\nexcluding=\"bin-groovy/|src/|src/ch/viveo/query/test/resources/\"\nkind=\"src\" path=\"\"/>\n-\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"/>\n-\t<classpathentry exported=\"true\" kind=\"con\" path=\"GROOVY_SUPPORT\"/>\n-\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/nb_binding\"/>\n-\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.junit.JUNIT_CONTAINER/4\"/>\n-\t<classpathentry kind=\"con\"\npath=\"org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/Oracle Thin\nDriver\"/>\n-\t<classpathentry kind=\"lib\" path=\"/nb_binding/lib/xpp3_min-1.1.4c.jar\"/>\n-\t<classpathentry kind=\"lib\" path=\"/nb_binding/lib/xstream-1.3.1.jar\">\n-\t\t<attributes>\n-\t\t\t<attribute name=\"javadoc_location\"\nvalue=\"http://xstream.codehaus.org/javadoc\"/>\n-\t\t</attributes>\n-\t</classpathentry>\n-\t<classpathentry kind=\"output\" path=\"bin\"/>\n-</classpath>\n+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<classpath>\n+\t<classpathentry excluding=\"ch/viveo/query/test/resources/\"\nkind=\"src\" path=\"src\"/>\n+\t<classpathentry\nexcluding=\"bin-groovy/|src/|src/ch/viveo/query/test/resources/\"\nkind=\"src\" path=\"\"/>\n+\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"/>\n+\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/nb_binding\"/>\n+\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.junit.JUNIT_CONTAINER/4\"/>\n+\t<classpathentry kind=\"con\"\npath=\"org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/Oracle Thin\nDriver\"/>\n+\t<classpathentry kind=\"lib\" path=\"/nb_binding/lib/xpp3_min-1.1.4c.jar\"/>\n+\t<classpathentry kind=\"lib\" path=\"/nb_binding/lib/xstream-1.3.1.jar\">\n+\t\t<attributes>\n+\t\t\t<attribute name=\"javadoc_location\"\nvalue=\"http://xstream.codehaus.org/javadoc\"/>\n+\t\t</attributes>\n+\t</classpathentry>\n+\t<classpathentry exported=\"true\" kind=\"con\" path=\"GROOVY_SUPPORT\"/>\n+\t<classpathentry kind=\"output\" path=\"bin\"/>\n+</classpath>\ndiff --git a/queryengine/.settings/org.codehaus.groovy.eclipse.preferences.prefs\nb/queryengine/.settings/org.codehaus.groovy.eclipse.preferences.prefs\nold mode 100755\nnew mode 100644\nindex 1abf79e..c5e9a2e\n--- a/queryengine/.settings/org.codehaus.groovy.eclipse.preferences.prefs\n+++ b/queryengine/.settings/org.codehaus.groovy.eclipse.preferences.prefs\n@@ -1,4 +1,4 @@\n-#Tue May 05 14:16:49 PDT 2009\n+#Sat Aug 08 14:15:43 PDT 2009\n eclipse.preferences.version=1\n groovy.compiler.output.path=bin-groovy\n support.groovy=true\ndiff --git a/queryengine/bin-groovy/README b/queryengine/bin-groovy/README\ndeleted file mode 100644\nindex 6dd996e..0000000\n--- a/queryengine/bin-groovy/README\n+++ /dev/null\n@@ -1 +0,0 @@\n-Folder for Groovy compilation.\ndiff --git a/queryengine/bin/.settings/org.codehaus.groovy.eclipse.preferences.prefs\nb/queryengine/bin/.settings/org.codehaus.groovy.eclipse.preferences.prefs\nold mode 100755\nnew mode 100644\nindex 1abf79e..c5e9a2e\n--- a/queryengine/bin/.settings/org.codehaus.groovy.eclipse.preferences.prefs\n+++ b/queryengine/bin/.settings/org.codehaus.groovy.eclipse.preferences.prefs\n@@ -1,4 +1,4 @@\n-#Tue May 05 14:16:49 PDT 2009\n+#Sat Aug 08 14:15:43 PDT 2009\n eclipse.preferences.version=1\n groovy.compiler.output.path=bin-groovy\n support.groovy=true\ndiff --git a/queryengine/src/ch/viveo/query/TableBinding.groovy\nb/queryengine/src/ch/viveo/query/TableBinding.groovy\nindex 29e0e58..410ebd6 100644\n--- a/queryengine/src/ch/viveo/query/TableBinding.groovy\n+++ b/queryengine/src/ch/viveo/query/TableBinding.groovy\n@@ -7,6 +7,7 @@ import ch.viveo.ads_sql.TableInterface ;\n import ch.viveo.ads_sql.buffer.ClientBuffer;\n import ch.viveo.ads_sql.exceptions.*;\n import groovy.sql.Sql ;\n+import groovy.sql.GroovyResultSet ;\n import java.util.logging.Logger;\n import java.util.logging.Level;\n import java.nio.ByteBuffer;\n@@ -19,20 +20,20 @@ import java.lang.IllegalStateException\n  *\n  */\n public class TableBinding implements TableInterface {\n+\tprivate static final Logger log =\nLogger.getLogger(getClass().getSimpleName());\n+\n \tprivate final Structure str;\n \tprivate final Table tab;\n \tprivate final def db;\n \tprivate final def allFieldNames;\n-\tprivate final Set<Object> allColumnNames;\n+\tprivate final Set<String> allColumnNames;\n \tprivate boolean valid;\n \tprivate boolean open;\n \tprivate def uri;\n-\tprivate def rowSet;\n+\tprivate GroovyResultSet resultSet;\n \tprivate def queryParams;\n \tprivate def queryKey;\n \tprivate int queryMatchType;\n-\tprivate boolean rowSetUsed;\n-\tprivate static final Logger log =\nLogger.getLogger(getClass().getSimpleName());\n \tprivate final String readQuery;\n \tprivate final String maxUriQuery;\n \tprivate final String sequenceQuery;\n@@ -195,8 +196,7 @@ public class TableBinding implements TableInterface {\n \t\n \tvoid select(int lockOption){\n \t\tlog.log(Level.FINEST, \"Parameters: {0}\", queryParams)\n-\t\trowSet = db.rows(tab.keys.(lockOption ? \"queryStringLock\" :\n\"queryString\") (queryKey, queryMatchType), queryParams);\n-\t\trowSetUsed = false;\n+\t\tresultSet = db.rowCursor(tab.keys.(lockOption ? \"queryStringLock\" :\n\"queryString\") (queryKey, queryMatchType), queryParams);\n \t}\n \t\n \tpublic void selectRange(int keyNumber, int matchOption, ByteBuffer\nstartValues, ByteBuffer endValues) {\n@@ -209,29 +209,23 @@ public class TableBinding implements TableInterface {\n \t}\n\n \tprivate reset() {\n-\t\trowSet = null;\n-\t\trowSetUsed = false\n+\t\tif (resultSet && !resultSet.isClosed())\n+\t\t\tresultSet.close();\n \t}\n \t\n \tpublic int retrieveUris(ByteBuffer result, int lockOption) {\n-\t\tif (null == rowSet) {\n+\t\tif (null == resultSet) {\n \t\t\tif (!queryKey)\n \t\t\t\tthrow new IllegalStateException(\"No row set available for ${tab.name}\");\n \t\t\telse {\n \t\t\t\tselect(lockOption);\n-\t\t\t\tlog.log(Level.FINEST, \"Select URIs returns {0}: {1}\",\nrowSet.size(), rowSet)\n \t\t\t}\n \t\t}\n-\t\tif (rowSetUsed)\n-\t\t\treturn 0;\n-\t\trowSetUsed = true;\n \t\tIntBuffer urilist = result.asIntBuffer();\n \t\tint count = 0;\n-\t\trowSet.each {\n-\t\t\tif (urilist.position() < urilist.limit()) {\n-\t\t\t\turilist.put(it.uri as int)\n-\t\t\t\tcount ++;\n-\t\t\t}\n+\t\twhile (urilist.position() < urilist.limit() && resultSet.next()) {\n+\t\t\turilist.put(resultSet.uri as int)\n+\t\t\tcount ++;\n \t\t}\n \t\tlog.log(Level.FINEST, \"retrieveUris returning {0} uris\", count);\n \t\t//TODO hold pagination state so next request returns following list elements\n@@ -239,6 +233,7 @@ public class TableBinding implements TableInterface {\n \t}\n \t\n \tpublic void close() {\n+\t\treset();\n \t\tvalid = false;\n \t\topen = false;\n \t\t//TODO remove the reference to this in the Process instance\ndiff --git a/queryengine/src/ch/viveo/query/TableBindingTest.groovy\nb/queryengine/src/ch/viveo/query/TableBindingTest.groovy\nindex 8e2a389..aa448d1 100644\n--- a/queryengine/src/ch/viveo/query/TableBindingTest.groovy\n+++ b/queryengine/src/ch/viveo/query/TableBindingTest.groovy\n@@ -8,7 +8,6 @@ import org.junit.Test\n import org.junit.Before\n import org.junit.After;\n\n-import groovy.sql.Sql;\n import java.nio.ByteBuffer;\n import java.nio.IntBuffer;\n\n@@ -18,6 +17,9 @@ import ch.viveo.ads_sql.TableInterface\n import ch.viveo.ads_sql.buffer.ClientBuffer\n import ch.viveo.ads_sql.test.TestData\n\n+import ch.viveo.query.mgr.Process;\n+import ch.viveo.query.sql.SqlCursor;\n+\n /**\n  * @author John W. Bito\n  *\n@@ -27,13 +29,17 @@ public class TableBindingTest extends GroovyTestCase {\n     def db = null;\n     def str, res, fdf, keys;\n     ByteBuffer buff;\n+\n+    public static final String TEST_DRIVER = 'oracle.jdbc.driver.OracleDriver';\n\n     @Before\n     public void setUp() throws Exception {\n         resource = TestData.genericResource(\"clienp01.info.xml\", this);\n         fdf = new FDFTranslator().readXML(new FileReader(resource));\n         str = FDFTranslator.createStructure(fdf);\n-        db = Sql.newInstance(\"jdbc:oracle:thin:nbquali5/nbquali51@localhost:1521:nb\");\n+        Class.forName(TEST_DRIVER)\n+        System.setProperty(Process.JDBC_DRIVER_PROPERTY, TEST_DRIVER)\n+        db = SqlCursor.newInstance(\"jdbc:oracle:thin:nbquali5/nbquali51@localhost:1521:nb\");\n         def tab = new Table(\"uri_clienp01\");\n \t\tres = new TableBinding(str, tab, db);\n \t\tkeys = new KeyBinding(tab, str, fdf.key.code);\n@@ -65,6 +71,10 @@ public class TableBindingTest extends GroovyTestCase {\n \t\tdef rec = readLast();\n \t\tString query = \"select * from uri_clienp01 where uri=${res.uri}\";\n \t\tdef sqlData = db.firstRow(query);\n+\t\tsqlData.each { k, v ->\n+\t\t\tprintln k + \"->\" + v?.class + \"=\" + v\n+\t\t\t\n+\t\t}\n \t\tassertEquals(sqlData[\"MAJ0H\"], rec[\"MAJ0H\"].value);\n \t\tassertTrue(res.getUnboundColumns().isEmpty());\n \t\tassertTrue(res.getUnboundFields().isEmpty());\n@@ -121,7 +131,7 @@ public class TableBindingTest extends GroovyTestCase {\n \t\t\n \t\tres.selectRange(0, TableInterface.MATCHGEKEY1LEKEY2, start, end);\n \t\tres.select(01);\n-\t\tassertEquals(12, res.rowSet.size());\n+\t\tassertEquals(4, res.queryParams.size());\n \t}\n \t\n \t@Test\ndiff --git a/queryengine/src/ch/viveo/query/mgr/Process.groovy\nb/queryengine/src/ch/viveo/query/mgr/Process.groovy\nindex 9613e2a..5bce4ed 100644\n--- a/queryengine/src/ch/viveo/query/mgr/Process.groovy\n+++ b/queryengine/src/ch/viveo/query/mgr/Process.groovy\n@@ -4,13 +4,13 @@\n package ch.viveo.query.mgr ;\n\n import java.nio.ByteBuffer ;\n-import groovy.sql.Sql;\n import java.sql.Connection;\n\n import ch.viveo.ads_sql.FDFTranslator;\n import ch.viveo.ads_sql.TableInterface;\n\n import ch.viveo.query.*;\n+import ch.viveo.query.sql.SqlCursor;\n\n /**\n  * Handle the lifecycle of PDs (Process Definition) and the resources\nthat map to SQL queries\n@@ -28,6 +28,7 @@ public class Process{\n \tdef dbConnection = null;\n \t\n \tpublic static final String CONNECTION_PROPERTY = \"ch.viveo.db.connect\";\n+\tpublic static final String JDBC_DRIVER_PROPERTY = \"ch.viveo.db.driver\";\n \t\n \tFDFTranslator loader = null;\n \t\n@@ -49,10 +50,13 @@ public class Process{\n \tprivate def getConnection() {\n \t\tif (!dbConnection) {\n \t\t\tString connSpec = System.getProperty(CONNECTION_PROPERTY);\n+\t\t\tString driverName = System.getProperty(JDBC_DRIVER_PROPERTY);\n \t\t\tif (!connSpec)\n \t\t\t\tthrow new IllegalArgumentException(\"$CONNECTION_PROPERTY not set\");\n-\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\"); // TODO setup a\nproper initialization\n-\t\t\tdbConnection = Sql.newInstance(connSpec);\n+\t\t\tif (driverName)\n+\t\t\t\tdbConnection = SqlCursor.newInstance(connSpec, driverName);\n+\t\t\telse\n+\t\t\t\tdbConnection = SqlCursor.newInstance(connSpec);\n \t\t}\n \t\treturn dbConnection;\n \t}\ndiff --git a/queryengine/src/ch/viveo/query/sql/SqlCursor.java\nb/queryengine/src/ch/viveo/query/sql/SqlCursor.java\nnew file mode 100644\nindex 0000000..232ccd3\n--- /dev/null\n+++ b/queryengine/src/ch/viveo/query/sql/SqlCursor.java\n@@ -0,0 +1,149 @@\n+/**\n+ *\n+ */\n+package ch.viveo.query.sql;\n+\n+import java.sql.Connection;\n+import java.sql.DriverManager;\n+import java.sql.ResultSet;\n+import java.sql.SQLException;\n+import java.util.List;\n+import java.util.Properties;\n+\n+import javax.sql.DataSource;\n+\n+import groovy.sql.GroovyResultSet;\n+import groovy.sql.GroovyResultSetProxy;\n+import groovy.sql.Sql;\n+\n+/**\n+ * @author IBM User\n+ *\n+ */\n+public class SqlCursor extends Sql {\n+\n+\t/**\n+\t * @param dataSource\n+\t */\n+\tpublic SqlCursor(DataSource dataSource) {\n+\t\tsuper(dataSource);\n+\t\tsetCacheStatements(true);\n+\t}\n+\n+\t/**\n+\t * @param connection\n+\t */\n+\tpublic SqlCursor(Connection connection) {\n+\t\tsuper(connection);\n+\t\tsetCacheStatements(true);\n+\t}\n+\n+    /**\n+     * Creates a new Sql instance given a JDBC connection URL.\n+     *\n+     * @param url a database url of the form\n+     *            <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>\n+     * @return a new Sql instance with a connection\n+     * @throws SQLException if a database access error occurs\n+     */\n+    public static SqlCursor newInstance(String url) throws SQLException {\n+        Connection connection = DriverManager.getConnection(url);\n+        return new SqlCursor(connection);\n+    }\n+\n+    /**\n+     * Creates a new Sql instance given a JDBC connection URL\n+     * and some properties.\n+     *\n+     * @param url        a database url of the form\n+     *                   <code>\njdbc:<em>subprotocol</em>:<em>subname</em></code>\n+     * @param properties a list of arbitrary string tag/value pairs\n+     *                   as connection arguments; normally at least a\n\"user\" and\n+     *                   \"password\" property should be included\n+     * @return a new Sql instance with a connection\n+     * @throws SQLException if a database access error occurs\n+     */\n+    public static SqlCursor newInstance(String url, Properties\nproperties) throws SQLException {\n+        Connection connection = DriverManager.getConnection(url, properties);\n+        return new SqlCursor(connection);\n+    }\n+\n+    /**\n+     * Creates a new Sql instance given a JDBC connection URL,\n+     * some properties and a driver class name.\n+     *\n+     * @param url             a database url of the form\n+     *                        <code>\njdbc:<em>subprotocol</em>:<em>subname</em></code>\n+     * @param properties      a list of arbitrary string tag/value pairs\n+     *                        as connection arguments; normally at\nleast a \"user\" and\n+     *                        \"password\" property should be included\n+     * @param driverClassName the fully qualified class name of the\ndriver class\n+     * @return a new Sql instance with a connection\n+     * @throws SQLException           if a database access error occurs\n+     * @throws ClassNotFoundException if the class cannot be found or loaded\n+     */\n+    public static SqlCursor newInstance(String url, Properties\nproperties, String driverClassName)\n+            throws SQLException, ClassNotFoundException {\n+        loadDriver(driverClassName);\n+        return newInstance(url, properties);\n+    }\n+\n+    /**\n+     * Creates a new Sql instance given a JDBC connection URL,\n+     * a username and a password.\n+     *\n+     * @param url      a database url of the form\n+     *                 <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>\n+     * @param user     the database user on whose behalf the connection\n+     *                 is being made\n+     * @param password the user's password\n+     * @return a new Sql instance with a connection\n+     * @throws SQLException if a database access error occurs\n+     */\n+    public static SqlCursor newInstance(String url, String user,\nString password) throws SQLException {\n+        Connection connection = DriverManager.getConnection(url,\nuser, password);\n+        return new SqlCursor(connection);\n+    }\n+\n+    /**\n+     * Creates a new Sql instance given a JDBC connection URL,\n+     * a username, a password and a driver class name.\n+     *\n+     * @param url             a database url of the form\n+     *                        <code>\njdbc:<em>subprotocol</em>:<em>subname</em></code>\n+     * @param user            the database user on whose behalf the connection\n+     *                        is being made\n+     * @param password        the user's password\n+     * @param driverClassName the fully qualified class name of the\ndriver class\n+     * @return a new Sql instance with a connection\n+     * @throws SQLException           if a database access error occurs\n+     * @throws ClassNotFoundException if the class cannot be found or loaded\n+     */\n+    public static SqlCursor newInstance(String url, String user,\nString password, String driverClassName) throws SQLException,\n+            ClassNotFoundException {\n+        loadDriver(driverClassName);\n+        return newInstance(url, user, password);\n+    }\n+\n+    /**\n+     * Creates a new Sql instance given a JDBC connection URL\n+     * and a driver class name.\n+     *\n+     * @param url             a database url of the form\n+     *                        <code>\njdbc:<em>subprotocol</em>:<em>subname</em></code>\n+     * @param driverClassName the fully qualified class name of the\ndriver class\n+     * @return a new Sql instance with a connection\n+     * @throws SQLException           if a database access error occurs\n+     * @throws ClassNotFoundException if the class cannot be found or loaded\n+     */\n+    public static SqlCursor newInstance(String url, String\ndriverClassName) throws SQLException, ClassNotFoundException {\n+        loadDriver(driverClassName);\n+        return newInstance(url);\n+    }\n+\n+    public GroovyResultSet rowCursor(String sql, List<Object> params)\nthrows SQLException {\n+    \tResultSet rs = executePreparedQuery(sql, params);\n+    \treturn new GroovyResultSetProxy(rs).getImpl();\n+    }\n+\n+}\ndiff --git a/queryengine/src/nb.sql b/queryengine/src/nb.sql\nindex 277ff44..7c2c875 100644\n--- a/queryengine/src/nb.sql\n+++ b/queryengine/src/nb.sql\n@@ -100,4 +100,8 @@ delete from clienp01 where uri > 1500;\n desc uri_clienp01;\n\n select distinct nom0x from clienp01\n-select uri from clienp01 where nom0x = 'CL99898000'\n\\ No newline at end of file\n+select uri from clienp01 where nom0x = 'CL99898000'\n+\n+alter table uri_clienp01 add  (time timestamp)\n+alter table uri_clienp01 drop column time\n+update uri_clienp01 set time = current_timestamp\n\\ No newline at end of file\n\n\nOn Fri, Aug 14, 2009 at 02:19, Robin\nRosenberg<robin.rosenberg.lists@dewire.com> wrote:\n> f4f9ecd1875938baa42467dfd6a8134d75fe5de4\n"}]}