Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

Did some debugging here. If I am understanding this correctly the rowcount is 
set at 
https://github.com/python/cpython/blob/b8e689a6e8134e88f857a55e50b6a4977967e385/Modules/_sqlite/cursor.c#L574
 . It checks for is_dml flag that is set here 
https://github.com/python/cpython/blob/b8e689a6e8134e88f857a55e50b6a4977967e385/Modules/_sqlite/statement.c#L78

The part to set is_dml skips space, tabs and newline and checks for the first 
set of characters that is not skipped to be insert, update, delete or replace 
and in this case the first set of characters to be matched will be "/* 
watermarking */". Thus with comment not matching, is_dml is not set and -1 is 
set for the rowcount.

----------
versions: +Python 3.7, Python 3.8

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

Reply via email to