summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/perfschema_stress/t/work.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/work.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/work.test')
-rw-r--r--mysql-test/suite/perfschema_stress/t/work.test37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema_stress/t/work.test b/mysql-test/suite/perfschema_stress/t/work.test
new file mode 100644
index 00000000..d3d9593b
--- /dev/null
+++ b/mysql-test/suite/perfschema_stress/t/work.test
@@ -0,0 +1,37 @@
+# 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
+}
+
+--replace_result $num_stress_rows <num_stress_rows>
+eval SET @rowid = ROUND(RAND() * $num_stress_rows);
+
+let $conn_id= `SELECT CONNECTION_ID()`;
+let $conn_nr= conn_$conn_id;
+
+START TRANSACTION;
+UPDATE t1 SET b = 'changed' WHERE id=@rowid;
+SELECT b FROM t1 WHERE id=@rowid;
+COMMIT;
+
+START TRANSACTION;
+DELETE FROM t1 WHERE id=@rowid;
+INSERT INTO t1 (id, b) VALUES (@rowid, 'newly_inserted');
+SELECT b FROM t1 WHERE id=@rowid;
+COMMIT;
+
+--replace_result $conn_nr <conn_nr>
+eval CREATE TABLE tw_$conn_nr AS SELECT * FROM t1;
+
+--replace_result $conn_nr <conn_nr>
+eval DROP TABLE tw_$conn_nr;