fix a 'already exist' error when creating a database containing an hyphen (-)

This commit is contained in:
Benjamin Sonntag 2009-03-30 09:39:46 +00:00
parent 21dda6eda8
commit 2037ee4841
2 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,7 @@ class m_mysql {
$lo=addslashes($db->f("login")); $lo=addslashes($db->f("login"));
$pa=addslashes($db->f("pass")); $pa=addslashes($db->f("pass"));
} }
if ($db->query("CREATE DATABASE $dbname;")) { if ($db->query("CREATE DATABASE `$dbname`;")) {
// Ok, database does not exist, quota is ok and dbname is compliant. Let's proceed // Ok, database does not exist, quota is ok and dbname is compliant. Let's proceed
$db->query("INSERT INTO db (uid,login,pass,db,bck_mode) VALUES ('$cuid','$lo','$pa','$dbname',0);"); $db->query("INSERT INTO db (uid,login,pass,db,bck_mode) VALUES ('$cuid','$lo','$pa','$dbname',0);");
// give everything but GRANT on db.* // give everything but GRANT on db.*

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
alternc (0.9.10) stable; urgency=low alternc (0.9.10) stable; urgency=low
* bugfixes: * bugfixes:
* fix a "already exist" error when creating a database containing an hyphen (-)
* #1163: fix sqlbackup script call routine to retain backwards * #1163: fix sqlbackup script call routine to retain backwards
compatibility compatibility
* fix usage of ISO8859-15 charset (that may NOT be defined in locales...) * fix usage of ISO8859-15 charset (that may NOT be defined in locales...)