Bug #77780 CEXT and support for prepared cursor
Submitted: 19 Jul 2015 8:43 Modified: 31 May 2019 22:11
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:2.1.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: capi, cext

[19 Jul 2015 8:43] Daniël van Eeden
Description:
It looks like the C Extension doesn't support prepared statements and gives advice that doesn't work.

When I use con.cursor(Prepared=True):
NotImplementedError: Alternative: Use connection.MySQLCursorPrepared

When I use the suggested con.MySQLCursorPrepared():
AttributeError: 'CMySQLConnection' object has no attribute 'MySQLCursorPrepared'

How to repeat:
Use a 2.1 build with CEXT and try to use prepared statements
[21 Aug 2015 7:45] MySQL Verification Team
Hello Daniel,

Thank you for the report.

Thanks,
Umesh
[29 Dec 2015 23:56] Mykola Ulianytskyi
Python connector (cext) still doesn't support prepared statements :(

We really need this feature because prepared statements provides significant performance boost on repeated queries.

Pure python connector (not cext) has poor performance.

Please add support of prepared statements to python connector (cext).

Thank you
[31 May 2019 22:11] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/Python 8.0.17 release, and here's the changelog entry:

Prepared statement support was added to the C extension's (use_pure=False)
implementation.

Thank you for the bug report.