diff options
author | unknown <monty@mysql.com> | 2006-06-06 02:47:30 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2006-06-06 02:47:30 +0300 |
commit | 2017107969f25998c2e0970b6bbe3749ef9ea244 (patch) | |
tree | 95341607866eaeca795c9a1a4c4c0d94df862cfd /mysql-test | |
parent | 6c3babe52c28d28a92d242307e13723500dce969 (diff) | |
download | mariadb-git-2017107969f25998c2e0970b6bbe3749ef9ea244.tar.gz |
Fixed some issues found by valgrind
(one testcase, one memory leak and some accesses to not initialized memory)
mysql-test/r/events_scheduling.result:
Changed event timer to two seconds to not get problems with slow system or when running with valgrind
mysql-test/t/events_scheduling.test:
Changed event timer to two seconds to not get problems with slow system or when running with valgrind
mysql-test/valgrind.supp:
Avoid purify warnings from DBUG library (safe to do)
sql/ha_berkeley.cc:
Fix problem with not freed memory
sql/sql_class.cc:
Ensure that row_count is initalized (as we otherwise may access it uninitialized)
sql/sql_show.cc:
c_ptr -> ptr to avoid accessing not initialized memory
sql/sql_yacc.yy:
Fix to not access not initialized memory
sql/table.cc:
Fix to not access not initialized memory
sql/time.cc:
Fix to not access not initialized memory
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/events_scheduling.result | 2 | ||||
-rw-r--r-- | mysql-test/t/events_scheduling.test | 4 | ||||
-rw-r--r-- | mysql-test/valgrind.supp | 13 |
3 files changed, 17 insertions, 2 deletions
diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result index aec2053f0e7..eb44751c176 100644 --- a/mysql-test/r/events_scheduling.result +++ b/mysql-test/r/events_scheduling.result @@ -6,7 +6,7 @@ CREATE TABLE table_3(a int); CREATE TABLE table_4(a int); CREATE TABLE T19170(s1 TIMESTAMP); SET GLOBAL event_scheduler=1; -CREATE EVENT E19170 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO T19170 VALUES(CURRENT_TIMESTAMP); +CREATE EVENT E19170 ON SCHEDULE EVERY 2 SECOND DO INSERT INTO T19170 VALUES(CURRENT_TIMESTAMP); CREATE EVENT two_sec ON SCHEDULE EVERY 2 SECOND DO INSERT INTO table_1 VALUES(1); CREATE EVENT start_n_end ON SCHEDULE EVERY 1 SECOND diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index a73d25cd8ee..c688864a1e6 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -6,7 +6,9 @@ CREATE TABLE table_3(a int); CREATE TABLE table_4(a int); CREATE TABLE T19170(s1 TIMESTAMP); SET GLOBAL event_scheduler=1; -CREATE EVENT E19170 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO T19170 VALUES(CURRENT_TIMESTAMP); +# We need to have 2 to make it safe with valgrind. This is probably because +# of when we calculate the timestamp value +CREATE EVENT E19170 ON SCHEDULE EVERY 2 SECOND DO INSERT INTO T19170 VALUES(CURRENT_TIMESTAMP); CREATE EVENT two_sec ON SCHEDULE EVERY 2 SECOND DO INSERT INTO table_1 VALUES(1); CREATE EVENT start_n_end ON SCHEDULE EVERY 1 SECOND diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 258e4d4a22b..9061a71364d 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -420,3 +420,16 @@ fun:fprintf fun:print_stacktrace } + +# +# Safe warnings, that may happen because of thread scheduling +# + +{ + dbug initialization + Memcheck:Leak + fun:malloc + fun:DbugMalloc + fun:ListAdd + fun:_db_set_ +} |