← Back
Editing: check-warnings.test
# # Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This test is executed once after each test to check the servers # for unexpected warnings found in the servers error log # # NOTE! mysql-test-run.pl has already done a rough filtering # of the file and written any suspicious lines # to $error_log.warnings file # --disable_query_log # Don't write these queries to binlog SET SQL_LOG_BIN = 0; # Turn off any debug crashes, allow the variable to be # non existent in release builds --error 0,1193 SET DEBUG = ""; USE mtr; # Allow this session to read-write even if server is started with # --transaction-read-only. And set autocommit mode for the session # irrespective of server --autocommit setting. SET SESSION TRANSACTION READ WRITE; # Due to the lack of WL#7828 / WL#8003 now, we might have a pending # Data Dictionary read-only transaction at this point. Even though # DD-RO-transactions are usually committed in the end, there are cases # when it does not happen. It will be changed when WL#7828 / WL#8003 # are merged in. # # Until that happens, we do 'SET SESSION AUTOCOMMIT = 1' here in order # to commit that DD-RO-transaction that might be pending. Otherwise, # the following statements will fail. By turning autocommit ON we # achieve two effects: # 1. Ensure there is no loose DD-RO-transaction (i.e. the effect of # COMMIT statement); # 2. Make sure all future DD-RO-transactions that might happen below # will be properly committed. # # We set session variable to not affect other tests. SET SESSION AUTOCOMMIT = 1; # The name of the file where mtr has written filtered-in lines from # the server error log. --let $error_log_filename = $MTR_LOG_ERROR.warnings # Create a temporary table and load error messages into it. --let $ignore_line_count = 1 --source include/load_error_log.inc # Call check_warnings to filter out any warning in the error_log table. CALL mtr.check_warnings(@result); --enable_query_log if (`SELECT @result = 0`) { --skip OK } --echo ^ Found warnings in $MTR_LOG_ERROR --exit
Save File
Cancel