db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r499299 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java
Date Wed, 24 Jan 2007 07:51:43 GMT
Author: kristwaa
Date: Tue Jan 23 23:51:42 2007
New Revision: 499299

URL: http://svn.apache.org/viewvc?view=rev&rev=499299
Log:
DERBY-2103: (workaround) After a Lexical Error due to syntax error, even a simple create table
does not work on the same connection.

Patch contributed by Mayuresh Nirhali.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java?view=diff&rev=499299&r1=499298&r2=499299
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java Tue
Jan 23 23:51:42 2007
@@ -156,6 +156,15 @@
 		}
 		catch (TokenMgrError e)
 		{
+			// Derby - 2103.
+			// When the exception occurs cachedParser may live with
+			// some flags set inappropriately that may cause Exception
+			// in the subsequent compilation. This seems to be a javacc bug.
+			// Issue Javacc-152 has been raised.
+			// As a workaround, the cachedParser object is cleared to ensure
+			// that the exception does not have any side effect.
+			// TODO : Remove the following line if javacc-152 is fixed.
+			cachedParser = null;
 		    throw StandardException.newException(SQLState.LANG_LEXICAL_ERROR, e.getMessage());
 		}
 	}



Mime
View raw message