From 66fd977fd4b9d7d74cb380f4c5c9c7b21accdb54 Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Mon, 25 Jun 2012 14:13:08 +0400 Subject: [PATCH] Wrap database name with quotes --- lib/adapters/mysql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/mysql.js b/lib/adapters/mysql.js index fa31bdcc..2b22271d 100644 --- a/lib/adapters/mysql.js +++ b/lib/adapters/mysql.js @@ -21,7 +21,7 @@ exports.initialize = function initializeSchema(schema, callback) { schema.adapter = new MySQL(schema.client); schema.adapter.schema = schema; // schema.client.query('SET TIME_ZONE = "+04:00"', callback); - schema.client.query('USE ' + s.database, function (err) { + schema.client.query('USE `' + s.database + '`', function (err) { if (err && err.message.match(/^unknown database/i)) { var dbName = s.database; schema.client.query('CREATE DATABASE ' + dbName, function (error) {