Bug #47582 | main.perror-win fails on non-English versions of Windows | ||
---|---|---|---|
Submitted: | 24 Sep 2009 7:11 | Modified: | 25 Jun 2013 10:25 |
Reporter: | Sergey Petrunya | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1, 5.5 | OS: | Windows (XP Russian, Bulgarian) |
Assigned to: | CPU Architecture: | Any |
[24 Sep 2009 7:11]
Sergey Petrunya
[24 Sep 2009 8:24]
Susanne Ebrecht
Many thanks for writing a bug report. I will give this to Kostja.
[24 Sep 2009 8:28]
Susanne Ebrecht
btw. I have no clue about Russian but I was able to reproduce with German.
[24 Sep 2009 9:28]
Peter Laursen
@Sergey - just FYI: "it is not possible to turn e.g. Russian Windows into English one". Well it is possible with Vista and Win7 ULTIMATE editions (not sure about 2008). In Vista+ localisation is achieved through language files. But only ULTIMATEs will let you use another one than the original.
[30 Sep 2009 19:36]
Vladislav Vaintroub
I cannot try since I've got only English Windows, but this patch could help === modified file 'extra/perror.c' --- extra/perror.c 2009-07-24 06:45:06 +0000 +++ extra/perror.c 2009-09-30 19:34:30 +0000 @@ -191,7 +191,8 @@ LPTSTR s; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, error, 0, (LPTSTR)&s, 0, + NULL, error, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), + (LPTSTR)&s, 0, NULL)) { if (verbose)
[1 Oct 2009 19:13]
Sergey Petrunya
Vlad, I've tried this and now perror.exe prints: Illegal error code: 1062
[1 Oct 2009 19:24]
Sergey Petrunya
Another problem with this approach is that, do we really want to change messages to English for everyone for the sake of making a test pass? As one alternative I could offer 1. making mysqltest understand multiple --replace_result commands (or have one command understand \-escaped line breaks 2. changing the test to --replace_result <English error text> ERROR_TEXT --replace_result <Russian error text> ERROR_TEXT --replace_result <other language error text> ERROR_TEXT --exec $MY_PERROR 1062 2>&1 then we'll be able to expect single result of ERROR_TEXT
[7 Oct 2009 14:24]
Vladislav Vaintroub
Hmm, --replace_result <English error text> ERROR_TEXT maybe even --replace <anything> ERROR_TEXT I don't think we can guarantee stability of Windows error message texts across all versions of windows, nor can we get all possible localized messages for these 2 errors. I'm sorry my attempt did not work.. Personally, I would prefer to see OS error messages in English instead of localized versions, as English is more google-friendly´== easy to find a help on the internet.
[27 Oct 2009 18:39]
MySQL Verification Team
Failed on Portuguese Brazilian version too: main.perror [ pass ] 248 main.perror-win [ fail ] Test ended at 2009-10-27 14:56:24 CURRENT_TEST: main.perror-win 'diff' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes. 'mtrdiff' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.
[12 Nov 2010 1:02]
Santo Leto
Obviously the test fails with Italian language too: --- D:/mysql-server/mysql-5.5-build3/mysql-test/r/perror-win.result >>> MySQL error code 150: Foreign key constraint is incorrectly formed Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed. OS error code 23: Too many open files in system Win32 error code 23: Data error (cyclic redundancy check). MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d Win32 error code 1062: The service has not been started. Illegal error code: 30000 <<< --- D:/mysql-server/mysql-5.5-build3/mysql-test/r/perror-win.result >>> MySQL error code 150: Foreign key constraint is incorrectly formed Win32 error code 150: Le informazioni di registrazione del sistema non sono state specificate nel file CONFIG.SYS oppure la registrazione è disattivata. OS error code 23: Too many open files in system Win32 error code 23: Errore nei dati (controllo di ridondanza ciclico). MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d Win32 error code 1062: Servizio non avviato. Illegal error code: 30000 <<<< Same for French language. Bug #43749 can be marked as a duplicate of this one.
[20 Jan 2011 16:14]
Santo Leto
Bug #43749 has been marked as duplicate of this one.
[24 Oct 2012 14:44]
Paul DuBois
Changes for test suite. No changelog entry needed.
[25 Jun 2013 10:25]
Georgi Kodinov
The test still fails if Bulgarian. What's even weirder I get the Cyrillic letters garbled in the failure notification. Here's what I get on a recent 5.5 build : TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 main.perror-win [ fail ] Test ended at 2013-06-25 13:19:05 CURRENT_TEST: main.perror-win --- D:/mysql/work/B16996656-5.5/mysql-test/r/perror-win.result 2013-06-25 11:17:45.0 92000000 +0300 +++ D:\mysql\work\B16996656-5.5\mysql-test\r\perror-win.reject 2013-06-25 13:19:05.3 02071600 +0300 @@ -1,7 +1,7 @@ MySQL error code 150: Foreign key constraint is incorrectly formed -Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed. +Win32 error code 150: ╚эЇюЁьрЎш Єр чр ёыхфхэх эр ёшёЄхьрЄр эх х єърчрэр т·т тр°ш Їр щы CONFIG.SYS шыш яЁюёыхф трэхЄю х чрсЁрэхэю. OS error code 23: Too many open files in system -Win32 error code 23: Data error (cyclic redundancy check). +Win32 error code 23: ├Ёх°ър т фрээшЄх (яЁютхЁър ё Ўшъышўэр ъюэЄЁюыэр ёєьр). MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d -Win32 error code 1062: The service has not been started. +Win32 error code 1062: ╙ёыєурЄр эх х ёЄрЁЄшЁрэр. Illegal error code: 30000