Array of one value, for every integer in another field? I'm stumped on this one, I have the following:

Color  Qty  Length
('Blue', 5, 50),
('Blue', 1, 500),
('Blue', 1, 250),
('Green', 4, 175),
('Green', 2, 35),
('Green', 2, 80)


I need an array that groups by color, showing the length for each qty, by that I mean:

Blue: 50,50,50,50,50,500,250
Green: 175,175,175,175,35,35,80,80


I've tried all sorts of GROUP_CONCAT/CONCAT combinations but I am stuck on getting the length column to repeat for every qty.

I have a sqlfiddle here.

Is it even possible? :)
Figured this out if anyone comes across this and wants the solution:

SELECT color, TRIM(TRAILING ',' FROM GROUP_CONCAT(REPEAT(CONCAT(length,','),qty) SEPARATOR '') ) 
FROM buyer_advert 
GROUP BY color


This makes a nice array like I wanted.