From aaef575f9f360e03f344d55f5f14aacff382ce2c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Oct 2006 10:49:39 -0400 Subject: 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. --- sql/set_var.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/set_var.cc') 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; } -- cgit v1.2.1