summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/mysql_upgrade_preparation.inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/include/mysql_upgrade_preparation.inc
parentInitial commit. (diff)
downloadmariadb-10.5-upstream.tar.xz
mariadb-10.5-upstream.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/include/mysql_upgrade_preparation.inc')
-rw-r--r--mysql-test/include/mysql_upgrade_preparation.inc23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/include/mysql_upgrade_preparation.inc b/mysql-test/include/mysql_upgrade_preparation.inc
new file mode 100644
index 00000000..03019ae2
--- /dev/null
+++ b/mysql-test/include/mysql_upgrade_preparation.inc
@@ -0,0 +1,23 @@
+# Include this in any test using mysql_upgrade
+
+# Can't run test of external client with embedded server
+-- source include/not_embedded.inc
+#
+# 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
+}