summaryrefslogtreecommitdiff
path: root/mysql-test/include/mysql_upgrade_preparation.inc
blob: a3c81c4c1e7206a7a6d9ab4c01d64f6a2067442e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Include this in any test using mysql_upgrade

# Can't run test of external client with embedded server
-- source include/not_embedded.inc

# Only run test if "mysql_upgrade" is found
--require r/have_mysql_upgrade.result
--disable_query_log
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
--enable_query_log

#
# Hack:
#
# If running with Valgrind ($VALGRIND_TEST <> 0) then the resource
# consumption (CPU) for upgrading a large log table will be intense.
# Therefore, truncate the log table in advance and issue a statement
# that should be logged.
#
if ($VALGRIND_TEST)
{
  --disable_query_log
  --disable_result_log
  --disable_abort_on_error
  TRUNCATE TABLE mysql.general_log;
  SELECT 1;
  --enable_abort_on_error
  --enable_result_log
  --enable_query_log
}