Bug #973 concat_ws behaviour change 4.0.13 -> 4.0.14
Submitted: 31 Jul 2003 22:30 Modified: 10 Dec 2003 16:56
Reporter: Christopher Pascoe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.14 OS:Linux (Linux (RPM install))
Assigned to: Michael Widenius CPU Architecture:Any

[31 Jul 2003 22:30] Christopher Pascoe
Description:
It appears that the "new" behaviour for concat_ws (shown in bug #586) was introduced in mySQL 4.0.14 despite the comment in that bug that this change will take place for the 4.1 release.

The change is not shown in the revision history and the online reference manual
still shows the "old" behaviour.

Chris

How to repeat:
Compare the output of 

SELECT CONCAT_WS(",","A","","B");

on 4.0.13 and 4.0.14 builds.

Suggested fix:
Revert 4.0 release to old behaviour as per the notes in bug #586.
[10 Dec 2003 16:56] Michael Widenius
I have now updated the description of bug #586

The concat_ws() was intentially fixed in 4.0.14 and not in 4.1 as this was, in our opinion, a bug in how concat_ws() was supposed to work.

If you want to skip empty strings, you can always wrap the argument in an IF(a<>"",a,NULL) construct.