Package: libdspam7-drv-mysql
Version: 3.6.8-5etch1
Severity: important


In http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388140 a patch was proposed to solve the problem with a remote MySQL server. In 3.6.8-5etch1 the script has become more complex and introduced the
problem again, although with a different message:

ve45:/etc/cron.daily# ./libdspam7-drv-mysql
ERROR 1046 (3D000) at line 5: No database selected


The reason is that in the newer script the $MYSQL_DB in the above
proposed patch has disappeared in the second case. The following patch
corrects that:


ve45:/etc/cron.daily# diff -u libdspam7-drv-mysql.old libdspam7-drv-mysql
--- libdspam7-drv-mysql.old     2008-05-18 13:46:26.000000000 +0200
+++ libdspam7-drv-mysql 2008-05-18 13:47:33.000000000 +0200
@@ -28,9 +28,9 @@
     else
         if echo "$MYSQL_HOST" | grep "^/" > /dev/null 2>&1 ; then
             # Assume it is a socket:
-            /usr/bin/mysql --defaults-extra-file=$MYSQLCONF_PASSWD
--socket=$MYSQL_HOST --user=$MYSQL_USER < $PURGE
+            /usr/bin/mysql --defaults-extra-file=$MYSQLCONF_PASSWD
--socket=$MYSQL_HOST --user=$MYSQL_USER $MYSQL_DB < $PURGE
         else
-            /usr/bin/mysql --defaults-extra-file=$MYSQLCONF_PASSWD
--host=$MYSQL_HOST --user=$MYSQL_USER < $PURGE
+            /usr/bin/mysql --defaults-extra-file=$MYSQLCONF_PASSWD
--host=$MYSQL_HOST --user=$MYSQL_USER $MYSQL_DB < $PURGE
         fi
     fi



--

Henk van de Kamer
http://www.vandekamer.com/




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to