summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/win.result26
-rw-r--r--mysql-test/main/win.test20
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result26
-rw-r--r--mysql-test/suite/innodb/r/innodb.result17
-rw-r--r--mysql-test/suite/innodb/t/innodb.test18
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.result7
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.test18
-rw-r--r--mysql-test/suite/unit/suite.pm4
8 files changed, 124 insertions, 12 deletions
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index ed10568703c..acc3de96fe8 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -3866,6 +3866,32 @@ NULL
DROP VIEW v1;
DROP TABLE t1,t2;
#
+# MDEV-25032 Window functions without column references get removed from ORDER BY
+#
+create table t1 (id int, score double);
+insert into t1 values
+(1, 5),
+(1, 6),
+(1, 6),
+(1, 6),
+(1, 7),
+(1, 8.1),
+(1, 9),
+(1, 10);
+select id, row_number() over () rn
+from t1
+order by rn desc;
+id rn
+1 8
+1 7
+1 6
+1 5
+1 4
+1 3
+1 2
+1 1
+drop table t1;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index f5ad5e8b778..007e608a0a1 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2523,6 +2523,26 @@ DROP VIEW v1;
DROP TABLE t1,t2;
--echo #
+--echo # MDEV-25032 Window functions without column references get removed from ORDER BY
+--echo #
+
+create table t1 (id int, score double);
+insert into t1 values
+(1, 5),
+(1, 6),
+(1, 6),
+(1, 6),
+(1, 7),
+(1, 8.1),
+(1, 9),
+(1, 10);
+select id, row_number() over () rn
+from t1
+order by rn desc;
+
+drop table t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
index 14c754a76bc..43dcbbc2d70 100644
--- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -3872,6 +3872,32 @@ NULL
DROP VIEW v1;
DROP TABLE t1,t2;
#
+# MDEV-25032 Window functions without column references get removed from ORDER BY
+#
+create table t1 (id int, score double);
+insert into t1 values
+(1, 5),
+(1, 6),
+(1, 6),
+(1, 6),
+(1, 7),
+(1, 8.1),
+(1, 9),
+(1, 10);
+select id, row_number() over () rn
+from t1
+order by rn desc;
+id rn
+1 8
+1 7
+1 6
+1 5
+1 4
+1 3
+1 2
+1 1
+drop table t1;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 94c73a84679..bcdd799f9ff 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -3319,3 +3319,20 @@ c1 c2
9 3
DROP TABLE t1;
DROP TABLE t2;
+#
+# MDEV-24748 Extern field check missing
+# in btr_index_rec_validate()
+#
+CREATE TABLE t1 (pk INT, c1 char(255),
+c2 char(255), c3 char(255), c4 char(255),
+c5 char(255), c6 char(255), c7 char(255),
+c8 char(255), primary key (pk)
+) CHARACTER SET utf32 ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(1, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'),
+(2, 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p');
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+ALTER TABLE t1 FORCE;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index a81e6c3f900..ba5126e4757 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -2592,3 +2592,21 @@ SELECT * FROM t2;
DROP TABLE t1;
DROP TABLE t2;
+
+--echo #
+--echo # MDEV-24748 Extern field check missing
+--echo # in btr_index_rec_validate()
+--echo #
+CREATE TABLE t1 (pk INT, c1 char(255),
+c2 char(255), c3 char(255), c4 char(255),
+c5 char(255), c6 char(255), c7 char(255),
+c8 char(255), primary key (pk)
+) CHARACTER SET utf32 ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+ (1, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'),
+ (2, 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p');
+CHECK TABLE t1;
+ALTER TABLE t1 FORCE;
+# Cleanup
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.result b/mysql-test/suite/mariabackup/log_page_corruption.result
index be29ea435b6..91db833622a 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.result
+++ b/mysql-test/suite/mariabackup/log_page_corruption.result
@@ -23,11 +23,12 @@ INSERT INTO t6_corrupted_to_drop VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t7_corrupted_to_alter VALUES (3), (4), (5), (6), (7), (8), (9);
# Corrupt tables
# restart
-# Backup must fail due to page corruption
+# Backup must fail due to page corruption
FOUND 1 /Database page corruption detected.*/ in backup.log
# "innodb_corrupted_pages" file must not exist
-# Backup must fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
+# Backup must not fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
FOUND 1 /Database page corruption detected.*/ in backup.log
+FOUND 1 /completed OK!/ in backup.log
--- "innodb_corrupted_pages" file content: ---
test/t1_corrupted
6 8 9
@@ -44,7 +45,7 @@ INSERT INTO t1_inc_corrupted VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t2_inc_corrupted VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t3_inc VALUES (3), (4), (5), (6), (7), (8), (9);
# restart
-# Backup must fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
+# Backup must not fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
--- "innodb_corrupted_pages" file content: ---
test/t1_corrupted
6 8 9
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.test b/mysql-test/suite/mariabackup/log_page_corruption.test
index e9419687288..0151afb96b4 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.test
+++ b/mysql-test/suite/mariabackup/log_page_corruption.test
@@ -59,7 +59,7 @@ EOF
--let corrupted_pages_file_filt = $MYSQLTEST_VARDIR/tmp/innodb_corrupted_pages_filt
--let perl_result_file=$MYSQLTEST_VARDIR/tmp/perl_result
---echo # Backup must fail due to page corruption
+--echo # Backup must fail due to page corruption
--disable_result_log
--error 1
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $backuplog;
@@ -80,15 +80,19 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=
--let after_copy_test_t7_corrupted_to_alter=ALTER TABLE test.t7_corrupted_to_alter ADD COLUMN (d INT)
--let add_corrupted_page_for_test_t7_corrupted_to_alter=3
---echo # Backup must fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
+--echo # Backup must not fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
--disable_result_log
---error 1
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --log-innodb-page-corruption --target-dir=$targetdir --dbug=+d,mariabackup_events,mariabackup_inject_code > $backuplog
--enable_result_log
--let SEARCH_PATTERN=Database page corruption detected.*
--let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc
+
+--let SEARCH_PATTERN=completed OK!
+--let SEARCH_FILE=$backuplog
+--source include/search_pattern_in_file.inc
+
--echo --- "innodb_corrupted_pages" file content: ---
perl;
do "$ENV{MTR_SUITE_DIR}/include/corrupt-page.pl";
@@ -145,9 +149,8 @@ EOF
--let after_copy_test_t7_inc_corrupted_to_alter=ALTER TABLE test.t7_inc_corrupted_to_alter ADD COLUMN (d INT)
--let add_corrupted_page_for_test_t7_inc_corrupted_to_alter=3
---echo # Backup must fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
+--echo # Backup must not fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
--disable_result_log
---error 1
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --log-innodb-page-corruption --target-dir=$incdir --incremental-basedir=$targetdir --dbug=+d,mariabackup_events,mariabackup_inject_code > $backuplog
--disable_result_log
@@ -161,6 +164,9 @@ EOF
--let SEARCH_PATTERN=Database page corruption detected.*
--let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=completed OK!
+--source include/search_pattern_in_file.inc
+
--let corrupted_pages_file = $incdir/innodb_corrupted_pages
--echo --- "innodb_corrupted_pages" file content: ---
perl;
@@ -260,7 +266,6 @@ EOF
--echo # Full backup with --log-innodb-page-corruption
--disable_result_log
---error 1
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --log-innodb-page-corruption --target-dir=$targetdir
--enable_result_log
--let corrupted_pages_file = $targetdir/innodb_corrupted_pages
@@ -288,7 +293,6 @@ EOF
--echo # Incremental backup --log-innodb-page-corruption
--disable_result_log
---error 1
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --log-innodb-page-corruption --target-dir=$incdir --incremental-basedir=$targetdir --dbug=+d,mariabackup_events,mariabackup_inject_code > $backuplog
--disable_result_log
--let corrupted_pages_file = $incdir/innodb_corrupted_pages
diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm
index 43c9e115de6..53f8923777a 100644
--- a/mysql-test/suite/unit/suite.pm
+++ b/mysql-test/suite/unit/suite.pm
@@ -48,10 +48,10 @@ sub start_test {
my ($command, %tests, $prefix);
for (@ctest_list) {
chomp;
- if (/^\d+: Test command: +([^ \t]+)/) {
+ if (/^\d+: Test command: +([^ \t]+.*)/) {
$command= $1;
$prefix= /libmariadb/ ? 'conc_' : '';
- } elsif (/^ +Test +#\d+: ([^ \t]+)/) {
+ } elsif (/^ +Test +#\d+: ([^ \t]+.*)/) {
if ($command ne "NOT_AVAILABLE" && $command ne "/bin/sh") {
$tests{$prefix.$1}=$command;
}