重写一行在
子查询,使用的方法Item_in_subselect: row_value_transformer
。它工作在标量模拟几乎一样,但使用Item_cache_row
对缓存离开表达式并使用引用的元素Item_cache_row
。参考项目列表,它使用Item_ref_null_helper (ref_array + i)
。
子查询的有
,SUM ()
函数,或集团
将转换以下列方式:
行(l1, l2,…lN)(选择i1、i2…从t < having_expr >)
将成为:
(选择i1、i2…从t < having_expr >和< cache_l0 > = < Item_ref_null_helper (ref_array[0] >和< cache_l1 > = < Item_ref_null_helper (ref_array[1]) >和…< cache_lN-1 > = < Item_ref_null_helper (ref_array (n - 1) >)
选择
没有从
也会以这种方式被转换。
这将是相同的其他子查询,除了在哪里
条款。