Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw 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
1.2191 05/03/01 19:05:48 jimw@stripped +5 -0
Make sure that the filename for temporary tables is built with fn_format()
so that extra slashes are handled in tmpdir. (Bug #8497)
mysql-test/r/temp_table.result
1.10 05/03/01 19:03:34 jimw@stripped +9 -0
Add new test results
mysql-test/t/temp_table.test
1.9 05/03/01 19:03:29 jimw@stripped +9 -0
Add new regression test
mysql-test/t/temp_table-master.opt
1.1 05/03/01 19:03:20 jimw@stripped +1 -0
mysql-test/t/temp_table-master.opt
1.0 05/03/01 19:03:20 jimw@stripped +0 -0
BitKeeper file /home/jimw/my/mysql-4.1-8497/mysql-test/t/temp_table-master.opt
sql/sql_select.cc
1.406 05/03/01 18:54:27 jimw@stripped +4 -2
Construct filename for temporary tables using fn_format() to get consistent
filenames.
sql/ha_heap.cc
1.50 05/03/01 18:54:04 jimw@stripped +4 -2
use constants instead of magic integers on fn_format() calls
# 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: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-4.1-8497
--- 1.49/sql/ha_heap.cc 2005-02-08 12:44:49 -08:00
+++ 1.50/sql/ha_heap.cc 2005-03-01 18:54:04 -08:00
@@ -408,7 +408,8 @@
int ha_heap::delete_table(const char *name)
{
char buff[FN_REFLEN];
- int error= heap_delete_table(fn_format(buff,name,"","",4+2));
+ int error= heap_delete_table(fn_format(buff,name,"","",
+ MY_REPLACE_EXT|MY_UNPACK_FILENAME));
return error == ENOENT ? 0 : error;
}
@@ -521,7 +522,8 @@
create_info->auto_increment_value - 1 : 0);
hp_create_info.max_table_size=current_thd->variables.max_heap_table_size;
max_rows = (ha_rows) (hp_create_info.max_table_size / mem_per_row);
- error= heap_create(fn_format(buff,name,"","",4+2),
+ error= heap_create(fn_format(buff,name,"","",
+ MY_REPLACE_EXT|MY_UNPACK_FILENAME),
table_arg->keys,keydef, table_arg->reclength,
(ulong) ((table_arg->max_rows < max_rows &&
table_arg->max_rows) ?
--- 1.405/sql/sql_select.cc 2005-02-16 22:48:06 -08:00
+++ 1.406/sql/sql_select.cc 2005-03-01 18:54:27 -08:00
@@ -4880,11 +4880,13 @@
temp_pool_slot = bitmap_set_next(&temp_pool);
if (temp_pool_slot != MY_BIT_NONE) // we got a slot
- sprintf(path, "%s%s_%lx_%i", mysql_tmpdir, tmp_file_prefix,
+ sprintf(path, "%s_%lx_%i", tmp_file_prefix,
current_pid, temp_pool_slot);
else // if we run out of slots or we are not using tempool
- sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid,
+ sprintf(path,"%s%lx_%lx_%x", tmp_file_prefix,current_pid,
thd->thread_id, thd->tmp_table++);
+
+ fn_format(path, path, mysql_tmpdir, "", MY_REPLACE_EXT|MY_UNPACK_FILENAME);
if (lower_case_table_names)
my_casedn_str(files_charset_info, path);
--- New file ---
+++ mysql-test/t/temp_table-master.opt 05/03/01 19:03:20
--tmpdir=$MYSQL_TEST_DIR/var//tmp
--- 1.9/mysql-test/r/temp_table.result 2003-12-09 20:30:26 -08:00
+++ 1.10/mysql-test/r/temp_table.result 2005-03-01 19:03:34 -08:00
@@ -97,3 +97,12 @@
Created_tmp_disk_tables 0
Created_tmp_tables 1
drop table t1;
+create table t1 (a int, b int, index(a), index(b));
+create table t2 (c int auto_increment, d varchar(255), primary key (c));
+insert into t1 values (3,1),(3,2);
+insert into t2 values (NULL, 'foo'), (NULL, 'bar');
+select d, c from t1 left join t2 on b = c where a = 3 order by d;
+d c
+bar 2
+foo 1
+drop table t1, t2;
--- 1.8/mysql-test/t/temp_table.test 2004-11-02 10:13:23 -08:00
+++ 1.9/mysql-test/t/temp_table.test 2005-03-01 19:03:29 -08:00
@@ -89,3 +89,12 @@
select * from t1 group by d;
show status like "created_tmp%tables";
drop table t1;
+
+# Bug #8497: tmpdir with extra slashes would cause failures
+#
+create table t1 (a int, b int, index(a), index(b));
+create table t2 (c int auto_increment, d varchar(255), primary key (c));
+insert into t1 values (3,1),(3,2);
+insert into t2 values (NULL, 'foo'), (NULL, 'bar');
+select d, c from t1 left join t2 on b = c where a = 3 order by d;
+drop table t1, t2;
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2191) BUG#8497 | Jim Winstead | 2 Mar |