summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/mtr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/mtr
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/mtr')
-rw-r--r--mysql-test/suite/mtr/t/combs.combinations5
-rw-r--r--mysql-test/suite/mtr/t/combs.inc1
-rw-r--r--mysql-test/suite/mtr/t/inc.inc1
-rw-r--r--mysql-test/suite/mtr/t/newcomb.result3
-rw-r--r--mysql-test/suite/mtr/t/newcomb.test5
-rw-r--r--mysql-test/suite/mtr/t/proxy.inc2
-rw-r--r--mysql-test/suite/mtr/t/self.result3
-rw-r--r--mysql-test/suite/mtr/t/self.test4
-rw-r--r--mysql-test/suite/mtr/t/simple,c2,s1.rdiff11
-rw-r--r--mysql-test/suite/mtr/t/simple,s2,c2.rdiff11
-rw-r--r--mysql-test/suite/mtr/t/simple,s2.result9
-rw-r--r--mysql-test/suite/mtr/t/simple.combinations5
-rw-r--r--mysql-test/suite/mtr/t/simple.result9
-rw-r--r--mysql-test/suite/mtr/t/simple.test15
-rw-r--r--mysql-test/suite/mtr/t/single.result3
-rw-r--r--mysql-test/suite/mtr/t/single.test5
-rw-r--r--mysql-test/suite/mtr/t/source.result3
-rw-r--r--mysql-test/suite/mtr/t/source.test8
-rw-r--r--mysql-test/suite/mtr/t/test2.result4
-rw-r--r--mysql-test/suite/mtr/t/test2.test10
-rw-r--r--mysql-test/suite/mtr/t/testsh.result3
-rw-r--r--mysql-test/suite/mtr/t/testsh.test6
22 files changed, 126 insertions, 0 deletions
diff --git a/mysql-test/suite/mtr/t/combs.combinations b/mysql-test/suite/mtr/t/combs.combinations
new file mode 100644
index 00000000..9e49febf
--- /dev/null
+++ b/mysql-test/suite/mtr/t/combs.combinations
@@ -0,0 +1,5 @@
+[c1]
+allow-suspicious-udfs
+
+[c2]
+disable-local-infile
diff --git a/mysql-test/suite/mtr/t/combs.inc b/mysql-test/suite/mtr/t/combs.inc
new file mode 100644
index 00000000..fb677ac9
--- /dev/null
+++ b/mysql-test/suite/mtr/t/combs.inc
@@ -0,0 +1 @@
+select @@local_infile;
diff --git a/mysql-test/suite/mtr/t/inc.inc b/mysql-test/suite/mtr/t/inc.inc
new file mode 100644
index 00000000..bf391f6e
--- /dev/null
+++ b/mysql-test/suite/mtr/t/inc.inc
@@ -0,0 +1 @@
+let $a=1;
diff --git a/mysql-test/suite/mtr/t/newcomb.result b/mysql-test/suite/mtr/t/newcomb.result
new file mode 100644
index 00000000..8f7c1251
--- /dev/null
+++ b/mysql-test/suite/mtr/t/newcomb.result
@@ -0,0 +1,3 @@
+select 1;
+1
+1
diff --git a/mysql-test/suite/mtr/t/newcomb.test b/mysql-test/suite/mtr/t/newcomb.test
new file mode 100644
index 00000000..fa0fa48e
--- /dev/null
+++ b/mysql-test/suite/mtr/t/newcomb.test
@@ -0,0 +1,5 @@
+#
+# this tests how mtr handles a test that has no combinations in the
+# parent suite and one combination in the overlay.
+#
+select 1;
diff --git a/mysql-test/suite/mtr/t/proxy.inc b/mysql-test/suite/mtr/t/proxy.inc
new file mode 100644
index 00000000..245f6a5a
--- /dev/null
+++ b/mysql-test/suite/mtr/t/proxy.inc
@@ -0,0 +1,2 @@
+select "proxy";
+source combs.inc;
diff --git a/mysql-test/suite/mtr/t/self.result b/mysql-test/suite/mtr/t/self.result
new file mode 100644
index 00000000..bd0d7c6e
--- /dev/null
+++ b/mysql-test/suite/mtr/t/self.result
@@ -0,0 +1,3 @@
+select "<>";
+<>
+<>
diff --git a/mysql-test/suite/mtr/t/self.test b/mysql-test/suite/mtr/t/self.test
new file mode 100644
index 00000000..ad6e155c
--- /dev/null
+++ b/mysql-test/suite/mtr/t/self.test
@@ -0,0 +1,4 @@
+#
+# Test file that includes itself. See self.test in the example overlay
+#
+eval select "<$a>";
diff --git a/mysql-test/suite/mtr/t/simple,c2,s1.rdiff b/mysql-test/suite/mtr/t/simple,c2,s1.rdiff
new file mode 100644
index 00000000..3023756a
--- /dev/null
+++ b/mysql-test/suite/mtr/t/simple,c2,s1.rdiff
@@ -0,0 +1,11 @@
+--- suite/mtr/t/simple.result 2012-02-04 12:13:41.000000000 +0100
++++ suite/mtr/t/simple,infile,verbose.reject 2012-02-04 12:16:10.000000000 +0100
+@@ -3,7 +3,7 @@
+ proxy
+ select @@local_infile;
+ @@local_infile
+-1
++0
+ select @@old;
+ @@old
+ 0
diff --git a/mysql-test/suite/mtr/t/simple,s2,c2.rdiff b/mysql-test/suite/mtr/t/simple,s2,c2.rdiff
new file mode 100644
index 00000000..a9b9b56e
--- /dev/null
+++ b/mysql-test/suite/mtr/t/simple,s2,c2.rdiff
@@ -0,0 +1,11 @@
+--- suite/mtr/t/simple,old.result 2012-02-04 12:13:25.000000000 +0100
++++ suite/mtr/t/simple,old,infile.reject 2012-02-04 12:13:59.000000000 +0100
+@@ -3,7 +3,7 @@
+ proxy
+ select @@local_infile;
+ @@local_infile
+-1
++0
+ select @@old;
+ @@old
+ 1
diff --git a/mysql-test/suite/mtr/t/simple,s2.result b/mysql-test/suite/mtr/t/simple,s2.result
new file mode 100644
index 00000000..0cd7a21e
--- /dev/null
+++ b/mysql-test/suite/mtr/t/simple,s2.result
@@ -0,0 +1,9 @@
+select "proxy";
+proxy
+proxy
+select @@local_infile;
+@@local_infile
+1
+select @@old;
+@@old
+1
diff --git a/mysql-test/suite/mtr/t/simple.combinations b/mysql-test/suite/mtr/t/simple.combinations
new file mode 100644
index 00000000..88cbb688
--- /dev/null
+++ b/mysql-test/suite/mtr/t/simple.combinations
@@ -0,0 +1,5 @@
+[s1]
+verbose
+
+[s2]
+old
diff --git a/mysql-test/suite/mtr/t/simple.result b/mysql-test/suite/mtr/t/simple.result
new file mode 100644
index 00000000..b4a0c123
--- /dev/null
+++ b/mysql-test/suite/mtr/t/simple.result
@@ -0,0 +1,9 @@
+select "proxy";
+proxy
+proxy
+select @@local_infile;
+@@local_infile
+1
+select @@old;
+@@old
+0
diff --git a/mysql-test/suite/mtr/t/simple.test b/mysql-test/suite/mtr/t/simple.test
new file mode 100644
index 00000000..f69a7dc7
--- /dev/null
+++ b/mysql-test/suite/mtr/t/simple.test
@@ -0,0 +1,15 @@
+#
+# This tests the following:
+# simple.test has two combinations (in simple.combinations).
+# it includes combs.inc (indirectly, via proxy.inc) with two more combinations
+# thus it should run 4 times
+#
+# combs.combinations is overlayed in the example overlay, adding one more
+# combination. Thus simple.test must run two more times in the mtr-example.
+#
+# Note that neither simple.test nor proxy.inc are touched by the overlay,
+# mtr needs to propagate "affected by the overlay" flag up the
+# inclusion chain.
+#
+source proxy.inc;
+select @@old;
diff --git a/mysql-test/suite/mtr/t/single.result b/mysql-test/suite/mtr/t/single.result
new file mode 100644
index 00000000..8f7c1251
--- /dev/null
+++ b/mysql-test/suite/mtr/t/single.result
@@ -0,0 +1,3 @@
+select 1;
+1
+1
diff --git a/mysql-test/suite/mtr/t/single.test b/mysql-test/suite/mtr/t/single.test
new file mode 100644
index 00000000..15262646
--- /dev/null
+++ b/mysql-test/suite/mtr/t/single.test
@@ -0,0 +1,5 @@
+#
+# the test is present in the mtr suite and is not affected by the example
+# overlay. It should run only once.
+#
+select 1;
diff --git a/mysql-test/suite/mtr/t/source.result b/mysql-test/suite/mtr/t/source.result
new file mode 100644
index 00000000..8f7c1251
--- /dev/null
+++ b/mysql-test/suite/mtr/t/source.result
@@ -0,0 +1,3 @@
+select 1;
+1
+1
diff --git a/mysql-test/suite/mtr/t/source.test b/mysql-test/suite/mtr/t/source.test
new file mode 100644
index 00000000..1a2fc61e
--- /dev/null
+++ b/mysql-test/suite/mtr/t/source.test
@@ -0,0 +1,8 @@
+#
+# The inc.inc file is overlayed in the example overlay. mtr should correctly
+# detect that this test needs to run for mtr-example. And mysqltest
+# needs to use the correct version of inc.inc depending on whether it
+# runs the parent suite or the overlay.
+#
+source inc.inc;
+eval select $a;
diff --git a/mysql-test/suite/mtr/t/test2.result b/mysql-test/suite/mtr/t/test2.result
new file mode 100644
index 00000000..b1a55b32
--- /dev/null
+++ b/mysql-test/suite/mtr/t/test2.result
@@ -0,0 +1,4 @@
+select @@local_infile;
+select @@max_error_count;
+@@max_error_count
+64
diff --git a/mysql-test/suite/mtr/t/test2.test b/mysql-test/suite/mtr/t/test2.test
new file mode 100644
index 00000000..5e310eae
--- /dev/null
+++ b/mysql-test/suite/mtr/t/test2.test
@@ -0,0 +1,10 @@
+#
+# This test has two combinations in the mtr suite (from combs.combinations)
+# and one combination from mtr-example (overlayed combs.combinations).
+# But it also has test2.opt file in the overlay. Thus it will run
+# two times in the parent suite, and three times in the overlay.
+#
+--disable_result_log
+source combs.inc;
+--enable_result_log
+select @@max_error_count;
diff --git a/mysql-test/suite/mtr/t/testsh.result b/mysql-test/suite/mtr/t/testsh.result
new file mode 100644
index 00000000..8f7c1251
--- /dev/null
+++ b/mysql-test/suite/mtr/t/testsh.result
@@ -0,0 +1,3 @@
+select 1;
+1
+1
diff --git a/mysql-test/suite/mtr/t/testsh.test b/mysql-test/suite/mtr/t/testsh.test
new file mode 100644
index 00000000..0bb818d2
--- /dev/null
+++ b/mysql-test/suite/mtr/t/testsh.test
@@ -0,0 +1,6 @@
+#
+# There is testsh-master.sh in the example overlay. That makes the test
+# "affected by the overlay" and it will run twice: for the parent suite and
+# for the overlay.
+#
+select 1;