• unknown's avatar
    Fix for spurious failures of sp.test on many platforms (aka Bug #9161 · f472e0fd
    unknown authored
    "Warnings on 'drop procedure' platform-specific").
    
    In mysqltest we should not issue "SHOW WARNINGS" until we have not 
    read results from all statements in multi-statement.
    
    Otherwise such "SHOW WARNINGS" will either cause "Packets out of order"
    error and thus will ruin current connection (but we may not notice this as
    it happened in sp.test because we ignore errors from such auxilary
    SHOW WARNINGS and use auto-reconnecting connections) or will
    succeed but consume first packet from next statement in multi-statement
    sequence (this happens if "SHOW WARNINGS" is issued when this packet
    is already received by client. Packet is thrown away by net_clear()
    call which is issued when "SHOW WARNINGS" is sent to server).
    
    In our case sp.test failed because usually we had first situation
    but sometimes second situation occured causing warning to pop-up.
    
    
    client/mysqltest.c:
      We should not issue "SHOW WARNINGS" if we have not processed all 
      results from multi-statement.
    f472e0fd
mysqltest.c 128 KB