Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Critical
 - 
    Resolution: Fixed
 - 
    1.0.7
 - 
    None
 - 
    All
 
Description
There's a data item in lex called result, a pointer to a select_result item. This is created and set by parse_sql().
During columnstore processing, we run parse_sql multiple times, throwing away the result object. Not deleteing – throwing away.
When certain queries are sent via pipe to the client, the result item isn't thrown away and an assert happens. I believe we throw it away in most processing just to avoid the assert, but it needs to be cleaned up instead.
Put the following query into a file and pipe it to the client to cause the assert:
select lo_orderkey into outfile '/tmp/bug3520.txt' from (select lo_orderkey from lineorder group by 1 union all select lo_orderkey from lineorder group by 1 union all select lo_orderkey from lineorder group by 1 union all select lo_orderkey from lineorder group by 1 union all select lo_orderkey from lineorder group by 1) x;