Bugzilla Version 2.16.7
Bugzilla Bug 1814
  Question marks in OQL WHERE string constants
     Query page      Enter new bug
Bug#: 1814   Platform:   Reporter: martin-fuchs at gmx dot net (Martin Fuchs)
Product:   OS:   Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: CLOSED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: werner dot guttmann at gmx dot net (Werner Guttmann)   Target Milestone:  

Attachment Type Modified Status Actions
proposed patch including test case patch 2004-12-04 06:19 none Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 1814 depends on: Show dependency tree
Show dependency graph
Bug 1814 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments:

Reopen bug

View Bug Activity   |   Format For Printing

Description: Opened: 2004-12-04 06:18

As found in the discussions about bug 1540, there is a problem parsing OQL 
WHERE clauses containing string or character constants including question mark 
("?") characters. It results in this exception, because this character is 
misunderstood as bind variable place holder:

java.lang.ArrayIndexOutOfBoundsException: 0
 at org.exolab.castor.util.SqlBindParser.bindJdbcValues(SqlBindParser.java:237)
 at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.execute(SQLEngine.java:1766)
 at org.exolab.castor.persist.TransactionContext.query
 at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:474)

------- Additional Comment #1 From Martin Fuchs 2004-12-04 06:19 -------
Created an attachment (id=802)
proposed patch including test case

------- Additional Comment #2 From Werner Guttmann 2004-12-04 10:01 -------
Patch applied as submitted.

     Query page      Enter new bug
This is Bugzilla: the Mozilla bug system. For more information about what Bugzilla is and what it can do, see bugzilla.org.
Actions: New | Query | bug # | Reports   New Account | Log In