You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/mail-filter/spamassassin/files/spamassassin-3.3.2-innodb.p...

115 lines
4.6 KiB

Index: sql/README.bayes
===================================================================
--- sql/README.bayes (revision 1139008)
+++ sql/README.bayes (working copy)
@@ -17,27 +17,37 @@
bayes_store_module Mail::SpamAssassin::BayesStore::SQL
This directive is used by the Bayes module to determine which storage
-module should be used. If not set it will default to:
+module should be used. If not set it will default to:
Mail::SpamAssassin::BayesStore::DBM
+The storage module Mail::SpamAssassin::BayesStore::SQL is an older generic
+SQL module which can be also be used with versions of MySQL which did not
+have support for an InnoDB engine and transactions. If choosing this module
+consider replacing the InnoDB engine with MyISAM (explicitly or defaulted)
+in the schema (files bayes_mysql.sql and awl_mysql.sql). Note that old
+versions of MySQL expect syntax TYPE=MyISAM instead of ENGINE=MyISAM,
+while newer versions throw a syntax error on TYPE and only allow ENGINE.
+In short: replace ENGINE=InnoDB with TYPE=MyISAM (or just leave it out)
+in the bayes_mysql.sql and awl_mysql.sql schemas if ENGINE=InnoDB is not
+accepted.
+
+There is also a MySQL specific storage driver available to provides a
+small boost in performance. It requires version 4.1 or above of the
+MySQL database software to work properly. In addition, it provides
+rollback on error functionality if you create your bayes database table
+using the InnoDB storage engine. WARNING: Using this module with a version
+of MySQL < 4.1 could have unexpected results. To use the MySQL 4.1+
+specific module set your bayes_store_module directive accordingly:
+ bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
+
PostgreSQL users will want to use the PostgreSQL specific storage
module:
-bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
+ bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
This module provides a slightly different interface to makes better
use of the resources that PostgreSQL offers. In addition, please make
sure that you follow the instructions below for loading the proper
procedural language and installing the tables and stored procedure.
-There is also a MySQL specific storage driver available to provides a
-small boost in performance. It requires version 4.1 or above of the
-MySQL database software to work properly. In addition, it provides
-rollback on error functionality if you create your bayes database
-table using the InnoDB storage engine (ie s/MyISAM/InnoDB/ on the
-bayes_mysql.sql file). WARNING: Using this module with a version of
-MySQL < 4.1 could have unexpected results. To use the MySQL 4.1+
-specific module set your bayes_store_module directive accordingly:
-bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
-
Additional configuration directives provided by BayesSQL:
bayes_sql_dsn DBI:driver:database:hostname[:port]
Index: sql/awl_mysql.sql
===================================================================
--- sql/awl_mysql.sql (revision 1139008)
+++ sql/awl_mysql.sql (working copy)
@@ -1,9 +1,9 @@
CREATE TABLE awl (
username varchar(100) NOT NULL default '',
- email varchar(255) NOT NULL default '',
+ email varbinary(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
count int(11) NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
PRIMARY KEY (username,email,signedby,ip)
-) TYPE=MyISAM;
+) ENGINE=InnoDB;
Index: sql/bayes_mysql.sql
===================================================================
--- sql/bayes_mysql.sql (revision 1139008)
+++ sql/bayes_mysql.sql (working copy)
@@ -3,13 +3,13 @@
id int(11) NOT NULL default '0',
runtime int(11) NOT NULL default '0',
KEY bayes_expire_idx1 (id)
-) TYPE=MyISAM;
+) ENGINE=InnoDB;
CREATE TABLE bayes_global_vars (
variable varchar(30) NOT NULL default '',
value varchar(200) NOT NULL default '',
PRIMARY KEY (variable)
-) TYPE=MyISAM;
+) ENGINE=InnoDB;
INSERT INTO bayes_global_vars VALUES ('VERSION','3');
@@ -18,7 +18,7 @@
msgid varchar(200) binary NOT NULL default '',
flag char(1) NOT NULL default '',
PRIMARY KEY (id,msgid)
-) TYPE=MyISAM;
+) ENGINE=InnoDB;
CREATE TABLE bayes_token (
id int(11) NOT NULL default '0',
@@ -28,7 +28,7 @@
atime int(11) NOT NULL default '0',
PRIMARY KEY (id, token),
INDEX bayes_token_idx1 (id, atime)
-) TYPE=MyISAM;
+) ENGINE=InnoDB;
CREATE TABLE bayes_vars (
id int(11) NOT NULL AUTO_INCREMENT,
@@ -43,4 +43,4 @@
newest_token_age int(11) NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE bayes_vars_idx1 (username)
-) TYPE=MyISAM;
+) ENGINE=InnoDB;