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
541469f7
Commit
541469f7
authored
Jul 12, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: create internal temporary tables in mysql_tmpdir, not in datadir
parent
3d4ff9a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
sql/sql_select.cc
sql/sql_select.cc
+6
-6
No files found.
sql/sql_select.cc
View file @
541469f7
...
...
@@ -10092,7 +10092,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
bool
using_unique_constraint
=
0
;
bool
use_packed_rows
=
0
;
bool
not_all_columns
=
!
(
select_options
&
TMP_TABLE_ALL_COLUMNS
);
char
*
tmpname
,
path
[
FN_REFLEN
]
,
tmp_table_name
[
50
]
;
char
*
tmpname
,
path
[
FN_REFLEN
];
uchar
*
pos
,
*
group_buff
,
*
bitmaps
;
uchar
*
null_flags
;
Field
**
reg_field
,
**
from_field
,
**
default_field
;
...
...
@@ -10123,12 +10123,12 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
temp_pool_slot
=
bitmap_lock_set_next
(
&
temp_pool
);
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
// we got a slot
sprintf
(
tmp_table_name
,
"%s_%lx_%i"
,
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
(
tmp_table_name
,
"%s%lx_%lx_%x"
,
tmp_file_prefix
,
current_pid
,
sprintf
(
path
,
"%s%lx_%lx_%x"
,
tmp_file_prefix
,
current_pid
,
thd
->
thread_id
,
thd
->
tmp_table
++
);
}
...
...
@@ -10136,7 +10136,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
No need to change table name to lower case as we are only creating
MyISAM, Maria or HEAP tables here
*/
fn_format
(
path
,
tmp_table_name
,
mysql_tmpdir
,
""
,
fn_format
(
path
,
path
,
mysql_tmpdir
,
""
,
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
);
if
(
group
)
...
...
@@ -10183,7 +10183,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
sizeof
(
*
key_part_info
)
*
(
param
->
group_parts
+
1
),
&
param
->
start_recinfo
,
sizeof
(
*
param
->
recinfo
)
*
(
field_count
*
2
+
4
),
&
tmpname
,
(
uint
)
strlen
(
tmp_table_name
)
+
1
,
&
tmpname
,
(
uint
)
strlen
(
path
)
+
1
,
&
group_buff
,
(
group
&&
!
using_unique_constraint
?
param
->
group_length
:
0
),
&
bitmaps
,
bitmap_buffer_size
(
field_count
)
*
2
,
...
...
@@ -10202,7 +10202,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
DBUG_RETURN
(
NULL
);
/* purecov: inspected */
}
param
->
items_to_copy
=
copy_func
;
strmov
(
tmpname
,
tmp_table_name
);
strmov
(
tmpname
,
path
);
/* make table according to fields */
bzero
((
char
*
)
table
,
sizeof
(
*
table
));
...
...
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