diff options
author | unknown <andrey@lmy004.> | 2006-07-17 16:52:45 +0200 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-07-17 16:52:45 +0200 |
commit | e69e640f2eedfe1247f2a5f536d8dc1cf8a48300 (patch) | |
tree | 94cf5b188a961ae9067df17d09d62247d263ea81 /sql/event_db_repository.cc | |
parent | d65ab09c4dad097f0c8c5b9bf3856b6fdaf290fa (diff) | |
download | mariadb-git-e69e640f2eedfe1247f2a5f536d8dc1cf8a48300.tar.gz |
WL#3337 (Events new architecture)
Small updates before patch submit.
client/mysqltest.c:
allow --valgrind option to mysqltest so one can be able to detect
whether the test is running under valgrind by having $VALGRIND_TEST,
similar to BIG_TEST, in the test file.
mysql-test/mysql-test-run.pl:
If the test suite is running under valgrind start mysqltest with --valgrind
to inform that we run valgrind. mysqltest will provide $VALGRIND_TEST for the
test cases.
mysql-test/r/events_bugs.result:
update result
mysql-test/r/events_scheduling.result:
update result
mysql-test/t/events.test:
Increase times or the test will fail under valgrind
mysql-test/t/events_bugs.test:
Increase times or the test will fail under valgrind
mysql-test/t/events_scheduling.test:
Remove faulty test
Disable the test case for valgrind
sql/event_data_objects.cc:
count the number of executions
sql/event_data_objects.h:
flags is not used at all
add execution_count to count the number of executions
sql/event_db_repository.cc:
Initialize wherever needed.
Add a comment regarding valgrind warning.
sql/event_queue.cc:
more debug info in the trace log
sql/event_scheduler.cc:
Use macro COND_STATE_WAIT() in all cases we need waiting
on condition. Hence, we can trace locking, attemption to lock
and more with SHOW SCHEDULER STATUS
sql/event_scheduler.h:
Change the declaration of cond_wait to accept THD
sql/events.cc:
fix memory leak. Destroy event_queue
mysql-test/include/not_valgrind.inc:
New BitKeeper file ``mysql-test/include/not_valgrind.inc''
mysql-test/r/not_valgrind.require:
New BitKeeper file ``mysql-test/r/not_valgrind.require''
Diffstat (limited to 'sql/event_db_repository.cc')
-rw-r--r-- | sql/event_db_repository.cc | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index ecf8d68e788..69bbaeeae03 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -523,7 +523,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, { int ret= 0; CHARSET_INFO *scs= system_charset_info; - TABLE *table; + TABLE *table= NULL; char old_db_buf[NAME_LEN+1]; LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) }; bool dbchanged= FALSE; @@ -621,8 +621,29 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, ok: if (dbchanged) (void) mysql_change_db(thd, old_db.str, 1); - if (table) - close_thread_tables(thd); + /* + When valgrinded, the following call may lead to the following error: + + Syscall param pwrite64(buf) points to uninitialised byte(s) + at 0x406003B: do_pwrite64 (in /lib/tls/libpthread.so.0) + by 0x40600EF: pwrite64 (in /lib/tls/libpthread.so.0) + by 0x856FF74: my_pwrite (my_pread.c:146) + by 0x85734E1: flush_cached_blocks (mf_keycache.c:2280) + .... + Address 0x6618110 is 56 bytes inside a block of size 927,772 alloc'd + at 0x401C451: malloc (vg_replace_malloc.c:149) + by 0x8578CDC: _mymalloc (safemalloc.c:138) + by 0x858E5E2: my_large_malloc (my_largepage.c:65) + by 0x8570634: init_key_cache (mf_keycache.c:343) + by 0x82EDA51: ha_init_key_cache(char const*, st_key_cache*) (handler.cc:2509) + by 0x8212071: process_key_caches(int (*)(char const*, st_key_cache*)) + (set_var.cc:3824) + by 0x8206D75: init_server_components() (mysqld.cc:3304) + by 0x8207163: main (mysqld.cc:3578) + + I think it is safe not to think about it. + */ + close_thread_tables(thd); DBUG_RETURN(0); err: @@ -900,7 +921,7 @@ Event_db_repository::drop_events_by_field(THD *thd, LEX_STRING field_value) { int ret= 0; - TABLE *table; + TABLE *table= NULL; Open_tables_state backup; READ_RECORD read_record_info; DBUG_ENTER("Event_db_repository::drop_events_by_field"); |