Julien Palard added the comment:
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.
----------
nosy: +mdk
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28729>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com