• evgen@moonbone.local's avatar
    Bug#29948: Unchecked NULL pointer caused server crash. · 4bc4d834
    evgen@moonbone.local authored
    The cli_read_binary_rows function is used to fetch data from the server
    after a prepared statement execution. It accepts a statement handler and gets
    the connection handler from it. But when the auto-reconnect option is set
    the connection handler is reset to NULL after reconnection because the
    prepared statement is lost and the handler became useless. This case
    wasn't checked in the cli_read_binary_rows function and caused server crash.
    
    Now the cli_read_binary_rows function checks the connection handler to be
    not NULL and returns an error if it is.
    4bc4d834
libmysql.c 143 KB