DSpam MySQL Driver


From Docunext Technology Wiki

Jump to: navigation, search

MySQL files from Debian source package

# Tables for mysql
create table dspam_token_data (
  uid smallint unsigned not null,
  token bigint unsigned not null,
  spam_hits int not null,
  innocent_hits int not null,
  last_hit date not null
) type=MyISAM PACK_KEYS=1;

create unique index id_token_data_01 on dspam_token_data(uid,token);

create table dspam_signature_data (
  uid smallint unsigned not null,
  signature char(32) not null,
  data blob not null,
  length smallint not null,
  created_on date not null
) type=MyISAM max_rows=2500000 avg_row_length=8096;

create unique index id_signature_data_01 on dspam_signature_data(uid,signature);create index id_signature_data_02 on dspam_signature_data(created_on);

create table dspam_stats (
  uid smallint unsigned primary key,
  spam_learned int not null,
  innocent_learned int not null,
  spam_misclassified int not null,
  innocent_misclassified int not null,
  spam_corpusfed int not null,
  innocent_corpusfed int not null,
  spam_classified int not null,
  innocent_classified int not null
) type=MyISAM;

create table dspam_preferences (
  uid smallint unsigned not null,
  preference varchar(32) not null,
  value varchar(64) not null
) type=MyISAM;

create unique index id_preferences_01 on dspam_preferences(uid, preference);

# Create the virtual users table.
create table dspam_virtual_uids (
  uid smallint unsigned primary key AUTO_INCREMENT,
  username varchar(128)
) type=MyISAM;

create unique index id_virtual_uids_01 on dspam_virtual_uids(username);
mysql> show databases
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| libdspam7drvmysql  | 
| mysql              | 
+--------------------+
3 rows in set (0.00 sec)

mysql> use libdspam7drvmysql
Database changed
mysql> show tables
    -> ;
+-----------------------------+
| Tables_in_libdspam7drvmysql |
+-----------------------------+
| dspam_preferences           | 
| dspam_signature_data        | 
| dspam_stats                 | 
| dspam_token_data            | 
| dspam_virtual_uids          | 
+-----------------------------+


_ds_pref_load: unable to _mysql_drv_getpwnam


Related Pages

Personal tools