ispman/lib database.MySQL.lib,1.1,1.1.2.1

Joerg Delker <[email protected]> Fri, 30 Jan 2009 13:04:31 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30480/lib

Modified Files:
      Tag: rel_1_4-bugfixes
	database.MySQL.lib 
Log Message:
replaced DROP USER with DELETE FROM mysql.user to be non -fatal on already deleted users

Index: database.MySQL.lib
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/database.MySQL.lib,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- database.MySQL.lib	29 Dec 2008 16:21:46 -0000	1.1
+++ database.MySQL.lib	30 Jan 2009 13:04:28 -0000	1.1.2.1
@@ -119,9 +119,9 @@
     my $params = shift;
 
     my $sql =
-        "DROP USER "
-      . sql_user( $params->{'ispmanDBUser'}, $params->{'ispmanDBAccessFilter'} )
-      . ";";
+        "DELETE FROM mysql.user " 
+      . "WHERE User=\'" . $params->{'ispmanDBUser'} . "\' "
+      . "AND Host=\'" . $params->{'ispmanDBAccessFilter'} . "\';"
     $sql .= "DROP DATABASE " . $params->{'ispmanDBName'} . ";";
 
     return "echo \"$sql\" | $cmnds{mysql} --defaults-file=$defaultsfile";


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword