Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cursor.executemany() hiding results up to the last one #518

@IlyaFaer

Description

@IlyaFaer

I think we have a bug in Cursor.executemany() method. Given the code it runs Cursor.execute() in a cycle, while execute() is actually replacing result of every previous call with a result from the last one.

So, if we, for example, will call executemany() with several reads, we'll get only results of the last one:

Безымянный

But in fact both reads, with SingerId=12 and with SingerId=15, were executed and we got results.

@c24t, we already have a proposition of how to deal with executemany() in the design doc, PTAL at StreamedManyResultSets section.

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner-django API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions