Erroneous SET STATEMENT produces two identical errors

Bug #1386210 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Triaged
Low
Unassigned
5.7
Triaged
Low
Unassigned

Bug Description

MySQL [test]> set statement non_existing=1 for select 1;
ERROR 1193 (HY000): Unknown system variable 'non_existing'
MySQL [test]> show errors;
+-------+------+----------------------------------------+
| Level | Code | Message |
+-------+------+----------------------------------------+
| Error | 1193 | Unknown system variable 'non_existing' |
| Error | 1193 | Unknown system variable 'non_existing' |
+-------+------+----------------------------------------+
2 rows in set (0.00 sec)

MySQL [test]> select @@error_count;
+---------------+
| @@error_count |
+---------------+
| 2 |
+---------------+
1 row in set (0.01 sec)

It looks redundant.

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

This is easy to confirm:

mysql> select version();
+-------------+
| version() |
+-------------+
| 5.6.21-69.0 |
+-------------+
1 row in set (0.03 sec)

mysql> set statement non_existing=1 for select 1;
ERROR 1193 (HY000): Unknown system variable 'non_existing'
mysql> show errors;
+-------+------+----------------------------------------+
| Level | Code | Message |
+-------+------+----------------------------------------+
| Error | 1193 | Unknown system variable 'non_existing' |
| Error | 1193 | Unknown system variable 'non_existing' |
+-------+------+----------------------------------------+
2 rows in set (0.00 sec)

mysql> select @@error_count;
+---------------+
| @@error_count |
+---------------+
| 2 |
+---------------+
1 row in set (0.00 sec)

tags: added: set-statement
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2096

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers