Skip to content

Commit b81aef5

Browse files
committed
MDEV-37908: Replace perror link with GitBook
Replace the KB link in `extra/perror` (from MDEV-34168) with a computed GitBook docs link Reviewed-by: Daniel Black <[email protected]>
1 parent cff6879 commit b81aef5

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

extra/perror.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,13 @@ int main(int argc,char *argv[])
360360
{
361361
found= 1;
362362
if (verbose)
363+
{
364+
int hundred= code / 100;
363365
printf("MariaDB error code %3d (%s): %s\n"
364-
"Learn more: https://mariadb.com/kb/en/e%3d/\n", code, name, msg, code);
366+
"Learn more: https://mariadb.com/docs/server/reference/"
367+
"error-codes/mariadb-error-codes-%d00-to-%d99/e%3d\n",
368+
code, name, msg, hundred, hundred, code);
369+
}
365370
else
366371
puts(msg);
367372
}

mysql-test/main/perror-win.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Win32 error code 150: System trace information was not specified in your CONFIG.
33
OS error code 23: Too many open files in system
44
Win32 error code 23: Data error (cyclic redundancy check).
55
MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
6-
Learn more: https://mariadb.com/kb/en/e1062/
6+
Learn more: https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1000-to-1099/e1062
77
Win32 error code 1062: The service has not been started.
88
Illegal error code: 30000

mysql-test/main/perror.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Illegal error code: 10000
22
MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
3-
Learn more: https://mariadb.com/kb/en/e1062/
3+
Learn more: https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1000-to-1099/e1062
44
MariaDB error code 1408 (ER_STARTUP): %s: ready for connections.
55
Version: '%s' socket: '%s' port: %d %s
6-
Learn more: https://mariadb.com/kb/en/e1408/
6+
Learn more: https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1400-to-1499/e1408
77
MariaDB error code 1459 (ER_TABLE_NEEDS_UPGRADE): Upgrade required. Please do "REPAIR %s %`s" or dump/reload to fix it!
8-
Learn more: https://mariadb.com/kb/en/e1459/
8+
Learn more: https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1400-to-1499/e1459
99
MariaDB error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
10-
Learn more: https://mariadb.com/kb/en/e1461/
10+
Learn more: https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1400-to-1499/e1461

0 commit comments

Comments
 (0)