diff options
author | monty@mysql.com <> | 2006-03-29 14:27:36 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2006-03-29 14:27:36 +0300 |
commit | 1994ed49ecf09b9de26167a850915ef3de2a4ce6 (patch) | |
tree | 4d8a2c78f1c611f41d2ea762390198c528239c80 /sql/tztime.cc | |
parent | 8cb3cf2382e9c8a3afb5d03ec4199e1ac4528bde (diff) | |
download | mariadb-git-1994ed49ecf09b9de26167a850915ef3de2a4ce6.tar.gz |
Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.
Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index 94c1eb8ac63..1be2321200b 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2189,12 +2189,11 @@ my_tz_find(const String * name, TABLE_LIST *tz_tables) TZ_NAMES_ENTRY *tmp_tzname; Time_zone *result_tz= 0; long offset; - DBUG_ENTER("my_tz_find"); DBUG_PRINT("enter", ("time zone name='%s'", - name ? ((String *)name)->c_ptr() : "NULL")); - - DBUG_ASSERT(!time_zone_tables_exist || tz_tables || current_thd->slave_thread); + name ? ((String *)name)->c_ptr_safe() : "NULL")); + DBUG_ASSERT(!time_zone_tables_exist || tz_tables || + current_thd->slave_thread); if (!name) DBUG_RETURN(0); |