mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
If running the mysql_upgrade test case with Valgrind, the resource
consumption (CPU) for upgrading a large log table can be intense. Therefore, truncate the general_log table beforehand if running mysql_upgrade test with Valgrind.
This commit is contained in:
@ -7,6 +7,26 @@
|
|||||||
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
||||||
--enable_query_log
|
--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 (`SELECT $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
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Basic test that we can run mysql_upgrde and that it finds the
|
# Basic test that we can run mysql_upgrde and that it finds the
|
||||||
# expected binaries it uses.
|
# expected binaries it uses.
|
||||||
|
Reference in New Issue
Block a user