• Davi Arnaut's avatar
    Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run · 07767edc
    Davi Arnaut authored
    The problem was that a user could supply supply data in chunks
    via the COM_STMT_SEND_LONG_DATA command to prepared statement
    parameter other than of type TEXT or BLOB. This posed a problem
    since other parameter types aren't setup to handle long data,
    which would lead to a crash when attempting to use the supplied
    data.
    
    Given that long data can be supplied at any stage of a prepared
    statement, coupled with the fact that the type of a parameter
    marker might change between consecutive executions, the solution
    is to validate at execution time each parameter marker for which
    a data stream was provided. If the parameter type is not TEXT or
    BLOB (that is, if the type is not able to handle a data stream),
    a error is returned.
    07767edc
sql_prepare.cc 88.3 KB