Bug #50185 Wrong data type used on return value in German and Japanese docs for IFNULL()
Submitted: 8 Jan 2010 12:36 Modified: 19 Jan 2010 17:14
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[8 Jan 2010 12:36] Susanne Ebrecht
Description:
Look at section IFNULL() here:

http://dev.mysql.com/doc/refman/5.1/de/control-flow-functions.html
http://dev.mysql.com/doc/refman/5.1/ja/control-flow-functions.html

More worse in French and Spanish:
http://dev.mysql.com/doc/refman/5.0/es/control-flow-functions.html
http://dev.mysql.com/doc/refman/5.0/fr/control-flow-functions.html

And now compare it with:
http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html
http://dev.mysql.com/doc/refman/5.1/en/control-flow-functions.html
http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html

You will find in German/Japanese documentation that IFNULL is returning CHAR()

You will find in all the English docs that IFNULL is returning VARBINARY()

My own tests showed that the English docs are correct here.

How to repeat:
Just see above

Suggested fix:
Fix the 5.1 docs in the all other languages then English
[19 Jan 2010 9:17] Stefan Hinz
Paul: I've fixed the example for IFNULL() in the Japanese and German 5.1 Manuals. Testing with MySQL 5.1.42 proved that, in fact, the table created looks like this:

mysql> DESCRIBE tmp;
+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| test  | varbinary(12) | NO   |     |         |       |
+-------+---------------+------+-----+---------+-------+

Note that the length is 12, as opposed to what the example shows (4). I'm not sure if that's just due to different server settings in my installation, though.

There's a different glitch in the English docs, though. The example for IFNULL() ends like this:

+-------+--------------+------+-----+---------+-------+
| Field | Type         | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| test  | varbinary(4) | NO   |     |         |       |
+-------+--------------+------+-----+---------+-------+
In this example, the type of the test column is CHAR(4).

Well, obviously it's not CHAR, but rather VARBINARY. :-)
[19 Jan 2010 17:14] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.