Below is the list of changes that have just been committed into a local
5.1 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-11 15:09:34+04:00, gluh@stripped +1 -0
after merge fix
sql/sql_base.cc@stripped, 2007-01-11 15:09:32+04:00, gluh@stripped +39 -25
after merge fix
# 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.1-opt
--- 1.371/sql/sql_base.cc 2007-01-10 14:14:20 +04:00
+++ 1.372/sql/sql_base.cc 2007-01-11 15:09:32 +04:00
@@ -6073,11 +6073,11 @@ fill_record_n_invoke_before_triggers(THD
my_bool mysql_rm_tmp_tables(void)
{
uint i, idx;
- char filePath[FN_REFLEN], *tmpdir, filePathCopy[FN_REFLEN];
+ char filePath[FN_REFLEN], *tmpdir, filePathCopy[FN_REFLEN];
MY_DIR *dirp;
FILEINFO *file;
- TABLE tmp_table;
THD *thd;
+ TABLE_SHARE share;
DBUG_ENTER("mysql_rm_tmp_tables");
if (!(thd= new THD))
@@ -6103,33 +6103,47 @@ my_bool mysql_rm_tmp_tables(void)
(file->name[1] == '.' && !file->name[2])))
continue;
- if (!bcmp(file->name,tmp_file_prefix,tmp_file_prefix_length))
- {
- char *ext= fn_ext(file->name);
- uint ext_len= strlen(ext);
- uint filePath_len= my_snprintf(filePath, sizeof(filePath),
- "%s%c%s", FN_LIBCHAR,tmpdir,
- file->name);
- if (!bcmp(reg_ext, ext, ext_len))
+ if (!bcmp(file->name,tmp_file_prefix,tmp_file_prefix_length))
{
- TABLE tmp_table;
- if (!openfrm(thd, filePath, "tmp_table", (uint) 0,
- READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD,
- 0, &tmp_table))
+ char *ext= fn_ext(file->name);
+ uint ext_len= strlen(ext);
+ uint filePath_len= my_snprintf(filePath, sizeof(filePath),
+ "%s%c%s", tmpdir, FN_LIBCHAR,
+ file->name);
+ if (!bcmp(reg_ext, ext, ext_len))
{
- /* 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 file_d;
+ handler *handler_file= 0;
+
+ if ((file_d= my_open(filePath, O_RDONLY | O_SHARE, MYF(0))) > 0)
+ {
+ uchar head[288];
+ bzero((char*) &share, sizeof(share));
+ if (!my_read(file_d, (byte*) head, 64, MYF(MY_NABP)))
+ {
+ share.db_type=
+ ha_checktype(thd, ((enum legacy_db_type) (uint) *(head+3)),
+ 0, 0);
+ }
+ my_close(file_d, MYF(MY_WME));
+ if ((handler_file= get_new_handler(&share, thd->mem_root,
+ share.db_type)))
+ {
+ /* We should cut file extention before deleting of table */
+ memcpy(filePathCopy, filePath, filePath_len - ext_len);
+ filePathCopy[filePath_len - ext_len]= 0;
+ handler_file->delete_table(filePathCopy);
+ delete handler_file;
+ }
+ }
}
+ /*
+ 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)));
}
- /*
- 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);
}
| Thread |
|---|
| • bk commit into 5.1 tree (gluh:1.2384) | gluh | 11 Jan |