Description
found when trying to repro #9516
dolt
child/main*> select * from (select 'parent' as db, * from parent.t union select 'child' as db, * from child.t) as combined;
+--------+----+-------+
| db | id | words |
+--------+----+-------+
| parent | 1 | foo |
| parent | 2 | bar |
| parent | 3 | baz |
| parent | 4 | zap |
| child | 2 | bar |
| child | 3 | baz |
| child | 1 | foo |
| child | 4 | zap |
+--------+----+-------+
8 rows in set (0.00 sec)
mysql
mysql> select * from (select 'parent' as db, * from parent.t union select 'child' as db, * from child.t) as combined;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* from parent.t union select 'child' as db, * from child.t) as combined' at line 1