summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/t/misc.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/t/misc.test')
-rw-r--r--mysql-test/suite/perfschema/t/misc.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index af19e8db51d..00b175ec391 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -169,3 +169,23 @@ SELECT object_schema,
DROP TABLE t_60905;
+
+#
+# Bug#11929832 - EVENTS_STATEMENTS_HISTORY HAS ERRORS=0 WHEN THERE ARE ERRORS
+#
+# Verify that SQL errors are properly counted.
+
+use test;
+truncate performance_schema.events_statements_history;
+truncate performance_schema.events_statements_history_long;
+
+--error ER_NO_SUCH_TABLE
+select * from t1;
+
+--echo
+select mysql_errno, returned_sqlstate, message_text, errors, warnings
+ from performance_schema.events_statements_history where errors > 0;
+
+--echo
+select mysql_errno, returned_sqlstate, message_text, errors, warnings from
+ performance_schema.events_statements_history_long where errors > 0;