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:
parent
5cf24e23fc
commit
3e8bc8046d
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user