Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ef183de6
Commit
ef183de6
authored
May 07, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-8497
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
7217b4e9
ac69a4a2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
4 deletions
+27
-4
mysql-test/r/temp_table.result
mysql-test/r/temp_table.result
+9
-0
mysql-test/t/temp_table-master.opt
mysql-test/t/temp_table-master.opt
+1
-0
mysql-test/t/temp_table.test
mysql-test/t/temp_table.test
+9
-0
sql/ha_heap.cc
sql/ha_heap.cc
+4
-2
sql/sql_select.cc
sql/sql_select.cc
+4
-2
No files found.
mysql-test/r/temp_table.result
View file @
ef183de6
...
@@ -97,3 +97,12 @@ Variable_name Value
...
@@ -97,3 +97,12 @@ Variable_name Value
Created_tmp_disk_tables 0
Created_tmp_disk_tables 0
Created_tmp_tables 1
Created_tmp_tables 1
drop table t1;
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;
mysql-test/t/temp_table-master.opt
0 → 100644
View file @
ef183de6
--tmpdir=$MYSQL_TEST_DIR/var//tmp
mysql-test/t/temp_table.test
View file @
ef183de6
...
@@ -89,3 +89,12 @@ flush status;
...
@@ -89,3 +89,12 @@ flush status;
select
*
from
t1
group
by
d
;
select
*
from
t1
group
by
d
;
show
status
like
"created_tmp%tables"
;
show
status
like
"created_tmp%tables"
;
drop
table
t1
;
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
;
sql/ha_heap.cc
View file @
ef183de6
...
@@ -408,7 +408,8 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd,
...
@@ -408,7 +408,8 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd,
int
ha_heap
::
delete_table
(
const
char
*
name
)
int
ha_heap
::
delete_table
(
const
char
*
name
)
{
{
char
buff
[
FN_REFLEN
];
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
;
return
error
==
ENOENT
?
0
:
error
;
}
}
...
@@ -527,7 +528,8 @@ int ha_heap::create(const char *name, TABLE *table_arg,
...
@@ -527,7 +528,8 @@ int ha_heap::create(const char *name, TABLE *table_arg,
create_info
->
auto_increment_value
-
1
:
0
);
create_info
->
auto_increment_value
-
1
:
0
);
hp_create_info
.
max_table_size
=
current_thd
->
variables
.
max_heap_table_size
;
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
);
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
,
table_arg
->
keys
,
keydef
,
table_arg
->
reclength
,
(
ulong
)
((
table_arg
->
max_rows
<
max_rows
&&
(
ulong
)
((
table_arg
->
max_rows
<
max_rows
&&
table_arg
->
max_rows
)
?
table_arg
->
max_rows
)
?
...
...
sql/sql_select.cc
View file @
ef183de6
...
@@ -5028,12 +5028,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -5028,12 +5028,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
temp_pool_slot
=
bitmap_set_next
(
&
temp_pool
);
temp_pool_slot
=
bitmap_set_next
(
&
temp_pool
);
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
// we got a slot
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
);
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
(
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
++
);
thd
->
thread_id
,
thd
->
tmp_table
++
);
fn_format
(
path
,
path
,
mysql_tmpdir
,
""
,
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
);
if
(
lower_case_table_names
)
if
(
lower_case_table_names
)
my_casedn_str
(
files_charset_info
,
path
);
my_casedn_str
(
files_charset_info
,
path
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment