maria-developers team mailing list archive
Mailing list archive
Re: header change in MariaDB 10.2.6 and mysqlclient python binding
On May 24, Kazuhiko Shiozaki wrote:
> Hi !
> First of all, congratulations to MariaDB 10.2 GA.
> mysqlclient (python binding : https://pypi.python.org/pypi/mysqlclient/1.3.10 ) cannot be built with MariaDB 10.2.6 like the following :
> _mysql.c: In function '_mysql_ConnectionObject_ping':
> _mysql.c:1911:41: error: 'MYSQL' has no member named 'reconnect'
> if ( reconnect != -1 ) self->connection.reconnect = reconnect;
Thanks. This is now reported as https://jira.mariadb.org/browse/MDEV-12950
> error: Setup script exited with error: command 'gcc' failed with exit status 1
> This is because the change in include/mysql/mysql.h.
> In MariaDB 10.2.5, it is same as mariadb-10.2.5/include/mysql.h in the source tree.
> In MariaDB 10.2.6, it is same as mariadb-10.2.6/libmariadb/include/mysql.h in the source tree.
> Is this change intentional ? Should I contact mysqlclient developer
> for further fix of this issue ?
Yes, it was intentional, one is supposed to use
mysql_options(mysql, MYSQL_OPT_RECONNECT, ...);
this works both in libmysqlclient and in the new libmariadb and doesn't
depend on the internal MYSQL structure.
The effect of breaking python connector (and perl DBD-mysql) was
unintentional, though. At the moment I don't know what the fix will be -
e.g. we could temporarily restore mysql->reconnect. Or we could submit
patches to python and perl connectors to use MYSQL_OPT_RECONNECT.
Or both. Or something else.
Chief Architect MariaDB