* Fixed rogue ,'s in SQL * Added CREATE INDEX instead of INDEX() for better cross-database support * Added indexing back to sqlite
Index: convert-tsql =================================================================== --- convert-tsql (revision 251) +++ convert-tsql (revision 252) @@ -59,7 +59,6 @@ -e 's/@SERIAL_TYPE@/SERIAL/' \ -e 's/@BIG_INTEGER@/BIGINT UNSIGNED/' \ -e 's/@TRACK_KEY_LEN@/255/' \ - -e 's/@INDEX@/, INDEX/' \ -e 's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/' < "$file" ;; @@ -71,7 +70,6 @@ -e 's/@SERIAL_TYPE@/SERIAL/' \ -e 's/@BIG_INTEGER@/BIGINT UNSIGNED/' \ -e 's/@TRACK_KEY_LEN@/512/' \ - -e 's/@INDEX@/, INDEX/' \ -e 's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/' < "$file" ;; @@ -83,7 +81,6 @@ -e 's/@SERIAL_TYPE@/SERIAL PRIMARY KEY/' \ -e 's/@BIG_INTEGER@/INT8/' \ -e 's/@TRACK_KEY_LEN@/512/' \ - -e 's/@INDEX@/, INDEX/' \ -e 's/@SERIAL_REF_TYPE@/INT8/' < "$file" ;; @@ -95,7 +92,6 @@ -e 's/@SERIAL_TYPE@/INTEGER PRIMARY KEY AUTOINCREMENT/' \ -e 's/@BIG_INTEGER@/INT8/' \ -e 's/@TRACK_KEY_LEN@/512/' \ - -e 's/@[EMAIL PROTECTED]//' \ -e 's/@SERIAL_REF_TYPE@/INT8/' < "$file" ;; Index: greylisting.tsql =================================================================== --- greylisting.tsql (revision 251) +++ greylisting.tsql (revision 252) @@ -108,7 +108,7 @@ Tries @BIG_INTEGER@ NOT NULL, /* Authentication tries */ Count @BIG_INTEGER@ NOT NULL, /* Authenticated count */ - UNIQUE(TrackKey,Sender,Recipient), - @INDEX@ (LastUpdate,Count) + UNIQUE(TrackKey,Sender,Recipient) ) @CREATE_TABLE_SUFFIX@; +CREATE INDEX greylisting_tracking_idx1 ON greylisting_tracking (LastUpdate,Count); Index: checkhelo.tsql =================================================================== --- checkhelo.tsql (revision 251) +++ checkhelo.tsql (revision 252) @@ -13,13 +13,13 @@ /* Blacklisting, we want to reject people impersonating us */ UseBlacklist SMALLINT, /* Checks blacklist table */ - BlacklistPeriod BIGINT, /* Period to keep the host blacklisted for, if not set or 0 + BlacklistPeriod @BIG_INTEGER@, /* Period to keep the host blacklisted for, if not set or 0 the check will be live */ /* Random helo prevention */ UseHRP SMALLINT, /* Use helo randomization prevention */ - HRPPeriod BIGINT, /* Period/window we check for random helo's */ - HRPLimit BIGINT, /* Our limit for the number of helo's is this */ + HRPPeriod @BIG_INTEGER@, /* Period/window we check for random helo's */ + HRPLimit @BIG_INTEGER@, /* Our limit for the number of helo's is this */ /* RFC compliance options */ RejectInvalid SMALLINT, /* Reject invalid HELO */ @@ -82,9 +82,9 @@ CREATE TABLE checkhelo_tracking ( Address VARCHAR(64) NOT NULL, Helo VARCHAR(255) NOT NULL, - LastUpdate BIGINT UNSIGNED NOT NULL, + LastUpdate @BIG_INTEGER@ NOT NULL, - UNIQUE (Address,Helo), - @INDEX@ (LastUpdate) + UNIQUE (Address,Helo) ) @CREATE_TABLE_SUFFIX@; +CREATE INDEX checkhelo_tracking_idx1 ON checkhelo_tracking (LastUpdate); Index: checkspf.tsql =================================================================== --- checkspf.tsql (revision 251) +++ checkspf.tsql (revision 252) @@ -9,7 +9,7 @@ PolicyID @SERIAL_REF_TYPE@, - Name TINYTEXT NOT NULL, + Name VARCHAR(255) NOT NULL, /* Do we want to use SPF? 1 or 0 */ UseSPF SMALLINT, Index: core.tsql =================================================================== --- core.tsql (revision 251) +++ core.tsql (revision 252) @@ -146,11 +146,10 @@ RecipientData TEXT, /* Policy state information */ - UNIQUE (Instance), - @INDEX@ (QueueID,ClientAddress,Sender), - @INDEX@ (Timestamp) + UNIQUE (Instance) ) @CREATE_TABLE_SUFFIX@; +CREATE INDEX session_tracking_idx1 ON session_tracking (QueueID,ClientAddress,Sender); +CREATE INDEX session_tracking_idx2 ON session_tracking (Timestamp); - Index: quotas.tsql =================================================================== --- quotas.tsql (revision 251) +++ quotas.tsql (revision 252) @@ -64,10 +64,7 @@ Counter NUMERIC(10,4), UNIQUE (QuotasLimitsID,TrackKey), - @INDEX@ (LastUpdate), FOREIGN KEY (QuotasLimitsID) REFERENCES quotas_limits(ID) ) @CREATE_TABLE_SUFFIX@; +CREATE INDEX quotas_tracking_idx1 ON quotas_tracking (LastUpdate); - - -
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ policyd-users mailing list policyd-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/policyd-users