-
- Downloads
From Oliver Freyermuth: Fix a small issue in TSQLiteStatement
Fix Jira issue #ROOT-6511 TSQLiteStatement: Missing / wrong check for column index, failing IsNull(), as reported by Oliver Freyermuth: Finally, my colleagues managed to uncover a small issue in my TSQLiteStatement implementation: "IsNull()" checked the column-count in the wrong way (it used the number of bound columns which is only valid in prepared inserts). I have done the following changes to TSQLiteStatement in the attached patch: 1. In fNumPars, I now store either the "bind" columns for a prepared statement with bound parameters, or the number of returned columns for a simple select without binding. This also simplifies error handling and TSQLiteStatement::GetNumFields() now just returns the variable which is correct in both working modes. 2. All Get'ters now check the column-number consistently, as the SQLite-documentation states that "get"ting an invalid column number returns undefined results. Note that for bound parameters, SQLite behaves differently and does the error handling itself (which I already check in TSQLiteStatement).
Loading
Please register or sign in to comment