From f64bd2ca85595f94cbbe809f51a52cdb9b68af19 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 31 Jul 2008 09:45:17 +0200 Subject: [PATCH] Ensure dbconsole includes the -p parameter to mysql as intended --- railties/lib/commands/dbconsole.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/railties/lib/commands/dbconsole.rb b/railties/lib/commands/dbconsole.rb index 17acb7b68f..442526ae32 100644 --- a/railties/lib/commands/dbconsole.rb +++ b/railties/lib/commands/dbconsole.rb @@ -41,6 +41,8 @@ when "mysql" if config['password'] && include_password args << "--password=#{config['password']}" + elsif config['password'] && !config['password'].empty? + args << "-p" end args << config['database']