On 01.10.18 09:35, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
It is the same case -- the database schema defined unsigned types of columns although internally only signed types were supported. This works fine as long as the value inserted in the database is a positive integer (not a negative integer).
I don't have any negative values in any of the lcr tables.
That was the reason that all worked fine so far.
But as soon as a value goes negative, things get broken. For example, with the modules storing expire/lifetime (e.g., usrloc, dialog) being timestamp + interval, if interval is very long, then the value goes over mid of UNSIGNED, practically becoming negative when using DB1_INT to send to db insert command, and mysql will store 0.
This made it necessary to introduce unsigned types in DB API, and it seems some modules need to be updated to deal with it because their database schema used UNSIGNED when the code didn't actually supported that. So it is an issue existing for long time, but revealed recently as timestamp value got higher and going to be over max signed int. It was also discussed before the summer in the last IRC devel meeting.
This update with new database types DB1_UINT and DB1_UBIGINT started on Friday. I expected that only insert/updates with high values to be affected, but it seems that loading is also hit.
We will work further on it.
Cheers, Daniel
-- Juha
Will review all database table definitions and update accordingly. Once is finished, I will post an update.
Cheers, Daniel
On 01.10.18 08:59, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
This was related to adding support for UNSIGNED types. So far we had only signed types in DB API, but latest MySQL version is inserting 0 without any error when the actual value is a signed negative value.
Should be fixed now in latest master, try with it and see if all fine now.
I built K again and got a new error:
Oct 1 09:55:37 char /usr/bin/sip-proxy[18235]: ERROR: lcr [lcr_mod.c:1047]: insert_gws(): lcr_gw id at row <0> is null or not int Oct 1 09:55:37 char /usr/bin/sip-proxy[18235]: CRITICAL: lcr [lcr_mod.c:759]: mod_init(): failed to reload lcr tables Oct 1 09:55:37 char /usr/bin/sip-proxy[18235]: ERROR: <core> [core/sr_module.c:890]: init_mod(): Error while initializing module lcr (/usr/lib/x86_64-linux-gnu/sip-proxy/modules/lcr.so) Oct 1 09:55:37 char /usr/bin/sip-proxy[18235]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
This starts to get serious.
-- Juha
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference -- www.kamailioworld.com Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com