Commit ef36954b authored by anarcat's avatar anarcat Committed by anarcat

#982452 - check for db existence correctly for dbs with underscorse

parent 32f9cee7
......@@ -14,6 +14,8 @@ class provisionService_db_mysql extends provisionService_db_pdo {
}
function database_exists($name) {
// An underscore in a LIKE clause is a single character wildcard, escape it.
$name = str_replace('_', '\_', $name);
$result = $this->query("SHOW DATABASES LIKE '%s'", $name);
if ($result) {
return $result->fetchColumn(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment