There might be a problem with the field types, please check that they
are strings, and not blobs. Please send me a "describe trusted" mysql
output.
mysql> desc trusted;
+--------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+-------+
| src_ip | varchar(39) | NO | PRI | NULL | |
| proto | varchar(4) | NO | PRI | NULL | |
| from_pattern | varchar(64) | NO | PRI | NULL | |
+--------------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
Casually, i add a few DBG() calls on 'trusted.c' and now at log see
these messages:
0(0) DEBUG: register_fifo_cmd: new command (trusted_reload) registered
0(0) DEBUG: register_fifo_cmd: new command (trusted_dump) registered
0(0) unixsock_register_cmd: New command (trusted_reload) registered
0(0) unixsock_register_cmd: New command (trusted_dump) registered
0(0) RES_ROWS (row): 135511480
0(0) Number of rows in trusted table: 1
0(0) row: 135511480
0(0) val: 135511648
0(0) val + 1: 135511664
0(0) val + 2: 135511680
0(0) ROW_VALUES (val): 135511648SQL
0(0) ROW_N(row + i): 3
0(0) VAL_TYPE(val), is DB_STRING?: 2
0(0) VAL_TYPE(val + 1), is DB_STRING?: 2
0(0) VAL_TYPE(val + 2), is DB_STRING?: 1
0(0) DB_INT: 0
0(0) DB_DOUBLE: 1
0(0) DB_STRING: 2
0(0) DB_STR: 3
0(0) VAL_NULL(val): 0
0(0) VAL_NULL(val + 1): 0
0(0) VAL_NULL(val + 2): 0
0(0) VAL_STRING(val): 10.124.35.253
0(0) VAL_STRING(val + 1): any
0(0) VAL_DOUBLE(val + 2): 0
0(0) ERROR: permissions: trusted_reload(): Database problem
0(0) release_connection(): Removing connection from the pool
0(0) init_trusted(): Reload of trusted table failed
0(0) Error while initializing allow_trusted function
0(0) init_mod(): Error while initializing module permissions
Seem that VAL_TYPE of "val + 2" isn't STRING, read it as DOUBLE
(DB_DOUBLE = 1).
Do not know why.
And because of this the 'if' conditions never are satisfy on trusted.c
(line #396):
if ((ROW_N(row + i) == 3) &&
(VAL_TYPE(val) == DB_STRING) && !VAL_NULL(val) &&
(VAL_TYPE(val + 1) == DB_STRING) && !VAL_NULL(val
+ 1) &&
(VAL_TYPE(val + 2) == DB_STRING) && !VAL_NULL(val
+ 2)) {
Thank you very much for the debug lines! I think SER simply uses the
field types returned by the mysql server, so there might be a problem
with the server or library. You can check what the field types are along
with their names returned by the server in modules/mysql/res.c, search
for the mysql_fetch_fields function.
Miklos