Skip to content
  • Sven Sandberg's avatar
    d133fbc1
    WL#6378: New Data Dictionary. Fix failing test perfschema.transaction_gtid. · d133fbc1
    Sven Sandberg authored
    The test perfschema.transaction_gtid executes transactions and checks
    that the GTID field of
    performance_schema.events_transactions_[current|history] is as
    expected.
    
    The following statements did not add any row to these tables before
    WL#6378, but changed in WL#6378 so that they add a row to these
    tables:
    
    - TRUNCATE
    - SELECT stored_function()
    - SET AUTOCOMMIT
    
    These statements were used in the test, and thus the change in the
    worklog caused the test to fail with result mismatch.
    
    We fix the TRUNCATE case by executing it on a different connection and
    using a WHERE clause when reading the tables so that it only selects
    rows from the connection where the transactions we are checking are
    executed.
    
    We fix the SELECT stored_function() case in the same
    way. Additionally, we simplify the SELECT and use a .inc file instead
    of a stored function.
    
    We fix the SET AUTOCOMMIT case by switching the order between SET
    AUTOCOMMIT and clearing the tables, so that the tables are cleared
    after SET AUTOCOMMIT.
    
    @mysql-test/include/execute_*_sync_point.inc
    - Allow sourcing a file rather than executing a statement on the
      auxiliary connection.
    
    @mysql-test/suite/perfschema/include/reset_transaction_gtid.test
    - Use the auxiliary connection to clear the tables rather than
      the connection where transactions are executed.
    - Since we use the correct connection, no need to set GTID_NEXT.
    
    @mysql-test/suite/perfschema/include/show_transaction_gtid.test
    - Avoid using a stored function.
    - Document the file.
    
    @mysql-test/suite/perfschema/t/transaction_gtid.test
    - Use have_debug_sync.inc, not have_debug.inc.
    - Remove the now unused stored functions.
    - Invoke reset_transaction_gtid.inc after SET AUTOCOMMIT.
    d133fbc1
    WL#6378: New Data Dictionary. Fix failing test perfschema.transaction_gtid.
    Sven Sandberg authored
    The test perfschema.transaction_gtid executes transactions and checks
    that the GTID field of
    performance_schema.events_transactions_[current|history] is as
    expected.
    
    The following statements did not add any row to these tables before
    WL#6378, but changed in WL#6378 so that they add a row to these
    tables:
    
    - TRUNCATE
    - SELECT stored_function()
    - SET AUTOCOMMIT
    
    These statements were used in the test, and thus the change in the
    worklog caused the test to fail with result mismatch.
    
    We fix the TRUNCATE case by executing it on a different connection and
    using a WHERE clause when reading the tables so that it only selects
    rows from the connection where the transactions we are checking are
    executed.
    
    We fix the SELECT stored_function() case in the same
    way. Additionally, we simplify the SELECT and use a .inc file instead
    of a stored function.
    
    We fix the SET AUTOCOMMIT case by switching the order between SET
    AUTOCOMMIT and clearing the tables, so that the tables are cleared
    after SET AUTOCOMMIT.
    
    @mysql-test/include/execute_*_sync_point.inc
    - Allow sourcing a file rather than executing a statement on the
      auxiliary connection.
    
    @mysql-test/suite/perfschema/include/reset_transaction_gtid.test
    - Use the auxiliary connection to clear the tables rather than
      the connection where transactions are executed.
    - Since we use the correct connection, no need to set GTID_NEXT.
    
    @mysql-test/suite/perfschema/include/show_transaction_gtid.test
    - Avoid using a stored function.
    - Document the file.
    
    @mysql-test/suite/perfschema/t/transaction_gtid.test
    - Use have_debug_sync.inc, not have_debug.inc.
    - Remove the now unused stored functions.
    - Invoke reset_transaction_gtid.inc after SET AUTOCOMMIT.
Loading