Skip to content
  • Sergey Glukhov's avatar
    9ca3270b
    Bug#31152942 ASSERTION `ASSERT(NULLPTR != DYNAMIC_CAST<TARGET>(ARG));` GROUP BY JSON ARRAY. · 9ca3270b
    Sergey Glukhov authored
    
    
    There are two problems:
    
    1. Field_typed_array field creates internal field for data
       conversion in Field_typed_array::init() and doesn't set
       convertion field index correctly while creating the field
       for temporary table.
    Fixed by introducing new field method Field::set_field_index()
    which updates convertion field index.
    
    2. Convertion field and corresponding Item_field are created
       in TABLE::mem_root.
    Fixed by replacing TABLE::mem_root with TABLE_SHARE's mem_root
    for internal temporary tables.
    
    Additional changes:
    
    Public Field::field_index is replaced with private Field::m_field_index.
    Added Field::field_index()/Field::set_field_index() methods.
    Patch for 8.0 only.
    
    Reviewed-by: default avatarGuilhem Bichot <guilhem.bichot@oracle.com>
    9ca3270b
    Bug#31152942 ASSERTION `ASSERT(NULLPTR != DYNAMIC_CAST<TARGET>(ARG));` GROUP BY JSON ARRAY.
    Sergey Glukhov authored
    
    
    There are two problems:
    
    1. Field_typed_array field creates internal field for data
       conversion in Field_typed_array::init() and doesn't set
       convertion field index correctly while creating the field
       for temporary table.
    Fixed by introducing new field method Field::set_field_index()
    which updates convertion field index.
    
    2. Convertion field and corresponding Item_field are created
       in TABLE::mem_root.
    Fixed by replacing TABLE::mem_root with TABLE_SHARE's mem_root
    for internal temporary tables.
    
    Additional changes:
    
    Public Field::field_index is replaced with private Field::m_field_index.
    Added Field::field_index()/Field::set_field_index() methods.
    Patch for 8.0 only.
    
    Reviewed-by: default avatarGuilhem Bichot <guilhem.bichot@oracle.com>
Loading