title: linq2db update with CTE on MySql 8
body: <p>This question is about linq2db.MySql 3.1.5 and MySQL 8.0.21</p>
  <p>I am getting &quot;You have an error in your SQL syntax...&quot; when trying to run an update (marking duplicate emails) using CTE on MySql as per below</p>
  <pre><code>                var cte = (
                          from x in db.GetTable&lt;PEmailCleanupJobItem&gt;()
                          group x by x.EmailAddress into eGroup
                          where eGroup.Count() &gt; 1
                          select new { EmailAddress = eGroup.Key }
                  ).AsCte();
  
                  var qry = (
                      from e in db.GetTable&lt;PEmailCleanupJobItem&gt;()
                      from d in cte
                          .InnerJoin(d =&gt; e.EmailAddress == d.EmailAddress)
                      select e
                  );
  
                  await qry
                      .Set(e =&gt; e.IsDuplicate, true)
                      .UpdateAsync();
  </code></pre>
  <p>This generates and sends the following to MySQL</p>
  <pre><code>--  MySql.Official MySql (asynchronously)
  DECLARE @IsDuplicate UByte -- Boolean
  SET     @IsDuplicate = 1
  
  UPDATE `CTE_1` (`EmailAddress`)
  AS
  (
          SELECT
                  `t1`.`email_address`
          FROM
                  `emails` `t1`
          GROUP BY
                  `t1`.`email_address`
          HAVING
                  Count(*) &gt; 1
  )
  FROM
          `emails` `d`
                  INNER JOIN `CTE_1` `e` ON (`d`.`email_address` IS NULL AND `e`.`EmailAddress` IS NULL OR `d`.`email_address` = `e`.`EmailAddress`)
  SET
          `d`.`is_duplicate` = @IsDuplicate
  </code></pre>
  <p>Note how <code>UPDATE `CTE_1` (`EmailAddress`)</code> is generated instead of <code>WITH `CTE_1` (`EmailAddress`)</code></p>
  <p>I would manually write this query (which works) as</p>
  <pre><code>WITH `CTE_1` (`EmailAddress`)
  AS
  (
          SELECT
                  `t1`.`email_address`
          FROM
                  `emails` `t1`
          GROUP BY
                  `t1`.`email_address`
          HAVING
                  Count(*) &gt; 1
  )
  UPDATE 
      `emails` `d`
              INNER JOIN `CTE_1` `e` ON (`d`.`email_address` IS NULL AND `e`.`EmailAddress` IS NULL OR `d`.`email_address` = `e`.`EmailAddress`)
  SET
      `d`.`is_duplicate` = 1
  </code></pre>
  <p>Is this a bug with linq2db or am I missing something?</p>