• unknown's avatar
    Fixed bug #13191. · 98c0da4e
    unknown authored
    INSERT...ON DUPLICATE KEY UPDATE may cause error 1032: 
    "Can't find record in ..." if we are inserting into
    InnoDB table unique index of partial key with
    underlying UTF-8 string field.
    
    This error occurs because INSERT...ON DUPLICATE uses a wrong
    procedure to copy string fields of multi-byte character sets
    for index search.
    
    
    mysql-test/t/innodb_mysql.test:
      Added test case for bug #13191.
    mysql-test/r/innodb_mysql.result:
      Added test case for bug #13191.
    sql/field.h:
      Fixed bug #13191.
      Field_string::get_key_image() virtual function was overloaded
      to implement copying of variable length character (UTF-8) fields.
      Field::get_key_image() function prototype has been changed to
      return byte size of copied data.
    sql/field.cc:
      Fixed bug #13191.
      Field_string::get_key_image() virtual function was overloaded
      to implement copying of variable length character (UTF-8) fields.
      Field::get_key_image() function prototype has been changed to
      return byte size of copied data.
    sql/key.cc:
      Fixed bug #13191.
      INSERT...ON DUPLICATE KEY UPDATE may cause error 1032: 
      "Can't find record in ...".
      This error occurs because INSERT...ON DUPLICATE uses
      a wrong procedure to copy field parts for index search.
      key_copy() function has been fixed.
    98c0da4e
field.cc 180 KB