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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
44cd4915
Commit
44cd4915
authored
Jan 30, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/bug15904/my51-bug15904
into neptunus.(none):/home/msvensson/mysql/mysql-5.1
parents
c56f8288
b5188bdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
sql/sql_table.cc
sql/sql_table.cc
+10
-15
No files found.
sql/sql_table.cc
View file @
44cd4915
...
...
@@ -122,14 +122,17 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db,
}
uint
build_tmptable_filename
(
char
*
buff
,
size_t
bufflen
,
const
char
*
tmpdir
,
const
char
*
table
,
const
char
*
ext
)
uint
build_tmptable_filename
(
THD
*
thd
,
char
*
buff
,
size_t
bufflen
)
{
uint
length
;
char
tbbuff
[
FN_REFLEN
];
VOID
(
tablename_to_filename
(
table
,
tbbuff
,
sizeof
(
tbbuff
)));
strxnmov
(
buff
,
bufflen
,
tmpdir
,
"/"
,
tbbuff
,
ext
,
NullS
);
char
tmp_table_name
[
tmp_file_prefix_length
+
22
+
22
+
22
+
3
];
my_snprintf
(
tmp_table_name
,
sizeof
(
tmp_table_name
),
"%s%lx_%lx_%x"
,
tmp_file_prefix
,
current_pid
,
thd
->
thread_id
,
thd
->
tmp_table
++
);
VOID
(
tablename_to_filename
(
tmp_table_name
,
tbbuff
,
sizeof
(
tbbuff
)));
strxnmov
(
buff
,
bufflen
,
mysql_tmpdir
,
"/"
,
tbbuff
,
reg_ext
,
NullS
);
length
=
unpack_filename
(
buff
,
buff
);
return
length
;
}
...
...
@@ -2169,12 +2172,7 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
/* Check if table exists */
if
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
)
{
char
tmp_table_name
[
tmp_file_prefix_length
+
22
+
22
+
22
+
3
];
my_snprintf
(
tmp_table_name
,
sizeof
(
tmp_table_name
),
"%s%lx_%lx_%x"
,
tmp_file_prefix
,
current_pid
,
thd
->
thread_id
,
thd
->
tmp_table
++
);
path_length
=
build_tmptable_filename
(
path
,
sizeof
(
path
),
mysql_tmpdir
,
tmp_table_name
,
reg_ext
);
path_length
=
build_tmptable_filename
(
thd
,
path
,
sizeof
(
path
));
if
(
lower_case_table_names
)
my_casedn_str
(
files_charset_info
,
path
);
create_info
->
table_options
|=
HA_CREATE_DELAY_KEY_WRITE
;
...
...
@@ -3359,10 +3357,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
{
if
(
find_temporary_table
(
thd
,
db
,
table_name
))
goto
table_exists
;
dst_path_length
=
my_snprintf
(
dst_path
,
sizeof
(
dst_path
),
"%s%s%lx_%lx_%x%s"
,
mysql_tmpdir
,
tmp_file_prefix
,
current_pid
,
thd
->
thread_id
,
thd
->
tmp_table
++
,
reg_ext
);
dst_path_length
=
build_tmptable_filename
(
thd
,
dst_path
,
sizeof
(
dst_path
));
if
(
lower_case_table_names
)
my_casedn_str
(
files_charset_info
,
dst_path
);
create_info
->
table_options
|=
HA_CREATE_DELAY_KEY_WRITE
;
...
...
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