diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-05 14:28:36 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-05 14:28:36 -0700 |
commit | 22a38c6a86bc6323f7aa1fd3179a9f8ed7591267 (patch) | |
tree | f800dd300d7ee0e9288e3dc20cd244fc4fc123bf /test | |
parent | a1a01e2bb301a7a4ae5c5cdcc27ece9f7edf6c66 (diff) | |
download | rails-22a38c6a86bc6323f7aa1fd3179a9f8ed7591267.tar.gz rails-22a38c6a86bc6323f7aa1fd3179a9f8ed7591267.tar.bz2 rails-22a38c6a86bc6323f7aa1fd3179a9f8ed7591267.zip |
mysql selects from dual on empty from statements
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_mysql.rb | 8 |
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 |