The queries to remove passwords stored in the database
that run during the upgrade wizard use mysql specific
SQL syntax that is not available for other database
types such as postgresql or sqlite.
The attached patch reimplements this functionality in a
portable way that will work with any ANSI SQL compliant
The patch is likely to be slightly slower, but I think
that is a good tradeoff to get a more reliable routine.