diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 1bf924100a9..fed19cbe07c 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -348,7 +348,9 @@ insert into t1 values (3,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; drop table t1; +--disable_warnings create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) type=InnoDB; +--enable_warnings insert into t1 values (1, 3); select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ; select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ; diff --git a/mysql-test/t/preload.test b/mysql-test/t/preload.test old mode 100755 new mode 100644 diff --git a/mysys/tree.c b/mysys/tree.c index a3b69ebff5e..91d2f9771b5 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -46,6 +46,16 @@ Implemented by monty. */ +/* + NOTE: + tree->compare function should be ALWAYS called as + (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), key) + and not other way around, as + (*tree->compare)(custom_arg, key, ELEMENT_KEY(tree,element)) + + ft_boolean_search.c (at least) relies on that. +*/ + #include "mysys_priv.h" #include #include