Fix crash in transformSetOperationTree_internal()
In operation tree it's possible the leaf query has a different number of columns than the previous ones. Greenplum used to fill the smaller number of leaf infos before realizing it's different and breaking. It works well before until Greenplum supports zero target queries like "SELECT FROM t1", in this case the smaller number is zero, the list of leaf infos refer to 0x7f7f7f7f7f7f7f7e, coming from palloc0(0). Reproducer from Asim https://github.com/greenplum-db/gpdb/issues/7613 ``` create table foo (a int, b int); insert into foo select i,i from generate_series(1,21)i; select from foo union select * from foo; ``` This commit fixes it by bypassing filling the leaf infos if they have different numbers of columns.
Showing
想要评论请 注册 或 登录