Bug #26571 Different format specifiers in errmsg.txt
Submitted: 22 Feb 2007 16:40 Modified: 13 Mar 2007 20:14
Reporter: Magnus Svensson
Status: Closed
Category:Server: General Severity:S1 (Critical)
Version:5.0.36 OS:Any (all)
Assigned to: Magnus Svensson Target Version:

[22 Feb 2007 16:40] Magnus Svensson
Description:
While working on another bug I found mismatch between the format specifiers for different
transalations of the same error message.

This can potentially crash the server if an error occurs that passes two integers but the
format specifiers says tow strings.

Ex:
nla "Kan file '%-.200s' niet aanmaken (Errcode: %s)"
eng "Can't create file '%-.200s' (errno: %d)"

When running this server with deutch translations it will most likely crash when printing
the erorr messages.

In addition to this, there was a large number of cases where the english translation has
"%-.200s' while the other transalation where still at "%-.64s" or the other way around
where the translator had been "smart" and added that max length parameter whil it was not
in the english version. This is probably not as serisous but it will not look good it for
example paths are truncated differenttly denpendgin on translation.

How to repeat:
Check errmsg.txt

Suggested fix:
I have added a check for this in comp_err.c our tool that "compiles" errmsg.txt into the
language files used by mysqld.
[22 Feb 2007 16:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20377

ChangeSet@1.2414, 2007-02-22 16:41:51+01:00, msvensson@pilot.blaudden +3 -0
  Bug #26571  	Different format specifiers in errmsg.txt
  - Add check of format specifiers in error message strings
  - Update error message text accordingly to be equal between all translations
[8 Mar 2007 22:32] Tim Smith
pushed to 5.0.38, 5.1.17
[13 Mar 2007 20:14] Paul DuBois
Noted in 5.0.38, 5.1.17 changelogs.

In some error messages, inconsistent format specifiers were used for
the translations in different languages. comp_err (the error message
compiler) now checks for mismatches.