Bug #21020 | coalesce() inconsistency with empty strings | ||
---|---|---|---|
Submitted: | 12 Jul 2006 22:02 | Modified: | 13 Jul 2006 19:55 |
Reporter: | Ville Skyttä | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.22 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[12 Jul 2006 22:02]
Ville Skyttä
[13 Jul 2006 19:55]
Valeriy Kravchuk
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. With 5.0.25-BK on Linux I've got: openxs@suse:~/dbs/5.0> bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 to server version: 5.0.25 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select coalesce('', 'foo'); +---------------------+ | coalesce('', 'foo') | +---------------------+ | | +---------------------+ 1 row in set (0.00 sec) mysql> select coalesce('', NULL, 'foo'); +---------------------------+ | coalesce('', NULL, 'foo') | +---------------------------+ | | +---------------------------+ 1 row in set (0.00 sec) mysql> select coalesce(NULL, '', 'foo'); +---------------------------+ | coalesce(NULL, '', 'foo') | +---------------------------+ | | +---------------------------+ 1 row in set (0.00 sec) mysql> select coalesce('bar', NULL, '', 'foo'); +----------------------------------+ | coalesce('bar', NULL, '', 'foo') | +----------------------------------+ | bar | +----------------------------------+ 1 row in set (0.00 sec) That is, consistent results, as documented. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html