This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mdk
Recipients inglesp, mdk
Date 2016-11-18.00:02:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479427369.87.0.527575508688.issue28729@psf.upfronthosting.co.za>
In-reply-to
Content
Problems looks from `Modules/_sqlite/statement.c`:

```
if (!_need_adapt(current_param)) {
    adapted = current_param;
} else {
    adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)&pysqlite_PrepareProtocolType, NULL);
    if (adapted) {
        Py_DECREF(current_param);
    } else {
        PyErr_Clear();
        adapted = current_param;
    }
}
```

It has not changed since 2006, since e200ab5b3e (backport from pysqlite2 SVN repository).

I read it as "If an parameter needs an adapter, and the adapter fails, that's OK, continue with the original (unadapted) parameter.", which looks wrong to me, but I may miss something obvious? I tried to set an error instead of restoring the `current_param` and the 261 tests went well, but I'm not yet aware of the coverage of adapters in tests.
History
Date User Action Args
2016-11-18 00:02:49mdksetrecipients: + mdk, inglesp
2016-11-18 00:02:49mdksetmessageid: <1479427369.87.0.527575508688.issue28729@psf.upfronthosting.co.za>
2016-11-18 00:02:49mdklinkissue28729 messages
2016-11-18 00:02:49mdkcreate