1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
unknown
2006-10-04 10:49:39 -04:00
parent 69aa7b40c2
commit aaef575f9f
3 changed files with 19 additions and 1 deletions

View File

@@ -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;
}