Bug #10024 | Only first character of column shown | ||
---|---|---|---|
Submitted: | 20 Apr 2005 8:43 | Modified: | 13 Jul 2005 11:34 |
Reporter: | Taco van den Broek | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.4-beta | OS: | Any (*) |
Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
[20 Apr 2005 8:43]
Taco van den Broek
[20 Apr 2005 12:46]
Geert Vanderkelen
Hi Taco, I could reproduce this in 5.0.3 and 5.0.4. It works correct in 4.1.11. It only happens when adding ORDER BY to the statement and when using a field in expr1 of the IF() function and combining strings with integer for expr2 and expr3. Thanks for the report! Here couple of examples: mysql-5.0.4-beta-standard-log> SELECT bar_title, IF(unix_timestamp IS NULL, 0, 546464) FROM bar LEFT JOIN foo ON foo.bar_id = bar.bar_id order by foo_id asc; +-----------+---------------------------------------+ | bar_title | IF(unix_timestamp IS NULL, 0, 546464) | +-----------+---------------------------------------+ | baz | 546464 | | qux | 546464 | +-----------+---------------------------------------+ mysql-5.0.4-beta-standard-log> SELECT bar_title, IF(unix_timestamp IS NULL, '-', 546464) FROM bar LEFT JOIN foo ON foo.bar_id = bar.bar_id order by foo_id asc; +-----------+-----------------------------------------+ | bar_title | IF(unix_timestamp IS NULL, '-', 546464) | +-----------+-----------------------------------------+ | baz | 5 | | qux | 5 | +-----------+-----------------------------------------+ mysql-5.0.4-beta-standard-log> SELECT bar_title, IF(unix_timestamp IS NULL, '-', unix_timestamp) FROM bar LEFT JOIN foo ON foo.bar_id = bar.bar_id order by foo_id asc; +-----------+-------------------------------------------------+ | bar_title | IF(unix_timestamp IS NULL, '-', unix_timestamp) | +-----------+-------------------------------------------------+ | baz | 1 | | qux | 1 | +-----------+-------------------------------------------------+ mysql-5.0.4-beta-standard-log> SELECT bar_title, IF(unix_timestamp IS NULL, '-', unix_timestamp) FROM bar LEFT JOIN foo ON foo.bar_id = bar.bar_id -> ; +-----------+-------------------------------------------------+ | bar_title | IF(unix_timestamp IS NULL, '-', unix_timestamp) | +-----------+-------------------------------------------------+ | baz | 1112652000 | | qux | 1113343200 | +-----------+-------------------------------------------------+ Best regards, Geert
[13 Jul 2005 11:34]
Alexey Botchkov
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: Fixed with previous patches