[issue43251] sqlite3_column_name() failures should raise MemoryError

2021-02-19 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Well, it returns NULL in case of out of memory, but is it the only cause? Can 
> NULL be returned for other reasons?

According to the SQLite docs, no. Looking at the source code, we see that it 
also returns NULL if the second parameter (column index) is out of range, but 
we already check that. AFAICS, the only reason for a NULL in our case is OOM.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43251] sqlite3_column_name() failures should raise MemoryError

2021-02-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Well, it returns NULL in case of out of memory, but is it the only cause? Can 
NULL be returned for other reasons?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43251] sqlite3_column_name() failures should raise MemoryError

2021-02-19 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
title: sqlite3_column_name() failures should call PyErr_NoMemory() -> 
sqlite3_column_name() failures should raise MemoryError

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com