mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Change of internal key_field=NULL handling to avoid error messages.
Optimized SELECT DISTINCT ... ORDER BY ... LIMIT Fixed reference to uninitalized variable mysql-test/r/distinct.result: Updated results for new tests mysql-test/r/func_math.result: Fixed test of RND() mysql-test/r/innodb.result: Updated results for new tests mysql-test/r/null.result: Updated results for new tests mysql-test/t/distinct.test: New distinct test mysql-test/t/func_math.test: Fixed test of RND() mysql-test/t/innodb.test: Test for bugs mysql-test/t/null.test: TEst for bugs sql/field.h: Change of NULL handling to avoid error messages sql/field_conv.cc: Change of NULL handling to avoid error messages sql/item.cc: Change of NULL handling to avoid error messages sql/item.h: Change of NULL handling to avoid error messages sql/item_cmpfunc.cc: Change of NULL handling to avoid error messages sql/item_func.cc: Change of NULL handling to avoid error messages sql/item_func.h: Cleaned up RND() handling sql/item_timefunc.cc: Change of NULL handling to avoid error messages sql/item_timefunc.h: Change of NULL handling to avoid error messages sql/opt_range.cc: Fixed bug in <=> NULL sql/password.c: Indentation cleanup sql/sql_base.cc: Change of NULL handling to avoid error messages sql/sql_class.cc: Fixed reference to uninitalized variable sql/sql_handler.cc: Change of NULL handling to avoid error messages sql/sql_select.cc: Change of NULL handling to avoid error messages Optimized SELECT DISTINCT ... ORDER BY ... LIMIT sql/sql_select.h: Change of NULL handling to avoid error messages sql/unireg.cc: Change of NULL handling to avoid error messages
This commit is contained in:
@ -198,6 +198,30 @@ a
|
||||
select distinct 1 from t1,t3 where t1.a=t3.a;
|
||||
1
|
||||
1
|
||||
explain SELECT distinct t1.a from t1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 index NULL PRIMARY 4 NULL 2 Using index
|
||||
explain SELECT distinct t1.a from t1 order by a desc;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 index NULL PRIMARY 4 NULL 2 Using index
|
||||
explain SELECT t1.a from t1 group by a order by a desc;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 index NULL PRIMARY 4 NULL 2 Using index
|
||||
explain SELECT distinct t1.a from t1 order by a desc limit 1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 index NULL PRIMARY 4 NULL 2 Using index
|
||||
explain SELECT distinct a from t3 order by a desc limit 2;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t3 index NULL a 5 NULL 204 Using index
|
||||
explain SELECT distinct a,b from t3 order by a+1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort
|
||||
explain SELECT distinct a,b from t3 order by a limit 10;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t3 index NULL a 5 NULL 204 Using temporary
|
||||
explain SELECT a,b from t3 group by a,b order by a+1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort
|
||||
drop table t1,t2,t3,t4;
|
||||
CREATE TABLE t1 (name varchar(255));
|
||||
INSERT INTO t1 VALUES ('aa'),('ab'),('ac'),('ad'),('ae');
|
||||
|
Reference in New Issue
Block a user