• Monty's avatar
    MDEV-24710 Uninitialized value upon CREATE .. SELECT ... VALUE... · 6983ce70
    Monty authored
    The failure happened for group by queries when all tables where marked as
    'const tables' (tables with 0-1 matching rows) and no row matched the
    where clause and there was in addition a direct reference to a field.
    
    In this case the field would not be properly reset and the query would
    return 'random data' that happended to be in table->record[0].
    
    Fixed by marking all const tables as null tables in this particular case.
    
    Sergei also provided an extra test case for the code.
    
    @reviewer Sergei Petrunia <psergey@askmonty.org>
    6983ce70
table.h 104 KB