mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed errors descovered by valgrind 2.4
Added suppression file for some valgrind warnings that are not real errors mysql-test/mysql-test-run.sh: Added suppression of some valgrind warnings that are not real errors mysql-test/r/heap.result: Cleanup old tests and added new tests mysql-test/t/heap.test: Cleanup old tests and added new tests mysys/default.c: Removed duplicate fn_format() scripts/make_binary_distribution.sh: Added valgrind suppress file sql/ha_federated.cc: Ensure that 'socket' is initialized properly sql/ha_heap.cc: Ensure that with_auto_increment is initialized properly sql/mysqld.cc: Ensure that create_time is initialized for cached threads sql/sql_parse.cc: Indentation fix strings/decimal.c: Fixed wrong tests
This commit is contained in:
@ -418,7 +418,7 @@ while test $# -gt 0; do
|
||||
fi
|
||||
# >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
|
||||
valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
|
||||
VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16"
|
||||
VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16 --suppressions=$CWD/valgrind.supp"
|
||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
|
||||
SLEEP_TIME_AFTER_RESTART=10
|
||||
|
@ -667,14 +667,7 @@ drop table t1;
|
||||
set storage_engine=MyISAM;
|
||||
create table t1 (a bigint unsigned auto_increment primary key, b int,
|
||||
key (b, a)) engine=heap;
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1);
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
@ -688,14 +681,7 @@ a b
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b int not null auto_increment,
|
||||
primary key(a, b), key(b)) engine=heap;
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1),(1),(1),(1),(1),(1),(1),(1);
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
@ -707,3 +693,6 @@ a b
|
||||
1 7
|
||||
1 8
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b int not null auto_increment,
|
||||
primary key(a, b)) engine=heap;
|
||||
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
|
||||
|
@ -413,25 +413,16 @@ eval set storage_engine=$default;
|
||||
|
||||
create table t1 (a bigint unsigned auto_increment primary key, b int,
|
||||
key (b, a)) engine=heap;
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (1);
|
||||
select * from t1;
|
||||
insert t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int not null, b int not null auto_increment,
|
||||
primary key(a, b), key(b)) engine=heap;
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
insert t1 (a) values (1);
|
||||
select * from t1;
|
||||
insert t1 (a) values (1),(1),(1),(1),(1),(1),(1),(1);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--error 1075
|
||||
create table t1 (a int not null, b int not null auto_increment,
|
||||
primary key(a, b)) engine=heap;
|
||||
|
94
mysql-test/valgrind.supp
Normal file
94
mysql-test/valgrind.supp
Normal file
@ -0,0 +1,94 @@
|
||||
#
|
||||
# Suppress some common (not fatal) errors in system libraries found by valgrind
|
||||
#
|
||||
|
||||
#
|
||||
# Pthread doesn't free all thread specific memory before program exists
|
||||
#
|
||||
{
|
||||
pthread allocate_tls memory loss
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
fun:_dl_allocate_tls
|
||||
fun:allocate_stack
|
||||
fun:pthread_create@@GLIBC_2.1
|
||||
}
|
||||
|
||||
{
|
||||
pthread allocate_dtv memory loss
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
fun:allocate_dtv
|
||||
fun:_dl_allocate_tls_storage
|
||||
fun:__GI__dl_allocate_tls
|
||||
fun:pthread_create
|
||||
}
|
||||
|
||||
{
|
||||
pthread memalign memory loss
|
||||
Memcheck:Leak
|
||||
fun:memalign
|
||||
fun:_dl_allocate_tls_storage
|
||||
fun:__GI__dl_allocate_tls
|
||||
fun:pthread_create
|
||||
}
|
||||
|
||||
{
|
||||
pthread errno
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
fun:_dlerror_run
|
||||
fun:dlsym
|
||||
fun:__errno_location
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Warnings in libz becasue it works with aligned memory(?)
|
||||
#
|
||||
|
||||
{
|
||||
libz tr_flush_block
|
||||
Memcheck:Cond
|
||||
fun:_tr_flush_block
|
||||
fun:deflate_slow
|
||||
fun:deflate
|
||||
fun:do_flush
|
||||
fun:gzclose
|
||||
}
|
||||
|
||||
{
|
||||
libz tr_flush_block2
|
||||
Memcheck:Cond
|
||||
fun:_tr_flush_block
|
||||
fun:deflate_slow
|
||||
fun:deflate
|
||||
fun:compress2
|
||||
}
|
||||
|
||||
{
|
||||
libz longest_match
|
||||
Memcheck:Cond
|
||||
fun:longest_match
|
||||
fun:deflate_slow
|
||||
fun:deflate
|
||||
fun:do_flush
|
||||
}
|
||||
|
||||
{
|
||||
libz longest_match2
|
||||
Memcheck:Cond
|
||||
fun:longest_match
|
||||
fun:deflate_slow
|
||||
fun:deflate
|
||||
fun:compress2
|
||||
}
|
||||
|
||||
{
|
||||
libz deflate
|
||||
Memcheck:Cond
|
||||
obj:/usr/lib/libz.so.*
|
||||
obj:/usr/lib/libz.so.*
|
||||
fun:deflate
|
||||
fun:compress2
|
||||
}
|
Reference in New Issue
Block a user