Skip to content

Statement Cache causes ORA-00932 #1669

@sosoba

Description

@sosoba
  1. What versions are you using?
  • database: 19.10.0.0.0
  • platform: win32
  • node: 20.13.0
  • oracledb: 6.5.0
  • oracleClientVersionString: undefined (thin)
  1. Is it an error or a hang or a crash?
    crash

  2. What error(s) or behavior you are seeing?

Error: ORA-00932: inconsistent datatypes: expected NUMBER got TIMESTAMP
Help: https://docs.oracle.com/error-help/db/ora-00932/
    at Protocol._processMessage (./node_modules/oracledb/lib/thin/protocol/protocol.js:177:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ThinConnectionImpl._execute (./node_modules/oracledb/lib/thin/connection.js:200:7)
    at async ThinConnectionImpl.execute (./node_modules/oracledb/lib/thin/connection.js:880:14)
    at async Connection.execute (./node_modules/oracledb/lib/connection.js:900:16)
    at async Connection.<anonymous> (./node_modules/oracledb/lib/util.js:165:14)
    at async test.js
  1. Include a runnable Node.js script that shows the problem.
const sql = 'SELECT :x FROM DUAL';
await connection.execute( sql, [1] );  
await connection.execute( sql, [new Date()] );  

Perhaps parameter types shouldn't be part of the cache key?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions