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
b018755e
Commit
b018755e
authored
Feb 01, 2005
by
reggie@bob.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into bob.(none):/home/reggie/bk/mysql41
parents
26dcd87e
a5bd37e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
extra/perror.c
extra/perror.c
+12
-1
sql/sql_table.cc
sql/sql_table.cc
+2
-4
No files found.
extra/perror.c
View file @
b018755e
...
@@ -184,6 +184,7 @@ int main(int argc,char *argv[])
...
@@ -184,6 +184,7 @@ int main(int argc,char *argv[])
{
{
int
error
,
code
,
found
;
int
error
,
code
,
found
;
const
char
*
msg
;
const
char
*
msg
;
char
*
unknown_error
=
0
;
MY_INIT
(
argv
[
0
]);
MY_INIT
(
argv
[
0
]);
if
(
get_options
(
&
argc
,
&
argv
))
if
(
get_options
(
&
argc
,
&
argv
))
...
@@ -212,7 +213,12 @@ int main(int argc,char *argv[])
...
@@ -212,7 +213,12 @@ int main(int argc,char *argv[])
string 'Unknown Error'. To avoid printing it we try to find the
string 'Unknown Error'. To avoid printing it we try to find the
error string by asking for an impossible big error message.
error string by asking for an impossible big error message.
*/
*/
const
char
*
unknown_error
=
strerror
(
10000
);
msg
=
strerror
(
10000
);
/* allocate a buffer for unknown_error since strerror always returns the same pointer
on some platforms such as Windows */
unknown_error
=
malloc
(
strlen
(
msg
)
+
1
);
strcpy
(
unknown_error
,
msg
);
for
(
;
argc
--
>
0
;
argv
++
)
for
(
;
argc
--
>
0
;
argv
++
)
{
{
...
@@ -262,6 +268,11 @@ int main(int argc,char *argv[])
...
@@ -262,6 +268,11 @@ int main(int argc,char *argv[])
}
}
}
}
}
}
/* if we allocated a buffer for unknown_error, free it now */
if
(
unknown_error
)
free
(
unknown_error
);
exit
(
error
);
exit
(
error
);
return
error
;
return
error
;
}
}
sql/sql_table.cc
View file @
b018755e
...
@@ -2272,8 +2272,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
...
@@ -2272,8 +2272,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
strxmov
(
src_path
,
(
*
tmp_table
)
->
path
,
reg_ext
,
NullS
);
strxmov
(
src_path
,
(
*
tmp_table
)
->
path
,
reg_ext
,
NullS
);
else
else
{
{
strxmov
(
src_path
,
mysql_data_home
,
"/"
,
src_db
,
"/"
,
src_table
,
fn_format
(
src_path
,
src_table
,
src_db
,
reg_ext
,
MYF
(
MY_UNPACK_FILENAME
));
reg_ext
,
NullS
);
if
(
access
(
src_path
,
F_OK
))
if
(
access
(
src_path
,
F_OK
))
{
{
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
src_table
);
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
src_table
);
...
@@ -2300,8 +2299,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
...
@@ -2300,8 +2299,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
}
}
else
else
{
{
strxmov
(
dst_path
,
mysql_data_home
,
"/"
,
db
,
"/"
,
table_name
,
fn_format
(
dst_path
,
table_name
,
db
,
reg_ext
,
MYF
(
MY_UNPACK_FILENAME
));
reg_ext
,
NullS
);
if
(
!
access
(
dst_path
,
F_OK
))
if
(
!
access
(
dst_path
,
F_OK
))
goto
table_exists
;
goto
table_exists
;
}
}
...
...
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