dialup-admin sql table creation error

rgreiner mrgreiner at gmail.com
Thu Jan 17 13:05:34 CET 2008


I was making some tests with the freeradius 2 install, and found that 
the creation schema for the "badusers" table for dialupadmin (in the 
/dialup_admin/sql/mysql folder) has 2 problems:

#
# Table structure for table 'badusers'
#
CREATE TABLE badusers (
  id int(10) DEFAULT '0' NOT NULL auto_increment,
  UserName varchar(30),
  IncidentDate  datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
  Reason varchar(200),
  Admin varchar(30) DEFAULT '-',
  PRIMARY KEY (id),
  KEY UserName (UserName),
  KEY Date (Date)
);

The first is in the 'id' creation line. Starting with version 4.11 (I 
think its this version), MySQL does not accept having a default value 
when you use auto_increment. So, "id int(10) NOT NULL auto_increment" 
would be the correct entry.

The second problem is in the last line. There is a reference to 'Date' 
beeing used as key, but the 'Date' was not created. There is no 
reference creating it. Checking version 1.1.7, the line was " Date  
datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,". Now, was it removed 
because it's no longer used, or was it removed by accident, ir should it 
be renamed to the "IncidentDate" field? I guess it would be the last 
option....

Thanks,

Roberto

-- 
  -----------------------------------------------------
                Marcos Roberto Greiner

   Os otimistas acham que estamos no melhor dos mundos
    Os pessimistas tem medo de que isto seja verdade
                                       Murphy
  -----------------------------------------------------




More information about the Freeradius-Users mailing list