2019

Dotnet Parser Throws Exception

General SQL Parser .NET version

We have have confirmed, that the issue appears strictly only with .NET framework 4.6.1586.0, but happens just sometimes.

With the higher .NET framework 4.7.2053.0 all works fine.

2019-10-02 14:02:56,506 ERROR [11] ParserBase:0 Failed to parse vendor MsSql sql string 
CREATE TABLE COPS_ZT (
                                REC_ID     BIGINT IDENTITY NOT NULL,
                                REF_REC_ID BIGINT NOT NULL,
                                REC_DATE DATETIME2 NOT NULL,
                                REC_STATUS       NUMERIC NOT NULL,
                                REC_ERROR        NVARCHAR(255),
                                ZT_CREATION_USER NVARCHAR(255),
                                ZT_CREATION_DATE DATETIME2)
2019-10-02 14:02:56,513 ERROR [11] ParserBase:0 System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Collections.Generic.Dictionary`2.Resize(Int32 newSize, Boolean forceNewHashCodes)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at gudusoft.gsqlparser.nodes.TTypeName.searchTypeByName(String typenameStr)
   at gudusoft.gsqlparser.nodes.TTypeName.set_DataTypeByToken(TSourceToken value)
   at gudusoft.gsqlparser.nodes.TTypeName.setDataTypeInTokens()
   at gudusoft.gsqlparser.TParserMssqlSql.yyaction(Int32 yyruleno)
   at gudusoft.gsqlparser.TParserMssqlSql.yyparse()
   at gudusoft.gsqlparser.TCustomSqlStatement.dochecksyntax(TCustomSqlStatement psql)
   at gudusoft.gsqlparser.TCustomSqlStatement.parsestatement(TCustomSqlStatement pparentsql, Boolean isparsetreeavailable)
   at gudusoft.gsqlparser.TGSqlParser.doparse()
   at CopsDatabasePatcher.SqlParser.SqlParser.Parse(String sql, DatabaseSystem system)
2019-10-02 14:02:56,522 ERROR [11] ParserBase:0 SQL 'CREATE TABLE COPS_ZT (
                                REC_ID     BIGINT IDENTITY NOT NULL,
                                REF_REC_ID BIGINT NOT NULL,
                                REC_DATE DATETIME2 NOT NULL,
                                REC_STATUS       NUMERIC NOT NULL,
                                REC_ERROR        NVARCHAR(255),
                                ZT_CREATION_USER NVARCHAR(255),
                                ZT_CREATION_DATE DATETIME2)' cannot be parsered! Reason 

Code to produce this error:

Back to Top ↑

2018

General SQL Parser Java version 1.9.5.5 released (2018-10-22)

  • GSP Java version 1.9.5.5(2018-10-21)
    • [Oracle] able to recognize and parser noneditionable trigger
    • [Teradata] support at time zone clause of DATE datatype.
    • [Teradata] support with return only clause in declare cursor statement.
    • [SQL Server] support OBJECT:: in grant statement.
    • [SQL Server] support xmlnamespaces clause used together with CTE.

General SQL Parser dotnet version 3.2.7.2 released (2018-10-22)

  • dotnet version 3.2.7.2(2018-10-21)
    • [SQL Server] support NO_PERFORMANCE_SPOOL, MIN_GRANT_PERCENT, HINT_MAX_GRANT_PERCENT
    • [API] add new enum elements: EQueryHint.E_QUERY_HINT_NO_PERFORMANCE_SPOOL, E_QUERY_HINT_MIN_GRANT_PERCENT, E_QUERY_HINT_MAX_GRANT_PERCENT
    • [SQL Server/scriptWriter] support call target expression of function call.
    • [Oracle] able to recognize create or repleace context statement.
    • [DB2] able to link column in call statement to table of create trigger statement.
  • dotnet version 3.2.7.1(2018-10-09)
    • [SQL Server] Doesn’t treat [DATE] as a regular column name.
  • dotnet version 3.2.7.1(2018-10-08)
    • [API] TTypeName.isCharUnit(), TTypeName.ByteUnit is no longer used, replaced by TTypeName.charUnitToken
    • [Oracle] able to get label name after loop/while statement.
    • [Oracle] support on null clause in default clause.
    • [API] add new property: TColumnDefinition.onNull
  • dotnet version 3.2.7.0(2018-10-08)
    • [sql formatter] Able to format subquery or CASE statement inside of CAST function.
  • dotnet version 3.2.6.9(2018-10-03)
    • [API] add new property: TColumnDefinition.persistedColumn.
    • [SQL Server] able to get persisted information from column definition.
    • [API] add new property: TColumnDefinition.filestream.
    • [SQL Server] support FILESTREAM keyword in create table.
    • [API] add new property: TColumnDefinition.sparseColumn.
    • [SQL Server] Able to get SPARSE column information from TColumnDefinition.
  • dotnet version 3.2.6.8(2018-09-28)
    • [MySQL] Able to get comment/KEY_BLOCK_SIZE/parser name index option in MySQL create index statement.
    • [API] TMySQLIndexOption.indexOptionType
    • [API] add new enum: EIndexOptionType
    • [API] add new property : TCreateIndexSqlStatement.IndexOptionList to access index option of MySQL create index statement.
    • [SQL Server] able to fetch include column list from create index statement.

General SQL Parser Java version changelog 2018-08-01

version history of general sql parser:

  • GSP Java version 1.9.4.4(2018-08-22)
    • [API] Add new method TSourceToken TSourceToken.nextSolidToken(boolean treatCommentAsSolidToken)
    • [API] Add new method TSourceToken TSourceToken.prevSolidToken(boolean treatCommentAsSolidToken)

General SQL Parser .NET version changelog 2018-08-01

  • dotnet version 3.2.5.6(2018-08-01)
    • [Oracle] fix a bug can’t parse plsql block not ended by a semicolon.
    • [general] avoid System.ArgumentNullException when call isvalidsqlpluscmd().
  • dotnet version 3.2.5.6(2018-07-27)
    • [scriptWriter] fix a bug when new TObjectName with object and part source token.
    • [API] add new method: TSourceToken.toScript()
Back to Top ↑