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
64ef4ec2
Commit
64ef4ec2
authored
Feb 16, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix output of perror to include whether the error message
corresponds to an OS or MySQL error. (Bug #8517)
parent
aa70a6ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
extra/perror.c
extra/perror.c
+7
-6
No files found.
extra/perror.c
View file @
64ef4ec2
...
@@ -245,16 +245,17 @@ int main(int argc,char *argv[])
...
@@ -245,16 +245,17 @@ int main(int argc,char *argv[])
msg
=
strerror
(
code
);
msg
=
strerror
(
code
);
/*
/*
Don't print message for not existing error messages or for
We don't print the OS error message if it is the same as the
unknown
errors. We test for 'Uknown Errors' just as an
unknown
_error message we retrieved above, or it starts with
extra safety for Netware
'Unknown Error' (without regard to case).
*/
*/
if
(
msg
&&
strcmp
(
msg
,
"Unknown Error"
)
&&
if
(
msg
&&
my_strnncoll
(
&
my_charset_latin1
,
msg
,
13
,
"Unknown Error"
,
13
)
&&
(
!
unknown_error
||
strcmp
(
msg
,
unknown_error
)))
(
!
unknown_error
||
strcmp
(
msg
,
unknown_error
)))
{
{
found
=
1
;
found
=
1
;
if
(
verbose
)
if
(
verbose
)
printf
(
"
E
rror code %3d: %s
\n
"
,
code
,
msg
);
printf
(
"
OS e
rror code %3d: %s
\n
"
,
code
,
msg
);
else
else
puts
(
msg
);
puts
(
msg
);
}
}
...
@@ -269,7 +270,7 @@ int main(int argc,char *argv[])
...
@@ -269,7 +270,7 @@ int main(int argc,char *argv[])
else
else
{
{
if
(
verbose
)
if
(
verbose
)
printf
(
"MySQL error
: %3d =
%s
\n
"
,
code
,
msg
);
printf
(
"MySQL error
code %3d:
%s
\n
"
,
code
,
msg
);
else
else
puts
(
msg
);
puts
(
msg
);
}
}
...
...
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