Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.0.1
-
None
-
None
Description
Connector C break the existing ABI on Win64, by changing parameter type for
mysql_stmt_prepare from 4 byte unsigned long to 8 byte size_t
Here is the definition of mysql_stmt_prepare
https://dev.mysql.com/doc/refman/5.7/en/mysql-stmt-prepare.html
int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *stmt_str, unsigned long length)
here is how it looks like in C/C
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, size_t length)
the immediate problem is that whenever anyone uses special value -1 in his program for the length, and uses mysql ABI, it is not understood correctly by C/C as -1
In 10.2, the server is still using its own mysql ABI-compatible copy of mysql.h (which is another big problem that need correction but I wont expand on it here).
These differences in headers, i.e in ABI, make a seemingly innocent patch like this one
https://github.com/MariaDB/server/commit/24cbc8dae3f94214a752c757fb82fc80faa1d864
fail with obscure error, here
http://buildbot.askmonty.org/buildbot/builders/winx64-debug/builds/2921
There is at least one more similar ABI break for mysql_stmt_send_long_data()