You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2022/04/11 08:27:41 UTC

svn commit: r1899734 - in /spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore: MySQL.pm PgSQL.pm SQL.pm

Author: hege
Date: Mon Apr 11 08:27:40 2022
New Revision: 1899734

URL: http://svn.apache.org/viewvc?rev=1899734&view=rev
Log:
Use RPAD only in MySQL _token_select_string as originally intended. SQLite does not have RPAD.

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/MySQL.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/MySQL.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/MySQL.pm?rev=1899734&r1=1899733&r2=1899734&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/MySQL.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/MySQL.pm Mon Apr 11 08:27:40 2022
@@ -1243,6 +1243,22 @@ sub _put_tokens {
   return 1;
 }
 
+=head2 _token_select_string
+
+private instance (String) _token_select_string
+
+Description:
+This method returns the string to be used in SELECT statements to represent
+the token column.
+
+The default is to use the RPAD function to pad the token out to 5 characters.
+
+=cut
+
+sub _token_select_string {
+  return "RPAD(token, 5, ' ')";
+}
+
 sub sa_die { Mail::SpamAssassin::sa_die(@_); }
 
 1;

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/PgSQL.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/PgSQL.pm?rev=1899734&r1=1899733&r2=1899734&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/PgSQL.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/PgSQL.pm Mon Apr 11 08:27:40 2022
@@ -1073,20 +1073,6 @@ sub _put_tokens {
   return 1;
 }
 
-=head2 _token_select_string
-
-private instance (String) _token_select_string
-
-Description:
-This method returns the string to be used in SELECT statements to represent
-the token column.
-
-=cut
-
-sub _token_select_string {
-  return "token";
-}
-
 sub _quote_bytea {
   my ($str) = @_;
   my $buf = "";

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm?rev=1899734&r1=1899733&r2=1899734&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm Mon Apr 11 08:27:40 2022
@@ -2344,12 +2344,10 @@ Description:
 This method returns the string to be used in SELECT statements to represent
 the token column.
 
-The default is to use the RPAD function to pad the token out to 5 characters.
-
 =cut
 
 sub _token_select_string {
-  return "RPAD(token, 5, ' ')";
+  return "token";
 }
 
 sub sa_die { Mail::SpamAssassin::sa_die(@_); }