aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_mysql.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-05 14:28:36 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-05 14:28:36 -0700
commit22a38c6a86bc6323f7aa1fd3179a9f8ed7591267 (patch)
treef800dd300d7ee0e9288e3dc20cd244fc4fc123bf /test/visitors/test_mysql.rb
parenta1a01e2bb301a7a4ae5c5cdcc27ece9f7edf6c66 (diff)
downloadrails-22a38c6a86bc6323f7aa1fd3179a9f8ed7591267.tar.gz
rails-22a38c6a86bc6323f7aa1fd3179a9f8ed7591267.tar.bz2
rails-22a38c6a86bc6323f7aa1fd3179a9f8ed7591267.zip
mysql selects from dual on empty from statements
Diffstat (limited to 'test/visitors/test_mysql.rb')
-rw-r--r--test/visitors/test_mysql.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/visitors/test_mysql.rb b/test/visitors/test_mysql.rb
index 1d38161caf..871d662d4b 100644
--- a/test/visitors/test_mysql.rb
+++ b/test/visitors/test_mysql.rb
@@ -14,7 +14,13 @@ module Arel
stmt = Nodes::SelectStatement.new
stmt.offset = Nodes::Offset.new(1)
sql = @visitor.accept(stmt)
- sql.must_be_like "SELECT LIMIT 18446744073709551615 OFFSET 1"
+ sql.must_be_like "SELECT FROM DUAL LIMIT 18446744073709551615 OFFSET 1"
+ end
+
+ it 'uses DUAL for empty from' do
+ stmt = Nodes::SelectStatement.new
+ sql = @visitor.accept(stmt)
+ sql.must_be_like "SELECT FROM DUAL"
end
end
end