This case brings to light multiple problems that were introduced by the [UPDATE-FROM enhancement][1] and [query flattening of UNION ALL][2]. All are now fixed on trunk. [1]: src:/timeline?c=88baf1eb07065032 [2]: src:/timeline?c=df1d6482f9e92daf Preconditions to this bug: 1. You must be trying to do an UPDATE-FROM on virtual table that has a rowid. 2. The FROM clause of the UPDATE must contain a CTE or VIEW or subquery that uses a UNION ALL operator and that is subject to processing by the query flattener. 3. The UPDATE must contain a vector assignment in which the very first term on the left-hand side of the assignment is repeated and in which the right-hand side is a SELECT statement.