summaryrefslogtreecommitdiff
path: root/test/sql/select.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-04-04 16:06:58 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-04-04 16:06:58 +0000
commit1a684567958d548f7ed68ba34bc17bffbadfb8ee (patch)
tree0c224ad489d1a43e7e3bf8f914dba4dcdc951693 /test/sql/select.py
parentc4eeabc60bddca6857982c894516268ecdb48b68 (diff)
downloadsqlalchemy-1a684567958d548f7ed68ba34bc17bffbadfb8ee.tar.gz
fixed union() bug whereby oid_column would not be available if no oid_column in embedded selects
Diffstat (limited to 'test/sql/select.py')
-rw-r--r--test/sql/select.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/select.py b/test/sql/select.py
index 06679e956..77926b421 100644
--- a/test/sql/select.py
+++ b/test/sql/select.py
@@ -888,6 +888,13 @@ SELECT thirdtable.userid FROM thirdtable)"
"SELECT myothertable.otherid FROM myothertable EXCEPT SELECT thirdtable.userid FROM thirdtable \
UNION SELECT mytable.myid FROM mytable"
)
+
+ # test unions working with non-oid selectables
+ s = select([column('foo'), column('bar')])
+ s = union(s, s)
+ s = union(s, s)
+ self.assert_compile(s, "SELECT foo, bar UNION SELECT foo, bar UNION (SELECT foo, bar UNION SELECT foo, bar)")
+
@testing.uses_deprecated('//get_params')
def test_binds(self):