Skip to content

Commit 650d8cf

Browse files
author
Tatiana Azundris Nuernberg
committed
WL#13423: Split errmgs-utf8.txt into one file for messages to clients and another for messages to the error log
The file errmsg-utf8.txt contains error messages: a) messages from the server to clients (error code < 10,000) b) messages for the error log Within both of those two major groups, there exist various sub-ranges (e.g. one per major server version, so that when a message has to be backported, it can be added at the end of that version's range where we have some unused indices without which inserting that message would renumber all that follow it). Additionally, ranges can be reserved for special use. Finally, each error-code can have multiple translations of the same message. This complexity makes it non-obvious where to add new messages, how to backport a messages, and so on. A FAQ has recently been added to the message file to cover the most common and the most difficult cases, and to highlight the fact that there is something to know in the first place where this may not be obvious to the casual users (that is to say, engineers not primarily concerned with the workings of the error subsystems). This changset splits the message file in two for the major groups a) and b) as per above and uses obvious nomenclature to further aid in this goal and to let us simplify the included instructions (simplified and clarified instructions also included in this patchset). Finally, various failsafes are added to the utility that processes these files to catch nonsensical directives, messages in languages not previously declared (to identify potential typos, or cases of different engineers using different abbreviations for the same language), superfluous directives (to identify potential misunderstandings), and so on. Approved by: Jens Even Blomsoy <jens.even.blomsoy@oracle.com>
1 parent a22ba85 commit 650d8cf

31 files changed

+11479
-10851
lines changed

mysql-test/r/comp_err.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# WL#13423: Split errmgs-utf8.txt into one file for messages to clients and another for messages to the error log
2+
SHOULD PASS:
3+
srv2client: msg_srv2client [errlog: msg_errlog]
4+
5+
srv2client: msg_srv2client errlog: msg_errlog_no_start
6+
7+
8+
SHOULD FAIL:
9+
srv2client: msg_start_too_low [errlog: msg_errlog]
10+
Failed to parse the error offset string!
11+
Failed to parse input file msg_start_too_low.txt
12+
13+
srv2client: msg_start_set_twice [errlog: msg_errlog]
14+
start-error-number 4000 set more than once.
15+
Failed to parse input file msg_start_set_twice.txt
16+
17+
srv2client: msg_start_decreasing [errlog: msg_errlog]
18+
start-error-number may only increase the index.
19+
Failed to parse input file msg_start_decreasing.txt
20+
21+
srv2client: msg_srv2client_multilang [errlog: msg_errlog]
22+
More than one languages directive found.
23+
Failed to parse input file msg_srv2client_multilang.txt
24+
25+
srv2client: msg_srv2client_phantom_lang [errlog: msg_errlog]
26+
Message string for error 'ER_NO' in unregistered language 'xxx'
27+
Failed to parse input file msg_srv2client_phantom_lang.txt
28+
29+
srv2client: msg_srv2client_no_msgs [errlog: msg_errlog]
30+
Failed to parse input file msg_srv2client_no_msgs.txt
31+
32+
srv2client: msg_srv2client errlog: msg_errlog_with_lang
33+
More than one languages directive found.
34+
Failed to parse input file msg_errlog_with_lang.txt
35+
36+
self-test result code: 7
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
start-error-number 10000
2+
3+
ER_ERRLOG_HI
4+
eng "Starting error log. Hooray!"
5+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ER_ERRLOG_HI
2+
eng "Starting error log. Hooray!"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
languages english=eng latin1;
2+
3+
start-error-number 10000
4+
5+
ER_ERRLOG_HI
6+
eng "Starting error log. Hooray!"
7+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
languages english=eng latin1;
2+
3+
start-error-number 1000
4+
5+
ER_NO
6+
eng "NO"
7+
8+
ER_YES
9+
eng "YES"
10+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
languages english=eng latin1;
2+
languages english=eng latin1;
3+
4+
start-error-number 1000
5+
6+
ER_NO
7+
eng "NO"
8+
9+
ER_YES
10+
eng "YES"
11+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
languages english=eng latin1;
2+
3+
start-error-number 1000
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
languages english=eng latin1;
2+
3+
start-error-number 5000
4+
5+
ER_NO
6+
eng "NO"
7+
xxx "Hi I'm a language not listed in the languages directive and should throw an error!"
8+
9+
ER_YES
10+
eng "YES"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
languages english=eng latin1;
2+
3+
start-error-number 4000
4+
start-error-number 3000
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
languages english=eng latin1;
2+
3+
start-error-number 4000
4+
start-error-number 4000

0 commit comments

Comments
 (0)