MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mysql_upgrade_preparation.inc
1 # Include this in any test using mysql_upgrade
2 
3 # Can't run test of external client with embedded server
4 -- source include/not_embedded.inc
5 
6 # Only run test if "mysql_upgrade" is found
7 --require r/have_mysql_upgrade.result
8 --disable_query_log
9 select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
10 --enable_query_log
11 
12 #
13 # Hack:
14 #
15 # If running with Valgrind ($VALGRIND_TEST <> 0) then the resource
16 # consumption (CPU) for upgrading a large log table will be intense.
17 # Therefore, truncate the log table in advance and issue a statement
18 # that should be logged.
19 #
20 if ($VALGRIND_TEST)
21 {
22  --disable_query_log
23  --disable_result_log
24  --disable_abort_on_error
25  TRUNCATE TABLE mysql.general_log;
26  SELECT 1;
27  --enable_abort_on_error
28  --enable_result_log
29  --enable_query_log
30 }