1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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:
unknown
2003-11-04 14:09:03 +02:00
parent f97f48acaf
commit 0712ce9ec5
21 changed files with 150 additions and 126 deletions

View File

@ -2,7 +2,7 @@ drop table if exists t1;
select length(encrypt('foo', 'ff')) <> 0;
length(encrypt('foo', 'ff')) <> 0
1
create table t1 (name varchar(50), pw varchar(16));
create table t1 (name varchar(50), pw varchar(64));
insert into t1 values ('tom', password('my_pass'));
set @pass='my_pass';
select name from t1 where name='tom' and pw=password(@pass);

View File

@ -559,8 +559,8 @@ id select_type table type possible_keys key key_len ref rows Extra
explain
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
drop table t1, t2;
CREATE TABLE t1 (a int, b int);
select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1;

View File

@ -153,12 +153,12 @@ a b
7 NULL
explain select * from t1 where (a = 7 or a is null) and (b=7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a,b a 5 const 4 Using where; Using index
1 SIMPLE t1 range a,b a 10 NULL 3 Using where; Using index
select * from t1 where (a = 7 or a is null) and (b=7 or b is null);
a b
NULL 7
7 NULL
7 7
NULL 7
explain select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a a 5 const 5 Using where; Using index

View File

@ -306,17 +306,17 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 8 Using where; Using index
explain select * from t1 where a = 2 and b >0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 4 Using where; Using index
1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
explain select * from t1 where a = 2 and b is null order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 9 const,const 1 Using where; Using index; Using filesort
explain select * from t1 where a = 2 and (b is null or b > 0) order by a
desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
1 SIMPLE t1 range a a 9 NULL 6 Using where; Using index
explain select * from t1 where a = 2 and b > 0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 4 Using where; Using index
1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
explain select * from t1 where a = 2 and b < 2 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 2 Using where; Using index

View File

@ -586,7 +586,7 @@ select * from t1;
a
set GLOBAL query_cache_size=1024;
Warnings:
Warning 1280 Query cache failed to set size 1024, new query cache size is 0
Warning 1285 Query cache failed to set size 1024, new query cache size is 0
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
@ -594,7 +594,7 @@ select * from t1;
a
set GLOBAL query_cache_size=10240;
Warnings:
Warning 1280 Query cache failed to set size 10240, new query cache size is 0
Warning 1285 Query cache failed to set size 10240, new query cache size is 0
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
@ -602,7 +602,7 @@ select * from t1;
a
set GLOBAL query_cache_size=20480;
Warnings:
Warning 1280 Query cache failed to set size 20480, new query cache size is 0
Warning 1285 Query cache failed to set size 20480, new query cache size is 0
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
@ -610,7 +610,7 @@ select * from t1;
a
set GLOBAL query_cache_size=40960;
Warnings:
Warning 1280 Query cache failed to set size 40960, new query cache size is 0
Warning 1285 Query cache failed to set size 40960, new query cache size is 0
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
@ -762,7 +762,6 @@ select * from t3;
delete from t4 where a=1;
flush query cache;
drop table t1,t2,t3,t4;
set GLOBAL query_cache_size=0;
SET NAMES koi8r;
CREATE TABLE t1 (a char(1) character set koi8r);
INSERT INTO t1 VALUES (_koi8r'<27>'),(_koi8r'<27>');
@ -772,7 +771,7 @@ a
<EFBFBD> <09> 1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 12
Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
@ -783,7 +782,7 @@ a
<EFBFBD> <09> 0
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 12
Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@ -794,7 +793,7 @@ a
<EFBFBD> <09> 0
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 12
Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
@ -805,8 +804,9 @@ a
<EFBFBD> <09> 0
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 12
Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
DROP TABLE t1;
SET GLOBAL query_cache_size=0;

View File

@ -274,8 +274,8 @@ INSERT INTO t1 VALUES
(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;
table type possible_keys key key_len ref rows Extra
t1 range a,b a 5 NULL 2 Using where
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a,b a 5 NULL 2 Using where
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
a b
DROP TABLE t1;

View File

@ -8,8 +8,6 @@ stop slave;
flush logs;
reset slave;
start slave;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. Probably cause is that the master died while writing the transaction to it's binary log. 0 79 326 None 0 No #
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.002 4 slave-relay-bin.002 161 master-bin.001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. Probably cause is that the master died while writing the transaction to it's binary log. 0 79 317

View File

@ -133,9 +133,9 @@ select * from t2 having MATCH inhalt AGAINST ('foobar');
# check of fulltext errors
#
--error 1281
--error 1286
CREATE TABLE t3 (t int(11),i text,fulltext tix (t,i));
--error 1281
--error 1286
CREATE TABLE t3 (t int(11),i text,
j varchar(200) CHARACTER SET latin2,
fulltext tix (i,j));

View File

@ -7,7 +7,7 @@ drop table if exists t1;
select length(encrypt('foo', 'ff')) <> 0;
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
create table t1 (name varchar(50), pw varchar(16));
create table t1 (name varchar(50), pw varchar(64));
insert into t1 values ('tom', password('my_pass'));
set @pass='my_pass';
select name from t1 where name='tom' and pw=password(@pass);

View File

@ -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