diff options
author | Igor Babaev <igor@askmonty.org> | 2018-04-19 18:40:31 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-04-19 18:41:05 -0700 |
commit | 615ad709a3e38e54098f4492f25d102b63979068 (patch) | |
tree | bc6c8c6dd8d2696cdef05af6bf1445dc45e8b645 /mysql-test/main/derived_cond_pushdown.result | |
parent | cd8b8169b6f39450f10f1ba8a16ae68486bc0975 (diff) | |
download | mariadb-git-615ad709a3e38e54098f4492f25d102b63979068.tar.gz |
MDEV-15902 Assertion `n < m_size' failed, sql_array.h:64:
Element_type& Bounds_checked_array<Element_type>::operator[]
(size_t) [with Element_type = Item*; size_t = long unsigned int]
In sql_yacc.yy the semantic actions for the MEDIAN window function
lacked a call of st_select_lex::prepare_add_window_spec().
This function saves the head of the thd->lex->order_list into
lex->save_order_list in order this head to be restored in
st_select_lex::add_window_spec after the specification of the
window function has been parsed.
Without a call of prepare_add_window_spec() when add_window_spec()
was called the head of an empty list was copied into
thd->lex->order_list (instead of assumed saved head this list).
This made the list thd->lex->order_list invalid and potentially
could cause many different problems.
Corrected the result set in the test case for MDEV-15899 that
used the MEDIAN window function and could not be correct
without this fix.
Diffstat (limited to 'mysql-test/main/derived_cond_pushdown.result')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.result | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index 1b7aedacd2b..82f621c73a2 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -15130,31 +15130,31 @@ cte as (select median(f2) over (partition by f1) as k1 from t1 order by f1), cte1 as (select median(f4) over (partition by f1) as k2 from t1) select k1,k2 from cte1, cte; k1 k2 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 +1.0000000000 9.0000000000 +1.0000000000 9.0000000000 1.0000000000 8.0000000000 -1.0000000000 8.0000000000 -1.0000000000 8.0000000000 -1.0000000000 8.0000000000 -1.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 -0.0000000000 8.0000000000 +1.0000000000 0.0000000000 +1.0000000000 9.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 0.0000000000 8.0000000000 +0.0000000000 0.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 0.0000000000 8.0000000000 +0.0000000000 0.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 0.0000000000 8.0000000000 +0.0000000000 0.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 +0.0000000000 9.0000000000 0.0000000000 8.0000000000 +0.0000000000 0.0000000000 +0.0000000000 9.0000000000 explain with cte as (select median(f2) over (partition by f1) as k1 from t1 order by f1), cte1 as (select median(f4) over (partition by f1) as k2 from t1) @@ -15162,6 +15162,6 @@ select k1,k2 from cte1, cte; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -3 DERIVED t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort -2 DERIVED t1 ALL NULL NULL NULL NULL 5 Using temporary +3 DERIVED t1 ALL NULL NULL NULL NULL 5 Using temporary +2 DERIVED t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort drop table t1; |