SIP Router Project
FS#193 - no avpops bigint handling breaks custom select queries
Opened by Walter Doekes (wdoekes) - Monday, 19 December 2011, 10:09 GMT
Last edited by Daniel-Constantin Mierla (miconda) - Thursday, 29 December 2011, 09:18 GMT
If I do this query:
avp_query(”SELECT 1, id, IFNULL(id, 3) FROM sometable WHERE id = 1”, “$avp(val1),$avp(val2),$avp(val3)”);
I expect these values in val1..val3:
However, I get these values:
This is because there is not DB1_BIGINT handling in avpops_db.c. Only the ‘id’ fields gets read correctly, because it is of type integer (32bits).
I’m using avpops.so and db_mysql.so on 3.2.x.
Attached patch fixes that it works. But it won’t fix actual bigint handling for numbers larger than 32bit on systems where sizeof(int) < 8.