The text gives examples how to enable/disable LOAD LOCAL DATA INFILE
mysql_optionsv(mysql, MYSQL_OPT_LOCAL_INFILE, NULL); /* disable */
mysql_optionsv(mysql, MYSQL_OPT_LOCAL_INFILE, (void )"1"); / enable */
while looking at the code,
it's obvious, that NULL value enables, and not disables "LOAD LOCAL DATA INFILE". More over, the value is expected to be pointer to unsigned int, and pointed value is tested as boolean value, while manual page has string "1" as the example of how to enable.
Given all that, I guess it can be also considered a bug in the connector, and not only in documentation, and it should be
if (!arg1 || !test((unsigned int) arg1))
so NULL and 0 have the same effect - disable LOCAL DATA, and that will be in line with current documentation and more logically consistent.
It seems also, that the value pointed by arg1 is also important, and it's not only true/false, since LOCAL_INFILE_MODE_AUTO has value 2.
#define LOCAL_INFILE_MODE_OFF 0
#define LOCAL_INFILE_MODE_ON 1
#define LOCAL_INFILE_MODE_AUTO 2
#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_AUTO