Bug #40896 CREATE PROCEDURE fails with the use of a variable for separator
Submitted: 20 Nov 2008 16:55 Modified: 20 Nov 2008 19:24
Reporter: Nicolas Fairon Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.0.45, 5.0.70, 5.1.30, 6.0.7 OS:Linux (CentOS 5)
Assigned to: CPU Architecture:Any
Tags: group_concat, SEPARATOR, stored procedure, variable
Triage: Triaged: D3 (Medium)

[20 Nov 2008 16:55] Nicolas Fairon
Description:
Goal : Creating a function groupings values from a table and separating them with a given separator.

Bug #3368 fixed the problem of a variable in GROUP_CONCAT when creating a procedure but not with the SEPARATOR argument.

How to repeat:
Code working :
CREATE PROCEDURE test(y VARCHAR(10))
BEGIN
SELECT GROUP_CONCAT(y SEPARATOR 'abc')
END

Code failing :
CREATE PROCEDURE test(y VARCHAR(10))
BEGIN
SELECT GROUP_CONCAT('abc' SEPARATOR y)
END
[20 Nov 2008 19:24] Valeriy Kravchuk
Thank you for a problem report. Verified on MySQL 5.0.70, 5.1.30 and 6.0.7.