[CONPY-272] Expected value of lastrowid is 0 but returns None Created: 2023-10-17  Updated: 2023-10-18  Resolved: 2023-10-18

Status: Closed
Project: MariaDB Connector/Python
Component/s: Documentation
Affects Version/s: 1.1.7, 1.1.8
Fix Version/s: 1.1.9

Type: Bug Priority: Major
Reporter: Aleks Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None

Python Version: 3.12

 Description   

I don't know if the bug is in the description or in the code but the documentation says that cursor.lastrowid will return zero if there was nothing inserted, but the code clearly shows that it will return None, zero can't possibly be returned from this code.
https://github.com/mariadb-corporation/mariadb-connector-python/blame/v1.1.8/mariadb/cursors.py#L543C25-L543C25



 Comments   
Comment by Georg Richter [ 2023-10-18 ]

Documentation fixed.

Generated at Thu Feb 08 03:31:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.