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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user