Schema change advisable for MySQL in 2.2.x and 3.0.x
Hi, I just got a funny accounting ticket which made my radsqlrelay hang in a stuck position again. The issue was: Acct-Session-Time = 2152442406 While in range for RADIUS unsigned 32 bit integers, the number itself is total nonsense of course, but there's nothing I can do about people sending syntactically correct garbage. The MySQL schema defines the column for acctsessiontime as acctsessiontime int(12) default NULL, which is a SIGNED integer, and for which the above number is an overflow. [1] It would be much more useful to define the schema as acctsessiontime int(12) unsigned default NULL, which would make the allowed ranges of the datatypes of RADIUS and MySQL schema be in sync. Greetings, Stefan Winter [1] https://dev.mysql.com/doc/refman/5.5/en/integer-types.html -- Stefan WINTER Ingenieur de Recherche Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche 6, rue Richard Coudenhove-Kalergi L-1359 Luxembourg Tel: +352 424409 1 Fax: +352 422473 PGP key updated to 4096 Bit RSA - I will encrypt all mails if the recipient's key is known to me http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0DE6A358A39DC66
Stefan Winter wrote:
The MySQL schema defines the column for acctsessiontime as
acctsessiontime int(12) default NULL,
which is a SIGNED integer, and for which the above number is an overflow. [1]
It would be much more useful to define the schema as
acctsessiontime int(12) unsigned default NULL,
which would make the allowed ranges of the datatypes of RADIUS and MySQL schema be in sync.
I've pushed a fix. Alan DeKok.
participants (2)
-
Alan DeKok -
Stefan Winter