summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <iggy@rolltop.ignatz42.dyndns.org>2006-10-04 10:49:39 -0400
committerunknown <iggy@rolltop.ignatz42.dyndns.org>2006-10-04 10:49:39 -0400
commitaaef575f9f360e03f344d55f5f14aacff382ce2c (patch)
tree24ad13753a014c0116769605e30b9e4f7e951c7a /sql/set_var.cc
parent69aa7b40c22994fce94029f11fcdc5e1c7dabcaf (diff)
downloadmariadb-git-aaef575f9f360e03f344d55f5f14aacff382ce2c.tar.gz
Bug #19024- SHOW COUNT(*) WARNINGS not return Errors
The server variable warning_count should include the number of warnings, errors and notes according to the manual mysql-test/r/user_var.result: Added warning_count results. mysql-test/t/user_var.test: Added test case for warning_count. sql/set_var.cc: Added number errors to warning_count.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index c667e2f2bcc..dd41256a7cc 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2917,6 +2917,7 @@ static byte *get_warning_count(THD *thd)
{
thd->sys_var_tmp.long_value=
(thd->warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_NOTE] +
+ thd->warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_ERROR] +
thd->warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_WARN]);
return (byte*) &thd->sys_var_tmp.long_value;
}