mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Removed some warnings reported by valgrind
After merge fixes. Now code compiles, but there is still some valgrind warnings that needs to be fixed myisam/mi_rnext_same.c: handle case where rtree_find_next() returns an error (assume this means that there was no more keys) myisam/rt_index.c: Code cleanup mysql-test/r/func_crypt.result: Update results mysql-test/r/func_group.result: Update results mysql-test/r/null_key.result: Update results mysql-test/r/order_by.result: Update results mysql-test/r/query_cache.result: Update results mysql-test/r/range.result: Update results mysql-test/r/rpl_trunc_binlog.result: Update results mysql-test/t/fulltext.test: Fix error numbers mysql-test/t/func_crypt.test: Fixed test for 4.1 mysql-test/t/range.test: Moved tests to be in sync with 4.0 mysys/test_charset.c: Removed acccess to non existing functions sql-common/client.c: Merge fix sql/item_strfunc.cc: Simple code cleanup Don't call ->c_ptr() when you don't need a 0 terminated string (Causes warnings from valgrind) sql/log_event.cc: After merge fixes sql/protocol.cc: Change default catalog name to 'def' sql/spatial.cc: Code cleanup sql/sql_class.cc: After merge fixes sql/time.cc: Ensure that time object is cleared on error sql/unireg.cc: Removed warning reported by valgrind
This commit is contained in:
@@ -205,6 +205,30 @@ explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
|
||||
explain select * from t1 force index(i2), t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# bug #1724: use RANGE on more selective column instead of REF on less
|
||||
# selective
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int(11) default NULL,
|
||||
b int(11) default NULL,
|
||||
KEY a (a),
|
||||
KEY b (b)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,2),(10,2),
|
||||
(13,2),(14,2),(15,2),(16,2),(17,3),(17,3),(16,3),(17,3),(19,3),(20,3),
|
||||
(21,4),(22,5),(23,5),(24,5),(25,5),(26,5),(30,5),(31,5),(32,5),(33,5),
|
||||
(33,5),(33,5),(33,5),(33,5),(34,5),(35,5);
|
||||
|
||||
# we expect that optimizer will choose key on A
|
||||
EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
# test for a bug with in() and unique key
|
||||
|
||||
create table t1 (id int(10) primary key);
|
||||
@@ -306,28 +330,3 @@ select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
|
||||
select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# bug #1724: use RANGE on more selective column instead of REF on less
|
||||
# selective
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int(11) default NULL,
|
||||
b int(11) default NULL,
|
||||
KEY a (a),
|
||||
KEY b (b)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,2),(10,2),
|
||||
(13,2),(14,2),(15,2),(16,2),(17,3),(17,3),(16,3),(17,3),(19,3),(20,3),
|
||||
(21,4),(22,5),(23,5),(24,5),(25,5),(26,5),(30,5),(31,5),(32,5),(33,5),
|
||||
(33,5),(33,5),(33,5),(33,5),(34,5),(35,5);
|
||||
|
||||
EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
# we expect that optimizer will choose key on A
|
||||
|
||||
Reference in New Issue
Block a user