1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix accesses to uninitialized memory (found by valgrind)

mysys/my_alloc.c:
  Added comment for free_root
sql/filesort.cc:
  Removed valgrind warning
sql/sql_select.cc:
  Remove not needed my_casedn_str() for internal files
  (Old code actually didn't do any god as it was accessing not used memory)
sql/sql_view.cc:
  Removed access to uninitialized memory
sql/table.cc:
  Cleanup of error handling
This commit is contained in:
unknown
2005-01-13 03:02:49 +02:00
parent a21bb57546
commit 90b9065dce
5 changed files with 71 additions and 54 deletions

View File

@@ -7823,12 +7823,17 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
if (temp_pool_slot != MY_BIT_NONE) // we got a slot
sprintf(filename, "%s_%lx_%i", tmp_file_prefix,
current_pid, temp_pool_slot);
else // if we run out of slots or we are not using tempool
else
{
/* if we run out of slots or we are not using tempool */
sprintf(filename,"%s%lx_%lx_%x",tmp_file_prefix,current_pid,
thd->thread_id, thd->tmp_table++);
}
if (lower_case_table_names)
my_casedn_str(files_charset_info, path);
/*
No need for change table name to lower case as we are only creating
MyISAM or HEAP tables here
*/
sprintf(path, "%s%s", mysql_tmpdir, filename);
if (group)