Operational Error 1265 throws exception

Asked by spencer rathbun

I have switched from using the mysqldb connector with sqlalchemy to mysqlconnector with sqlalchemy.

With one of my tables, many of the fields would be truncated with the mysqldb connector, and I would get a warning. But the data would insert as strict mode is turned off. After switching, I now get an exception which bubbles up, and causes a transaction rollback.

Why is mysqlconnector throwing this exception even though strict mode is off?

Question information

Language:
English Edit question
Status:
Solved
For:
MySQL Connector/Python Edit question
Assignee:
No assignee Edit question
Solved by:
spencer rathbun
Solved:
Last query:
Last reply:
Revision history for this message
spencer rathbun (srathbun) said :
#1

I've found what's causing it, it's line 484 in the cursor.py file.

Apparently, sqlalchemy is leaving the default of raise_on_warnings to True. So, instead of continuing, it throws an exception and quits.

Since sqlalchemy has control over this, I will be adjusting it from that end.