• unknown's avatar
    Fixed bug#17530: Incorrect key truncation on table creation caused server crash. · 71ee8615
    unknown authored
    When a too long field is used for a key, only a prefix part of the field is 
    used. Length is reduced to the max key length allowed for storage. But if the
    field have a multibyte charset it is possible to break multibyte char
    sequence. This leads to the failed assertion in the innodb code and 
    server crash when a record is inserted.
    
    The make_prepare_table() now aligns truncated key length to the boundary of
    multibyte char.
    
    
    mysql-test/t/create.test:
      Added test case for bug#17530: Incorrect key truncation on table creation caused server crash.
    mysql-test/r/create.result:
      Added test case for bug#17530: Incorrect key truncation on table creation caused server crash.
    sql/sql_table.cc:
      Fixed bug#17530: Incorrect key truncation on table creation caused server crash.
      The make_prepare_table() now aligns truncated key length to the boundary of
      multibyte char.
    71ee8615
create.test 17.5 KB