Message281068
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. |
|
Date |
User |
Action |
Args |
2016-11-18 00:02:49 | mdk | set | recipients:
+ mdk, inglesp |
2016-11-18 00:02:49 | mdk | set | messageid: <1479427369.87.0.527575508688.issue28729@psf.upfronthosting.co.za> |
2016-11-18 00:02:49 | mdk | link | issue28729 messages |
2016-11-18 00:02:49 | mdk | create | |
|