• unknown's avatar
    This is the same patch as 1.1937, with small variable declaration changes, memory · 11536781
    unknown authored
    deallocation cleanup
    
    
    mysql-test/r/federated.result:
      new test results
    mysql-test/t/federated.test:
      New tests, and added explains per Timour's suggestion. This will keep
              track of whether changes have been made to the optimiser that might affect
              Federated.
              Also changed the error codes to federated error codes in the error tests
    sql/ha_federated.cc:
      1. Not using MAX_REMOTE_SIZE, so removed
               2. Changed all defines that were IO_SIZE to FEDERATED_QUERY_BUFFER_SIZE
               3. Now using Federated Error Codes
               4. Implemented ::info (gets valid 'records' number)
               5. Implemented ::read_range_first - now uses indexes in range operations
               6. Better allocation in get_share
               7. Cleaned up memory bug in get_share
               8. Better initial query "SELECT * FROM t1 WHERE 1=0" for check_foreign_data_src
               9. emit_key_part_name and emit_key_part_element for read_range_first to not
                  have redundancy
               10. Made sure all 'append's pass length, and use append("") to ensure proper
                   null termination of strings being built.
               11. Better message creation. If ER_QUERY_ON_FOREIGN_DATA_SRC, I also pass
                   the actual error code and message from the foreign data src.
               12. Cleaned up how the result set and share->scheme is freed.
    sql/share/errmsg.txt:
      New Federated error messages that are more tailored to the type of information
      we want to see when federated has an error.
    mysql-test/include/federated.inc:
      New bitkeeper file, include file for separating setup from main test suite
    mysql-test/include/federated_cleanup.inc:
      New BitKeeper file ``mysql-test/include/federated_cleanup.inc''
    sql/ha_federated.h:
      Added comments where needed, one was already commented about
    11536781
federated_cleanup.inc 252 Bytes