diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/include/innodb_isolation_selects.inc | |
parent | Initial commit. (diff) | |
download | mariadb-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/innodb/include/innodb_isolation_selects.inc')
-rw-r--r-- | mysql-test/suite/innodb/include/innodb_isolation_selects.inc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/include/innodb_isolation_selects.inc b/mysql-test/suite/innodb/include/innodb_isolation_selects.inc new file mode 100644 index 00000000..922f5c1c --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb_isolation_selects.inc @@ -0,0 +1,15 @@ +# These same selects are used many times in innodb_isolation.test + +--echo ########## innodb_isolation_selects.inc ########## +SELECT * FROM t1; +SELECT COUNT(*) FROM t1; +SELECT COUNT(c1) FROM t1; +SELECT COUNT(c2) FROM t1; # Uses secondary index k2 +SELECT COUNT(c3) FROM t1; # Uses clustered index +SELECT SUM(c1) FROM t1; # Uses secondary index +SELECT SUM(c2) FROM t1; # Uses secondary index +SELECT AVG(c1), MAX(c1), MIN(c2), AVG(c3), SUM(c4) FROM t1; # Uses clustered index +SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2); +SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2); +SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1); +--echo ############################################### |