Commit Graph

3 Commits

Author SHA1 Message Date
Azat Khuzhin
259e5ba88e Separate accounting of remote exceptions in system.errors 2021-03-16 22:31:46 +03:00
Yatsishin Ilya
a25fa1996b fix style checks 2020-12-29 17:57:12 +03:00
Azat Khuzhin
b2e2322895 Add system.errors table
Contains error codes with number of times they have been triggered.

Columns:

-   `name` ([String](../../sql-reference/data-types/string.md)) — name of the error (`errorCodeToName`).
-   `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — code number of the error.
-   `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) - number of times this error has been happened.

**Example**

``` sql
SELECT *
FROM system.errors
WHERE value > 0
ORDER BY code ASC
LIMIT 1

┌─name─────────────┬─code─┬─value─┐
│ CANNOT_OPEN_FILE │   76 │     1 │
└──────────────────┴──────┴───────┘
2020-10-29 10:55:38 +03:00