lib/gratan/driver.rb in gratan-0.3.1.beta2 vs lib/gratan/driver.rb in gratan-0.3.1.beta3
- old
+ new
@@ -18,10 +18,14 @@
query("SHOW GRANTS FOR #{quote_user(user, host)}").each do |row|
yield(row.values.first)
end
end
+ def show_create_user(user, host)
+ query("SHOW CREATE USER #{quote_user(user, host)}").first.values.first
+ end
+
def show_databases
query("SHOW DATABASES").map {|i| i.values.first }
end
def show_tables(database)
@@ -200,9 +204,15 @@
end
def disable_log_bin_local
unless @options[:skip_disable_log_bin]
query('SET SQL_LOG_BIN = 0')
+ end
+ end
+
+ def override_sql_mode
+ if @options[:override_sql_mode]
+ query('SET SQL_MODE = ""')
end
end
private