GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Invalid affected_row count on multiple statements (regression in 1.10.7) · Issue #44 · FirebirdSQL/python3-driver

Invalid affected_row count on multiple statements (regression in 1.10.7) #44

New issue
Copy link
New issue
Copy link
Closed
Closed
Invalid affected_row count on multiple statements (regression in 1.10.7)#44
Copy link

Description

@Fred-si
Fred-si
opened on Jan 2, 2025
Issue body actions

Hi.

I have try to update firebird driver to 1.10.8 on a project that use SQLAlchemy and I got exceptions due to invalid row count on update statement (more affected row than expected).

After investigation, I have found this line that make a sum of all values returned by get_info, but the dict returned by get_info contain values for previously executed statements when execute is called multiple times with different operations (select, insert, update, delete).
Example, when insert rows and then update rows (same or other)

cur.execute("insert into project (proj_id, proj_name) values ('FOO', 'BAR')")
cur.execute("update project set proj_name = 'RAB' where proj_id = 'FOO'")
cur.fetchone()
            
# here, expected that cur.affected_rows is 1, but is value is 2

It is possible to find a test that reproduce this behavior here master...Fred-si:firebird-driver:invalid-row-count

Regression appear in release 1.10.7

Activity

  1. pcisar
    closed this as completedin 2543217on Jan 3, 2025
  2. Fred-si commented on Jan 6, 2025

    @Fred-si
    Fred-si
    on Jan 6, 2025
    ContributorAuthor
    More actions

    Thank you for the quick resolution of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.