mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup: Item_func_case
reorder items in args[] array. Instead of
when1,then1,when2,then2,...[,case][,else]
sort them as
[case,]when1,when2,...,then1,then2,...[,else]
in this case all items used for comparison take a continuous part
of the array and can be aggregated directly. and all items that
can be returned take a continuous part of the array and can be
aggregated directly. Old code had to copy them to a temporary
array before aggreation, and then copy back (thd->change_item_tree)
everything that was changed.
this is a 10.3 version of bf1ca14ff3
This commit is contained in:
@ -1630,7 +1630,7 @@ c
|
||||
NULL
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
||||
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
|
||||
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-11555 CASE with a mixture of TIME and DATETIME returns a wrong result
|
||||
@ -1649,9 +1649,9 @@ good was_bad_now_good
|
||||
one one
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (time)
|
||||
Note 1105 DBUG: [1] arg=3 handler=0 (time)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (time)
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (time)
|
||||
Note 1105 DBUG: [1] arg=3 handler=0 (time)
|
||||
Note 1105 DBUG: [2] arg=5 handler=2 (datetime)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (time)
|
||||
Note 1105 DBUG: [2] arg=3 handler=2 (datetime)
|
||||
SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
|
||||
SET SESSION debug_dbug="-d,Item_func_in";
|
||||
|
Reference in New Issue
Block a user