title: Mysql Error Row xxxx was cut by GROUP_CONCAT()
body: <p>I have query like this:</p>
  
  <pre><code>INSERT INTO products_analysis_cache (products_id, group_styles, group_finishing, group_elements, group_materials, group_watchlist)
    SELECT p.products_id,
      CONCAT(',', GROUP_CONCAT(shp.styles_id), ',') AS group_styles,
      group_finishing,
      group_elements,
      group_materials,
      group_watchlist
    FROM products p
      LEFT JOIN styles_has_products shp ON shp.products_id = p.products_id
      LEFT JOIN (
                  SELECT pue.products_id, CONCAT(',', GROUP_CONCAT(pue.elements_id),',',IFNULL(GROUP_CONCAT(paue.elements_id),0), ',') AS group_elements
                  FROM products_use_elements pue
                    LEFT JOIN products_articles_use_elements paue ON paue.products_use_elements_id=pue.products_use_elements_id
                  GROUP BY pue.products_id
                ) subquery_1 ON subquery_1.products_id = p.products_id
      LEFT JOIN (
                  SELECT ptpm.products_id, CONCAT(',', GROUP_CONCAT(ptpm.products_materials_id), ',') AS group_materials
                  FROM products_to_products_materials ptpm
                  GROUP BY ptpm.products_id
                ) subquery_2 ON subquery_2.products_id = p.products_id
      LEFT JOIN (
                  SELECT muwp.products_id, CONCAT(',', GROUP_CONCAT(muwp.user_id), ',') AS group_watchlist
                  FROM minierp_users_watch_products muwp
                  GROUP BY muwp.products_id
                ) subquery_3 ON subquery_3.products_id = p.products_id
      LEFT JOIN (
                  SELECT products_id, fg+fh+fb+fo+fr AS group_finishing FROM
                    (SELECT p.products_id
                       ,IF(SUM(finishing_goldplate)&gt;0,1,0) fg
                       ,IF(SUM(finishing_hammer)&gt;0,11,0) fh
                       ,IF(SUM(finishing_brush)&gt;0,111,0) fb
                       ,IF(SUM(finishing_oxid)&gt;0,1111,0) fo
                       ,IF(SUM(finishing_rosegoldplate)&gt;0,11111,0) fr
                     FROM products p
                       INNER JOIN products_use_elements pue ON pue.products_id = p.products_id
                     GROUP BY pue.products_id
                    ) dt
                ) subquery_4 ON subquery_4.products_id = p.products_id
    GROUP BY p.products_id ORDER BY p.products_id DESC;
  </code></pre>
  
  <p>But when i ran it. Mysql throws error </p>
  
  <pre><code>[HY000][1260] Row 8036 was cut by GROUP_CONCAT()
  </code></pre>
  
  <p>This is the table that i wanted to insert.</p>
  
  <pre><code>CREATE TABLE `products_analysis_cache` (
    `products_id` int(11) NOT NULL,
    `group_styles` longtext NOT NULL,
    `group_finishing` longtext NOT NULL,
    `group_elements` longtext NOT NULL,
    `group_materials` longtext NOT NULL,
    `group_watchlist` longtext NOT NULL,
    PRIMARY KEY (`products_id`),
    KEY `idx_products_id` (`products_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
  </code></pre>
  
  <p>I already make LONGTEXT for each column to accepted a long text, but still got the same error.</p>
  
  <p>What did I do wrong?</p>
  
  <p>Thanks for the help.
  EDIT:
  I've set group_concat_max_len to the max value available (18446744073709551615) according to mysql documentation, and it still shows error 'was cut by GROUP_CONCAT()'</p>