1. 06 4月, 2019 1 次提交
    • A
      Do not modify a cached plan statement during ExecuteTruncate. · e3cf4f26
      Adam Berlin 提交于
      User defined functions cache their plan, therefore if we modify the
      plan during execution, we risk having invalid data during the next
      execution of the cached plan.
      
      ExecuteTruncate modifies the plan's relations when declaring partitions
      that need truncation.
      
      Instead, we copy the list of relations that need truncation and add the
      partition relations to the copy.
      e3cf4f26