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
56b9199b
Commit
56b9199b
authored
17 years ago
by
tsmith@ramayana.hindu.god
Browse files
Options
Browse Files
Download
Plain Diff
Merge ramayana.hindu.god:/home/tsmith/m/bk/build/b25146/51
into ramayana.hindu.god:/home/tsmith/m/bk/build/51
parents
3cfd6551
6a193c55
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
23 deletions
+54
-23
client/mysql.cc
client/mysql.cc
+29
-23
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+7
-0
mysql-test/t/mysql.test
mysql-test/t/mysql.test
+18
-0
No files found.
client/mysql.cc
View file @
56b9199b
...
@@ -2207,33 +2207,26 @@ com_go(String *buffer,char *line __attribute__((unused)))
...
@@ -2207,33 +2207,26 @@ com_go(String *buffer,char *line __attribute__((unused)))
}
}
#endif
#endif
if
(
error
)
{
executing_query
=
0
;
buffer
->
length
(
0
);
// Remove query on error
return
error
;
}
error
=
0
;
buffer
->
length
(
0
);
buffer
->
length
(
0
);
if
(
error
)
goto
end
;
do
do
{
{
if
(
quick
)
if
(
quick
)
{
{
if
(
!
(
result
=
mysql_use_result
(
&
mysql
))
&&
mysql_field_count
(
&
mysql
))
if
(
!
(
result
=
mysql_use_result
(
&
mysql
))
&&
mysql_field_count
(
&
mysql
))
{
{
e
xecuting_query
=
0
;
e
rror
=
put_error
(
&
mysql
)
;
return
put_error
(
&
mysql
)
;
goto
end
;
}
}
}
}
else
else
{
{
error
=
mysql_store_result_for_lazy
(
&
result
);
error
=
mysql_store_result_for_lazy
(
&
result
);
if
(
error
)
if
(
error
)
{
goto
end
;
executing_query
=
0
;
return
error
;
}
}
}
if
(
verbose
>=
3
||
!
opt_silent
)
if
(
verbose
>=
3
||
!
opt_silent
)
...
@@ -2310,12 +2303,10 @@ com_go(String *buffer,char *line __attribute__((unused)))
...
@@ -2310,12 +2303,10 @@ com_go(String *buffer,char *line __attribute__((unused)))
if
(
err
>=
1
)
if
(
err
>=
1
)
error
=
put_error
(
&
mysql
);
error
=
put_error
(
&
mysql
);
end:
if
(
show_warnings
==
1
&&
warnings
>=
1
)
/* Show warnings if any */
if
(
show_warnings
==
1
&&
warnings
>=
1
)
/* Show warnings if any */
{
init_pager
();
print_warnings
();
print_warnings
();
end_pager
();
}
if
(
!
error
&&
!
status
.
batch
&&
if
(
!
error
&&
!
status
.
batch
&&
(
mysql
.
server_status
&
SERVER_STATUS_DB_DROPPED
))
(
mysql
.
server_status
&
SERVER_STATUS_DB_DROPPED
))
...
@@ -2741,6 +2732,9 @@ static void print_warnings()
...
@@ -2741,6 +2732,9 @@ static void print_warnings()
MYSQL_ROW
cur
;
MYSQL_ROW
cur
;
my_ulonglong
num_rows
;
my_ulonglong
num_rows
;
/* Save current error before calling "show warnings" */
uint
error
=
mysql_errno
(
&
mysql
);
/* Get the warnings */
/* Get the warnings */
query
=
"show warnings"
;
query
=
"show warnings"
;
mysql_real_query_for_lazy
(
query
,
strlen
(
query
));
mysql_real_query_for_lazy
(
query
,
strlen
(
query
));
...
@@ -2748,16 +2742,28 @@ static void print_warnings()
...
@@ -2748,16 +2742,28 @@ static void print_warnings()
/* Bail out when no warnings */
/* Bail out when no warnings */
if
(
!
(
num_rows
=
mysql_num_rows
(
result
)))
if
(
!
(
num_rows
=
mysql_num_rows
(
result
)))
{
goto
end
;
mysql_free_result
(
result
);
return
;
cur
=
mysql_fetch_row
(
result
);
}
/*
Don't print a duplicate of the current error. It is possible for SHOW
WARNINGS to return multiple errors with the same code, but different
messages. To be safe, skip printing the duplicate only if it is the only
warning.
*/
if
(
!
cur
||
num_rows
==
1
&&
error
==
(
uint
)
strtoul
(
cur
[
1
],
NULL
,
10
))
goto
end
;
/* Print the warnings */
/* Print the warnings */
while
((
cur
=
mysql_fetch_row
(
result
)))
init_pager
();
do
{
{
tee_fprintf
(
PAGER
,
"%s (Code %s): %s
\n
"
,
cur
[
0
],
cur
[
1
],
cur
[
2
]);
tee_fprintf
(
PAGER
,
"%s (Code %s): %s
\n
"
,
cur
[
0
],
cur
[
1
],
cur
[
2
]);
}
}
while
((
cur
=
mysql_fetch_row
(
result
)));
end_pager
();
end:
mysql_free_result
(
result
);
mysql_free_result
(
result
);
}
}
...
...
This diff is collapsed.
Click to expand it.
mysql-test/r/mysql.result
View file @
56b9199b
...
@@ -180,3 +180,10 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
...
@@ -180,3 +180,10 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
1
1
End of 5.0 tests
End of 5.0 tests
WARNING: --server-arg option not supported in this configuration.
WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent'
Warning (Code 1266): Using storage engine MyISAM for table 't2'
Warning (Code 1286): Unknown table engine 'nonexistent'
Warning (Code 1266): Using storage engine MyISAM for table 't2'
Error (Code 1050): Table 't2' already exists
drop tables t1, t2;
End of tests
This diff is collapsed.
Click to expand it.
mysql-test/t/mysql.test
View file @
56b9199b
...
@@ -290,3 +290,21 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
...
@@ -290,3 +290,21 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
--
disable_query_log
--
disable_query_log
--
exec
$MYSQL
--
server
-
arg
=
no
-
defaults
test
-
e
"quit"
--
exec
$MYSQL
--
server
-
arg
=
no
-
defaults
test
-
e
"quit"
--
enable_query_log
--
enable_query_log
#
# Bug #25146: Some warnings/errors not shown when using --show-warnings
#
# This one should succeed with no warnings
--
exec
$MYSQL
--
show
-
warnings
test
-
e
"create table t1 (id int)"
# This should succeed, with warnings about conversion from nonexistent engine
--
exec
$MYSQL
--
show
-
warnings
test
-
e
"create table t2 (id int) engine=nonexistent"
# This should fail, with warnings as well
--
error
1
--
exec
$MYSQL
--
show
-
warnings
test
-
e
"create table t2 (id int) engine=nonexistent"
drop
tables
t1
,
t2
;
--
echo
End
of
tests
This diff is collapsed.
Click to expand it.
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