New submission from Thomas Kluyver <tak...@gmail.com>:

When using sqlite3 with the Turkish locale, cursor.lastrowid is not accessible 
after an insert statement if "INSERT" is upper case.

I believe that the cause is that the detect_statement_kind function [1] calls 
the locale-dependent C function tolower(). The Turkish locale specifies a 
different case mapping for I (to a dotless lowercase i: ı), so it's not 
recognised as an insert statement, which looks like it will cause the 
transaction to be committed immediately.

See also the discussion on issue 1813 [2], and a Redhat bug with a test case 
for this [3].


[1] http://hg.python.org/cpython/file/c4b6d9312da1/Modules/_sqlite/cursor.c#l41
[2] http://bugs.python.org/issue1813
[3] https://bugzilla.redhat.com/show_bug.cgi?id=720209

----------
components: Extension Modules
messages: 144873
nosy: takluyver
priority: normal
severity: normal
status: open
title: Sqlite3 & turkish locale
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13099>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to