Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-1864

TIMESTAMPADD of SQL_TSI_FRAC_SECOND fails for Sybase 15 with JConnect 6.0.5 driver

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Done
    • 7.6
    • 7.7, 8.0
    • Query Engine
    • None

    Description

      Executing this query:
      SELECT intkey, timestampvalue, TIMESTAMPADD(SQL_TSI_FRAC_SECOND,123,TIMESTAMPVALUE) FROM BQT1.SMALLA WHERE INTKEY < 10 ORDER BY INTKEY

      errors in the following fashion:
      [JDBCExecutionException] 0: Error Code:0 Message:'JZ0SI: A static function escape timestampaddsql_tsi_frac_second was used which is not supported by this server.' error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.IntKey AS c_0, g_0.TimestampValue AS c_1,

      {fn timestampadd(SQL_TSI_FRAC_SECOND, 123, g_0.TimestampValue)}

      AS c_2 FROM SmallA g_0 WHERE g_0.IntKey < 10 ORDER BY c_0]
      1 [SQLException]JZ0SI: A static function escape timestampaddsql_tsi_frac_second was used which is not supported by this server.
      at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:90)
      at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:272)
      at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:342)
      at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:138)
      at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:135)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:118)
      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)
      at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)
      at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.sql.SQLException: JZ0SI: A static function escape timestampaddsql_tsi_frac_second was used which is not supported by this server.
      at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybStatement.processEscapes(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybStatement.doEscapeProcessing(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybPreparedStatement.<init>(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:465)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:460)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:243)
      at org.teiid.translator.jdbc.JDBCBaseExecution.getPreparedStatement(JDBCBaseExecution.java:172)
      at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:84)
      ... 13 more

      Executing the same query using the JTDS 1.2.5 driver works correctly.

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            pnittel_jira Paul Nittel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: