Fix data loading from the performance script

This commit is contained in:
Pratik Naik
2010-07-15 23:49:17 +01:00
parent 1fcf4e8ecb
commit 130bf3c9ed

View File

@@ -58,7 +58,7 @@ end
sqlfile = File.expand_path("../performance.sql", __FILE__)
if File.exists?(sqlfile)
mysql_bin = %w[mysql mysql5].select { |bin| `which #{bin}`.length > 0 }
mysql_bin = %w[mysql mysql5].detect { |bin| `which #{bin}`.length > 0 }
`#{mysql_bin} -u #{conn[:username]} #{"-p#{conn[:password]}" unless conn[:password].blank?} #{conn[:database]} < #{sqlfile}`
else
puts 'Generating data...'