summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/perfschema_stress/t/modify.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/perfschema_stress/t/modify.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/perfschema_stress/t/modify.test')
-rw-r--r--mysql-test/suite/perfschema_stress/t/modify.test45
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema_stress/t/modify.test b/mysql-test/suite/perfschema_stress/t/modify.test
new file mode 100644
index 00000000..ee0ce0f3
--- /dev/null
+++ b/mysql-test/suite/perfschema_stress/t/modify.test
@@ -0,0 +1,45 @@
+# The include statement below is a temp one for tests that are yet to
+#be ported to run with InnoDB,
+#but needs to be kept for tests that would need MyISAM in future.
+--source include/force_myisam_default.inc
+
+--source include/not_embedded.inc
+--source suite/perfschema_stress/include/settings.inc
+
+let $have_table= `SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
+ WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`;
+
+if (!$have_table) {
+ --source suite/perfschema_stress/t/setup.test
+}
+
+UPDATE performance_schema.setup_instruments SET TIMED = 'NO';
+
+UPDATE performance_schema.setup_instruments SET ENABLED = 'NO';
+
+UPDATE performance_schema.setup_timers
+SET TIMER_NAME = 'NANOSECOND' WHERE NAME = 'Wait';
+
+# Let it run some time with the new timer name and instruments
+--sleep 1
+
+UPDATE performance_schema.setup_timers
+SET TIMER_NAME = 'CYCLE' WHERE NAME = 'Wait';
+
+UPDATE performance_schema.setup_instruments SET TIMED = 'YES';
+
+UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
+WHERE NAME IN ('wait/io/file/sql/FRM',
+ 'thread/sql/Connection',
+ 'wait/synch/cond/sql/COND_mdl',
+ 'wait/synch/rwlock/sql/LOCK_sys_init_connect',
+ 'wait/synch/mutex/sql/LOCK_mdl');
+
+# Two short lived changes to see that switching does not lead
+# to havoc.
+
+UPDATE performance_schema.setup_consumers SET ENABLED = 'NO'
+WHERE NAME = 'events_waits_history';
+
+UPDATE performance_schema.setup_consumers SET ENABLED = 'YES'
+WHERE NAME = 'events_waits_history';