• Kristofer Pettersson's avatar
    Bug#55531 crash with conversions of geometry types / strings · 9a4a7cf1
    Kristofer Pettersson authored
    Convertion from a floating point number to a string caused a
    crash.
    
    During rare circumstances a String object could crash when
    it was requested to allocate new memory.
    A crash could occcur in Field_double::val_str() because of
    a pointer referencing memory inside a String object which was
    of unknown size.
    And finally, the geometric collection should not accept
    arguments which are non geometric.
    
    
    mysql-test/r/gis.result:
      * Test cases change because we intercept the error behind the
      previous crashes much earlier.
    sql/field.cc:
      * It makes no sense to impose a lower limit on the length
      and not setting a upper limit will cause crashes later.
    sql/item_geofunc.h:
      * Disallow for binding with field- and item types which
      differ from MYSQL_TYPE_GEOMETRY types.
    9a4a7cf1
gis.test 31.2 KB