db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3416) Syntax error on executing "ROLLBACK" statement
Date Thu, 14 Feb 2008 12:47:09 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568914#action_12568914
] 

Bernt M. Johnsen commented on DERBY-3416:
-----------------------------------------

This is not a bug. Commits and rollbacks are handled on the connection level (con.rollback())
and (con.commit()). See e.g. chapter 4.35.7 in the SQL foundation spec (ISO-9075-2). One could
argue that the JDBC driver, for ease-of-use, could intercept the ROLLBACK statement mentioned
and do the rollback on connection level, but that would be in violation of chapter 6.50, General
rules 7a in the SQL CLI spec (ISO-9075-3).

I suggest that this issue is closed.

> Syntax error on executing "ROLLBACK" statement
> ----------------------------------------------
>
>                 Key: DERBY-3416
>                 URL: https://issues.apache.org/jira/browse/DERBY-3416
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>            Reporter: Kirill Volgin
>             Fix For: 10.3.1.4
>
>
> Trying to execute the following code :
>        Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
>         Properties properties = new Properties();
>         properties.setProperty("user","");
>         properties.setProperty("password", "");
>         Connection con = DriverManager.getConnection("jdbc:derby:sample", properties);
>         con.createStatement().execute("ROLLBACK");
> I got the following error:
> java.sql.SQLSyntaxErrorException: Syntax error: Encountered "<EOF>" at line 1,
column 8.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:91)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:202)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:528)
> 	at scriptella.driver.derby.DerbyScriptTest.test(DerbyScriptTest.java:54)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: java.sql.SQLException: Syntax error: Encountered "<EOF>" at line 1,
column 8.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:135)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
> 	... 29 more
> Caused by: ERROR 42X01: Syntax error: Encountered "<EOF>" at line 1, column 8.
> 	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
> 	at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(ParserImpl.java:155)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:280)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:753)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:579)
> 	... 23 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message