1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

Bug #812: Fix onedb sql syntax to work with mysql

This commit is contained in:
Carlos Martín 2011-09-16 18:11:15 +02:00
parent 5cf24e23fc
commit 3e8bc8046d
2 changed files with 3 additions and 3 deletions

View File

@ -257,8 +257,8 @@ module Migrator
public = row[:public]
total_leases = 0
@db.fetch("SELECT COUNT (ip) FROM old_leases WHERE (oid=#{oid} AND used=1)") do |r|
total_leases = r[:"COUNT (ip)"]
@db.fetch("SELECT COUNT(ip) FROM old_leases WHERE (oid=#{oid} AND used=1)") do |r|
total_leases = r[:"COUNT(ip)"]
end

View File

@ -177,7 +177,7 @@ class BackEndMySQL < OneDBBacKEnd
end
create_cmd = mysql_cmd+"-e 'CREATE DATABASE IF NOT EXISTS #{@db_name};'"
rc = system(create_cnd)
rc = system(create_cmd)
if !rc
raise "Error creating MySQL DB #{@db_name} at #{@server}."
end