• Sergei Petrunia's avatar
    MDEV-13355: Assertion `using_unique_constraint || group_buff <= param->group_buff... · 4bdf9318
    Sergei Petrunia authored
    The code in OIN::optimize_inner() has this call
    
       calc_group_buffer(this, group_list)
    
    the call is however bypassed when the optimizer figures out that the JOIN
    has "Impossible WHERE".
    
    If we attempt to calculate the value of a window function afterwards,
    we will get a crash when trying to create a temporary table.
    
    So, put a call to calc_group_buffer() here as well. It's a bit surprising
    that all these steps are done for a query that will produce zero rows
    but we are just following the approach taken by the fix for mdev-11999
    here.
    4bdf9318
win.result 64.4 KB