diff options
author | Michael Widenius <monty@askmonty.org> | 2011-11-29 22:48:24 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-11-29 22:48:24 +0200 |
commit | a7f87effa57f6486c23bf5b340c8474a635dcf71 (patch) | |
tree | 5f72d973eaaa8a62d871a25640a2618d7284537d /sql | |
parent | 389acf0a30415c745d2c241e1584b0b637ab95ed (diff) | |
parent | a19f4e3a3af4c18ec89f8f8a4ae32e3c7d7fec70 (diff) | |
download | mariadb-git-a7f87effa57f6486c23bf5b340c8474a635dcf71.tar.gz |
Merge with 5.1 + fixes for build failures in 5.2
cmd-line-utils/libedit/map.c:
Fixed compiler warning
cmd-line-utils/libedit/terminal.c:
Fixed compiler warning
cmd-line-utils/libedit/tty.c:
Fixed compiler warning
sql/sql_base.cc:
Fixed memory leak found by valgrind
storage/maria/compat_aliases.cc:
Ensure that recover_alias is also a set
storage/maria/ma_bitmap.c:
Proper fix for compiler warning
support-files/compiler_warnings.supp:
Fixed compiler warning
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_base.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ee44629a192..600bb641448 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -792,6 +792,7 @@ void intern_close_table(TABLE *table) delete table->triggers; if (table->file) // Not true if name lock VOID(closefrm(table, 1)); // close file + table->alias.free(); DBUG_VOID_RETURN; } @@ -2328,9 +2329,9 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list, bool link_in) object to its original state. */ memcpy(table, &orig_table, sizeof(*table)); + bzero(&orig_table, sizeof(orig_table)); // Ensure alias is not freed DBUG_RETURN(TRUE); } - orig_table.alias.free(); share= table->s; /* @@ -3674,7 +3675,7 @@ bool table_is_used(TABLE *table, bool wait_for_name_lock) char *key= table->s->table_cache_key.str; uint key_length= table->s->table_cache_key.length; - DBUG_PRINT("loop", ("table_name: %s", table->alias.c_ptr())); + DBUG_PRINT("loop", ("table_name: %s.%s", key, strend(key)+1)); HASH_SEARCH_STATE state; for (TABLE *search= (TABLE*) hash_first(&open_cache, (uchar*) key, key_length, &state); |