• Kristofer Pettersson's avatar
    Bug#38469 invalid memory read and/or crash with utf8 text field, stored procedure, uservar · f0352e34
    Kristofer Pettersson authored
                
    A stored procedure involving substrings could crash the server on certain
    platforms because of invalid memory reads.
              
    During storing the new blob-field value, the cached value's address range
    overlapped that of the new field value. This caused problems when the 
    cached value storage was reallocated to provide access for a new 
    characater set representation. The patch checks the address ranges, and if
    they overlap, the new field value is copied to a new storage before it is
    converted to the new character set.
    
    
    mysql-test/r/sp.result:
      Added result set
    mysql-test/t/sp.test:
      Added test case
    sql/field.cc:
      The source and destination address ranges of a character conversion must not overlap or the 'from' address will be invalidated as the temporary value-
      object is re-allocated to fit the new character set.
    sql/field.h:
      Added comments
    f0352e34
field.h 64.4 KB