Closed
Bug 482775
Opened 17 years ago
Closed 10 years ago
bindUTF8StringParameter fails silently when it does not like SQL string
Categories
(Core Graveyard :: SQL, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: titusstahl+bugzilla, Assigned: janv)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.10 (intrepid) Firefox/3.0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.10 (intrepid) Firefox/3.0.7
When bindUTF8StringParameter does not like an SQL string, it fails silently aborting a seemingly correct code path without any visible error message.
Reproducible: Always
Steps to Reproduce:
1. Execute the following JS code (within an extension, after appropriate setup etc.)
var statement = mDBConn.createStatement("INSERT INTO tasks (id, title, status, project, context) VALUES ('?1','?2','?3','?4','?5')");
statement.bindUTF8StringParameter(0, var1);
statement.bindUTF8StringParameter(1, var2);
statement.bindInt32Parameter(2, var3);
statement.bindUTF8StringParameter(3, var4);
statement.bindUTF8StringParameter(4, var5);
alert("Finished building SQL");
statement.execute();
Actual Results:
The alert is never fired. No exception or error is shown in the error console. It only works when the SQL string is formed like "... VALUES (?1, ?2, ...."
Expected Results:
Either this should work and the alert should be fired or there should be a visible failure. Otherwise one is forced to guess what is wrong with a seemingly correct SQL string. Or at least this should be documented.
Comment 1•10 years ago
|
||
The SQL extension and component are no longer active.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INCOMPLETE
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•