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 sir-sigurd
Recipients sir-sigurd
Date 2018-07-05.10:34:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za>
In-reply-to
Content
In [1]: import sqlite3

In [2]: con = sqlite3.connect(':memory:')

In [3]: con.execute('SELECT f()')
---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-3-e3bab2096896> in <module>()
----> 1 con.execute('SELECT f()')

OperationalError: no such function: f

In [4]: con.create_function('f', 0, [])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-452e7d2028ac> in <module>()
----> 1 con.create_function('f', 0, [])

TypeError: unhashable type: 'list'

In [5]: con.execute('SELECT f()')
---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-5-e3bab2096896> in <module>()
----> 1 con.execute('SELECT f()')

OperationalError: user-defined function raised exception


It seems that something like this cause segmentation fault, but I can't reproduce it.
Some other similar sqlite functions also affected. They can be easily modified to accept unhashable objects, but probably it should be done in another issue.
History
Date User Action Args
2018-07-05 10:34:47sir-sigurdsetrecipients: + sir-sigurd
2018-07-05 10:34:47sir-sigurdsetmessageid: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za>
2018-07-05 10:34:47sir-sigurdlinkissue34052 messages
2018-07-05 10:34:47sir-sigurdcreate