ashvinmb / sqljet

Automatically exported from code.google.com/p/sqljet
0 stars 0 forks source link

FALSE as default column value can't be parsed. #173

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to execute following create table command:

CREATE TABLE requires (  name TEXT,  flags TEXT,  epoch TEXT,  version TEXT,  
release TEXT,  pkgKey INTEGER , pre BOOLEAN DEFAULT FALSE)

What is the expected output? What do you see instead?

I expected no exception because SQLite 3.6.1 can handle it. I got instead:

CREATE TABLE requires (  name TEXT,  flags TEXT,  epoch TEXT,  version TEXT,  
release TEXT,  pkgKey INTEGER , pre BOOLEAN DEFAULT FALSE)
    at org.tmatesoft.sqljet.core.internal.lang.SqlParser.displayRecognitionError(SqlParser.java:303)
    at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)
    at org.tmatesoft.sqljet.core.internal.lang.SqlParser.column_constraint_default(SqlParser.java:13037)
    at org.tmatesoft.sqljet.core.internal.lang.SqlParser.column_constraint(SqlParser.java:11992)
    at org.tmatesoft.sqljet.core.internal.lang.SqlParser.column_def(SqlParser.java:11708)
    at org.tmatesoft.sqljet.core.internal.lang.SqlParser.create_table_stmt(SqlParser.java:11395)
    at org.tmatesoft.sqljet.core.internal.lang.SqlParser.schema_create_table_stmt(SqlParser.java:1386)
    at org.tmatesoft.sqljet.core.internal.schema.SqlJetSchema.parseTable(SqlJetSchema.java:410)
    at org.tmatesoft.sqljet.core.internal.schema.SqlJetSchema.readShema(SqlJetSchema.java:315)
    at org.tmatesoft.sqljet.core.internal.schema.SqlJetSchema.init(SqlJetSchema.java:168)
    at org.tmatesoft.sqljet.core.internal.schema.SqlJetSchema.<init>(SqlJetSchema.java:154)
    at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine$2.runSynchronized(SqlJetEngine.java:282)
    at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.runSynchronized(SqlJetEngine.java:217)
    at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.readSchema(SqlJetEngine.java:276)
    at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.refreshSchema(SqlJetEngine.java:310)
    at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.getSchemaInternal(SqlJetEngine.java:316)
    at org.tmatesoft.sqljet.core.table.SqlJetDb.getSchema(SqlJetDb.java:183)

What version of the product are you using? On what operating system?
1.1.7

Please provide any additional information below.

Original issue reported on code.google.com by sebastia...@immobilienscout24.de on 18 Mar 2013 at 9:43

GoogleCodeExporter commented 9 years ago

Original comment by sergey.s...@gmail.com on 18 Mar 2013 at 10:15

GoogleCodeExporter commented 9 years ago
Thanks a lot for reporting. It's fixed in 'trunk' SVN repository. 

Please, check it from SVN 'trunk' if it is convenient for you.

Fixed build should be released soon. 

Thanks you.

Original comment by sergey.s...@gmail.com on 19 Mar 2013 at 1:31