Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
2.3.2
-
None
-
None
Description
The current document said that that option can accept following as param:
NULL or (void *)"1"
But in 2.3.2 source code file libmariadb.c:3046,
mysql->reconnect= *(uint *)arg1;
where uint is unsigne int, which consume 4 bytes, and there is no NULL check for arg1.
And in 3.0.1 source code file mariadb_lib.c:2650,
mysql->options.reconnect= *(my_bool *)arg1;
where my_bool is a char type, which consume 1 byte, and there is no NULL check for arg1.
Please correct the document AND please also document the type change (uint -> char) since version 3.0.1, as old code which use "*(uint *)arg1 == 1" won't equal to "*(char *)arg1 == 1" in Big Endian arch.