Today we released MySQL Connector/Python v1.0.9. Release notes can be found in the MySQL Developver Zone.
Connector/Python v1.0.9 contains some important fixes, especially for the Windows platform. It also comes with a new connection argument called force_ipv6
, and can be used to force IPv6 when an address resolves to both IPv4 and v6. Also, RPM packages have been made available in addition to the TAR/ZIP and MSI packages.
Please use the MySQL Bugs website to report any problem.
Some useful links:
- Documentation: http://dev.mysql.com/doc/connector-python/en/index.html
- Release Notes: http://dev.mysql.com/doc/relnotes/connector-python/en/index.html
- Downloads: http://dev.mysql.com/downloads/connector/python/#downloads
- Feedback: http://bugs.mysql.com
- Forum: http://forums.mysql.com/list.php?50
Enjoy!
Comments
Hi Geert,
mysql-connector-python dose not support last_insert_id yet, right? I could not find any function about it in refman.
Thanks,
@zhang It is.. indeed not in the documentation. That’s something we need to fix. However, it is part of PEP-249, and it is a cursor property called ‘lastrowid’
Example:
ya..it is cool
this afternoon I also tried lastrowid like MySQLdb. It is excited to me that SHE is already there :P rowcount is also available even though it is yet to document.
thanks,
sorry…many questions
I am puzzled about with_rows. “This read-only property will return True when the result of the executed operation provides rows.” -- from RefMan But, as follow is :
query = (“select name from test_innodb where age > 100”) ## empty rows
for result in cur.execute(query): if result.with_rows: print (“Statement: {0}“.format(result.statement))
I found result.with_rows was always True if query is just SELECT statement whose result is empty or not.
Thanks,
@zhang Blog is not a place for discussions. Please use the MySQL forums: http://forums.mysql.com/list.php?50
Note that ‘with_rows’ means that the query you execute could return rows. It doesn’t mean it ‘has rows’. It is meant to distinct between SELECT and INSERT for example.