Permalink
Browse files

- replace string quoting characters so ansi statement will work with …

…mysql
  • Loading branch information...
1 parent db40f22 commit 871353b862a0a875c348d24b9c9e58a90a70f592 bsjaekel committed Apr 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/plain_view/connection_adapters/mysql2_adapter.rb
@@ -52,7 +52,7 @@ def view_select_statement(view, name=nil)
begin
execute("SET SESSION sql_mode='ANSI'")
row = execute("SHOW CREATE VIEW #{view}", name).each do |row|
- return row[1] #convert_statement(row[1]) if row[0] == view
+ return row[1].gsub(/"/, "`") #convert_statement(row[1]) if row[0] == view
end
rescue ActiveRecord::StatementInvalid => e
raise "No view called #{view} found"

0 comments on commit 871353b

Please sign in to comment.