Bug #80135 examples/inserts.py contains invalid SQL statement
Submitted: 25 Jan 2016 8:04 Modified: 9 May 2022 21:55
Reporter: William ZHANG Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:2.1, 2.1.3 OS:Any
Assigned to: CPU Architecture:Any

[25 Jan 2016 8:04] William ZHANG
Description:
Run the sample program inserts.py and it will raise an error:

mysql.connector.errors.ProgrammingError: 1101 (42000): BLOB/TEXT column 'info' can't have a default value

The source line is:

https://github.com/mysql/mysql-connector-python/blob/master/examples/inserts.py#L51

How to repeat:
./inserts.py

Suggested fix:
Remove the default value for BLOB column or use DEFAULT NULL.
[25 Jan 2016 8:08] William ZHANG
The same problem exists in https://github.com/mysql/mysql-connector-python/blob/master/examples/multi_resultsets.py .
[25 Jan 2016 8:16] MySQL Verification Team
Hello William,

Thank you for the report.

Thanks,
Umesh
[5 May 2022 13:21] Nuno Mariz
Posted by developer:
 
Fixed by WL#14634 in release 8.0.26. Thank you for the bug report.
[9 May 2022 21:55] Philip Olson
Posted by developer:
 
Thank you William for the bug report, looks like this bug report was lost/forgotten over time but has since been fixed (in v8.0.26). Thanks for the bug report!