Done a few minor tests here, to see what does and what does not trigger the problem.
These trigger the problem:
[...]
Using #define prv "connect_options"; Does not appear to trigger the problem.
Sounds like the presence of the string "connect_options" in the string table causes the problem.
My guess is that you're using a pike 7.4 from before 2008-03-21, when I did the following patch to mysql.c:
---------------------------- revision 1.84 date: 2008/03/21 17:35:52; author: grubba; state: Exp; lines: +4 -3 Fixed NULL-dereference. ----------------------------
*************** *** 359,365 **** socket = PIKE_MYSQL->socket; PIKE_MYSQL->socket = NULL;
! if ((val = simple_mapping_string_lookup(PIKE_MYSQL->options, "connect_options")) && (val->type == T_INT) && (val->u.integer)) { options = (unsigned int)val->u.integer; --- 359,366 ---- socket = PIKE_MYSQL->socket; PIKE_MYSQL->socket = NULL;
! if (PIKE_MYSQL->options && ! (val = simple_mapping_string_lookup(PIKE_MYSQL->options, "connect_options")) && (val->type == T_INT) && (val->u.integer)) { options = (unsigned int)val->u.integer;
simple_mapping_string_lookup() doesn't even look at the mapping if the string isn't in the string table.
Tested on Red Hat Enterprise Linux ES release 4 (Nahant Update 2).
Hope this helps.
Regards,
Arjan
/grubba