Conversation
|
Hey Vsevolod, thanks for looking into this! Do you know when the length of the mediumint type changed, ie in which version of MySQL? If it happened quite recently, perhaps it's worth having a compatibility shim to detect which version of the server we're talking to and adjusting our behaviour accordingly. If the change happened sufficiently long ago, I'd be happy to just state in the documentation for txMySQL that we don't support talking to sufficiently old MySQL servers. My colleague @robhaswell is doing a style review, we'll be happy to merge this once the changes there have been addressed and we have an answer to the question above. Thanks for volunteering your time to work on txMySQL! Cheers, |
It looks like the mediumint field value length was the same in all MySQL versions::
|
The length of the mediumint type has been changed (3->4) accordingly to http://dev.mysql.com/doc/internals/en/binary-protocol-value.html#packet-ProtocolBinary::MYSQL_TYPE_INT24
The test case 1000_mediumint_fix_issue_3 has been added accordingly to user-reported cases.