Bug #112441 cursor.lastrowid for buffered inserts reports id of the buffer's 1st entry,
Submitted: 23 Sep 2023 5:51 Modified: 13 Jul 2024 13:07
Reporter: James Moore Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:8.1.0 OS:Windows
Assigned to: MySQL Verification Team CPU Architecture:Any

[23 Sep 2023 5:51] James Moore
Description:
cursor.lastrowid after cursor.executemany returns the id of the batch's first entry, not the last.

How to repeat:
    def buffered_insert_into_db(self, pieces, sql_str):
        self.buffer.append(pieces)
        if len(self.buffer) >= self.batch_size:
            self.cursor.executemany(sql_str, self.buffer)
            self.conn.commit()
            #
            # bug reports the id of the buffer's first entry
            #
            bug_is = self.cursor.lastrowid
            self.buffer.clear()
[13 Jun 2024 13:07] MySQL Verification Team
Hello James,

Thank you for the bug report. However this is not enough to reproduce the issue.
Please upgrade to latest version and report us back if issue persist even in latest version along with test case. Thank you.

Regards,
Ashwini Patil
[14 Jul 2024 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".