summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/perror.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/main/perror.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/main/perror.test')
-rw-r--r--mysql-test/main/perror.test34
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/main/perror.test b/mysql-test/main/perror.test
new file mode 100644
index 00000000..f1c8926a
--- /dev/null
+++ b/mysql-test/main/perror.test
@@ -0,0 +1,34 @@
+--source include/not_windows.inc
+#
+# Check if the variable MY_PERROR is set
+#
+--require include/have_perror.require
+disable_query_log;
+eval select LENGTH("$MY_PERROR") > 0 as "have_perror";
+enable_query_log;
+
+--exec $MY_PERROR 150 > /dev/null
+--exec $MY_PERROR --silent 120 > /dev/null
+
+#
+# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror
+#
+
+# Test with error code 10000 as it's a common "unknown error"
+# As there is no error code defined for 10000, expect error
+--error 1
+--exec $MY_PERROR 10000 2>&1
+
+#
+# Bug#10143 (Perror not showing error description)
+#
+
+# test reported case
+--exec $MY_PERROR 1062 2>&1
+
+# test errors that contain characters to escape in the text.
+--exec $MY_PERROR 1408 2>&1
+--exec $MY_PERROR 1459 2>&1
+--exec $MY_PERROR 1461 2>&1
+
+