Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-23793

Simba driver throws syntax Error on reused Perpared Query.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • bug-backlog
    • 5.0.0
    • query_drivers
    • None
    • Untriaged
    • Unknown

    Description

      In the code if we create a prepare statement once and reuse it, it does not work . It throws following error

      Exception in thread "main" java.sql.SQLException: [Simba][CouchbaseJDBCDriver](500210) Execute update fail, executeupdate fail. Code: 3000, message syntax error - at INTO
      at com.simba.couchbase.utils.CBQueryUtils.buildServerErrorMessage(CBQueryUtils.java:114)
      at com.simba.couchbase.core.CBClient.executeUpdate(CBClient.java:317)
      at com.simba.couchbase.dataengine.resultset.CBWriteResultSet.execute(CBWriteResultSet.java:1332)
      at com.simba.couchbase.dataengine.resultset.CBWriteResultSet.onFinishDMLBatch(CBWriteResultSet.java:675)
      at com.simba.sqlengine.executor.etree.relation.ETTable.onFinishDMLBatch(Unknown Source)
      at com.simba.sqlengine.executor.etree.statement.ETInsert.endBatch(Unknown Source)
      at com.simba.sqlengine.executor.StatementExecutor.endBatch(Unknown Source)
      at com.simba.sqlengine.dsiext.dataengine.SqlQueryExecutor.execute(Unknown Source)
      at com.simba.jdbc.common.SPreparedStatement.executeWithParams(Unknown Source)
      at com.simba.jdbc.common.SPreparedStatement.executeUpdate(Unknown Source)
      Caused by: com.simba.support.exceptions.GeneralException: [Simba][CouchbaseJDBCDriver](500210) Execute update fail, executeupdate fail. Code: 3000, message syntax error - at INTO

      If we change it with following  it works

      for(int j =1; j <=11 ; j++) {
      preparedStatement = con.prepareStatement(selectSQL);  >> Creating prepare statement every time
      preparedStatement.setString(1, "p11190"+ String.valueOf(j));

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chinhong Chin Hong
            sandip.nandi Sandip Nandi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty