Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-01-10 13:04:58+04:00, gluh@stripped +3 -0
Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
MERGE: 1.1616.2873.37
sql/mysql_priv.h@stripped, 2007-01-10 13:04:57+04:00, gluh@stripped +1 -1
manual merge
MERGE: 1.186.91.58
sql/mysqld.cc@stripped, 2007-01-10 13:02:08+04:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.356.98.34
sql/sql_base.cc@stripped, 2007-01-10 13:02:09+04:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.145.1.130
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gluh
# Host: eagle.(none)
# Root: /home/gluh/MySQL/Merge/5.0-opt/RESYNC
--- 1.426/sql/mysql_priv.h 2006-12-23 23:04:25 +04:00
+++ 1.427/sql/mysql_priv.h 2007-01-10 13:04:57 +04:00
@@ -1157,6 +1157,7 @@ File open_binlog(IO_CACHE *log, const ch
/* mysqld.cc */
extern void MYSQLerror(const char*);
void refresh_status(THD *thd);
+my_bool mysql_rm_tmp_tables(void);
/* item_func.cc */
extern bool check_reserved_words(LEX_STRING *name);
--- 1.584/sql/mysqld.cc 2006-12-23 23:04:25 +04:00
+++ 1.585/sql/mysqld.cc 2007-01-10 13:02:08 +04:00
@@ -3490,7 +3490,7 @@ we force server id to 2, but this MySQL
*/
error_handler_hook= my_message_sql;
start_signal_handler(); // Creates pidfile
- if (acl_init(opt_noacl) ||
+ if (mysql_rm_tmp_tables() || acl_init(opt_noacl) ||
my_tz_init((THD *)0, default_tz_name, opt_bootstrap))
{
abort_loop=1;
--- 1.360/sql/sql_base.cc 2006-12-31 00:02:07 +04:00
+++ 1.361/sql/sql_base.cc 2007-01-10 13:02:09 +04:00
@@ -36,7 +36,6 @@ static int open_unireg_entry(THD *thd, T
TABLE_LIST *table_list, MEM_ROOT *mem_root,
uint flags);
static void free_cache_entry(TABLE *entry);
-static void mysql_rm_tmp_tables(void);
static bool open_new_frm(THD *thd, const char *path, const char *alias,
const char *db, const char *table_name,
uint db_stat, uint prgflag,
@@ -53,7 +52,6 @@ extern "C" byte *table_cache_key(const b
bool table_cache_init(void)
{
- mysql_rm_tmp_tables();
return hash_init(&open_cache, &my_charset_bin, table_cache_size+16,
0, 0,table_cache_key,
(hash_free_key) free_cache_entry, 0) != 0;
@@ -5157,14 +5155,20 @@ fill_record_n_invoke_before_triggers(THD
}
-static void mysql_rm_tmp_tables(void)
+my_bool mysql_rm_tmp_tables(void)
{
uint i, idx;
- char filePath[FN_REFLEN], *tmpdir;
+ char filePath[FN_REFLEN], *tmpdir, filePathCopy[FN_REFLEN];
MY_DIR *dirp;
FILEINFO *file;
+ TABLE tmp_table;
+ THD *thd;
DBUG_ENTER("mysql_rm_tmp_tables");
+ if (!(thd= new THD))
+ DBUG_RETURN(1);
+ thd->store_globals();
+
for (i=0; i<=mysql_tmpdir_list.max; i++)
{
tmpdir=mysql_tmpdir_list.list[i];
@@ -5185,13 +5189,37 @@ static void mysql_rm_tmp_tables(void)
if (!bcmp(file->name,tmp_file_prefix,tmp_file_prefix_length))
{
- sprintf(filePath,"%s%s",tmpdir,file->name);
- VOID(my_delete(filePath,MYF(MY_WME)));
+ char *ext= fn_ext(file->name);
+ uint ext_len= strlen(ext);
+ uint filePath_len= my_snprintf(filePath, sizeof(filePath),
+ "%s%s", tmpdir, file->name);
+ if (!bcmp(reg_ext, ext, ext_len))
+ {
+ TABLE tmp_table;
+ if (!openfrm(filePath, "tmp_table", (uint) 0,
+ READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD,
+ 0, &tmp_table))
+ {
+ /* We should cut file extention before deleting of table */
+ memcpy(filePathCopy, filePath, filePath_len - ext_len);
+ filePathCopy[filePath_len - ext_len]= 0;
+ tmp_table.file->delete_table(filePathCopy);
+ closefrm(&tmp_table);
+ }
+ }
+ /*
+ File can be already deleted by tmp_table.file->delete_table().
+ So we hide error messages which happnes during deleting of these
+ files(MYF(0)).
+ */
+ VOID(my_delete(filePath, MYF(0)));
}
}
my_dirend(dirp);
}
- DBUG_VOID_RETURN;
+ delete thd;
+ my_pthread_setspecific_ptr(THR_THD, 0);
+ DBUG_RETURN(0);
}
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.2372) | gluh | 10 Jan |