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
6376b0a8
Commit
6376b0a8
authored
Apr 03, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug when printing error messages. stdout and stderr were
mixed wrongly sometimes.
parent
9c1c76bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
client/mysql.cc
client/mysql.cc
+14
-13
No files found.
client/mysql.cc
View file @
6376b0a8
...
@@ -2405,31 +2405,32 @@ select_limit, max_join_size);
...
@@ -2405,31 +2405,32 @@ select_limit, max_join_size);
static
int
static
int
put_info
(
const
char
*
str
,
INFO_TYPE
info_type
,
uint
error
)
put_info
(
const
char
*
str
,
INFO_TYPE
info_type
,
uint
error
)
{
{
FILE
*
file
=
(
info_type
==
INFO_ERROR
?
stderr
:
stdout
);
static
int
inited
=
0
;
static
int
inited
=
0
;
if
(
status
.
batch
)
if
(
status
.
batch
)
{
{
if
(
info_type
==
INFO_ERROR
)
if
(
info_type
==
INFO_ERROR
)
{
{
(
void
)
fflush
(
stdout
);
(
void
)
fflush
(
file
);
fprintf
(
stderr
,
"ERROR"
);
fprintf
(
file
,
"ERROR"
);
if
(
error
)
if
(
error
)
(
void
)
fprintf
(
stderr
,
" %d"
,
error
);
(
void
)
fprintf
(
file
,
" %d"
,
error
);
if
(
status
.
query_start_line
&&
line_numbers
)
if
(
status
.
query_start_line
&&
line_numbers
)
{
{
(
void
)
fprintf
(
stderr
,
" at line %lu"
,
status
.
query_start_line
);
(
void
)
fprintf
(
file
,
" at line %lu"
,
status
.
query_start_line
);
if
(
status
.
file_name
)
if
(
status
.
file_name
)
(
void
)
fprintf
(
stderr
,
" in file: '%s'"
,
status
.
file_name
);
(
void
)
fprintf
(
file
,
" in file: '%s'"
,
status
.
file_name
);
}
}
(
void
)
fprintf
(
stderr
,
": %s
\n
"
,
str
);
(
void
)
fprintf
(
file
,
": %s
\n
"
,
str
);
(
void
)
fflush
(
stderr
);
(
void
)
fflush
(
file
);
if
(
!
ignore_errors
)
if
(
!
ignore_errors
)
return
1
;
return
1
;
}
}
else
if
(
info_type
==
INFO_RESULT
&&
verbose
>
1
)
else
if
(
info_type
==
INFO_RESULT
&&
verbose
>
1
)
tee_puts
(
str
,
stdout
);
tee_puts
(
str
,
file
);
if
(
unbuffered
)
if
(
unbuffered
)
fflush
(
stdout
);
fflush
(
file
);
return
info_type
==
INFO_ERROR
?
-
1
:
0
;
return
info_type
==
INFO_ERROR
?
-
1
:
0
;
}
}
if
(
!
opt_silent
||
info_type
==
INFO_ERROR
)
if
(
!
opt_silent
||
info_type
==
INFO_ERROR
)
...
@@ -2447,17 +2448,17 @@ put_info(const char *str,INFO_TYPE info_type,uint error)
...
@@ -2447,17 +2448,17 @@ put_info(const char *str,INFO_TYPE info_type,uint error)
putchar
(
'\007'
);
/* This should make a bell */
putchar
(
'\007'
);
/* This should make a bell */
vidattr
(
A_STANDOUT
);
vidattr
(
A_STANDOUT
);
if
(
error
)
if
(
error
)
(
void
)
tee_fprintf
(
stderr
,
"ERROR %d: "
,
error
);
(
void
)
tee_fprintf
(
file
,
"ERROR %d: "
,
error
);
else
else
tee_puts
(
"ERROR: "
,
stdout
);
tee_puts
(
"ERROR: "
,
file
);
}
}
else
else
vidattr
(
A_BOLD
);
vidattr
(
A_BOLD
);
(
void
)
tee_puts
(
str
,
stdout
);
(
void
)
tee_puts
(
str
,
file
);
vidattr
(
A_NORMAL
);
vidattr
(
A_NORMAL
);
}
}
if
(
unbuffered
)
if
(
unbuffered
)
fflush
(
stdout
);
fflush
(
file
);
return
info_type
==
INFO_ERROR
?
-
1
:
0
;
return
info_type
==
INFO_ERROR
?
-
1
:
0
;
}
}
...
...
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