mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix show warnings limit 0 and show warnings limit 0, 0.
Add test coverage for SHOW WARNINGS LIMIT a, b; mysql-test/r/warnings.result: Add test coverage for SHOW WARNINGS LIMIT a,b mysql-test/t/warnings.test: Add test coverage for SHOW WARNINGS LIMIT a,b sql/sql_error.cc: Fix show warnings limit 0 and show warnings limit 0, 0
This commit is contained in:
@ -203,6 +203,8 @@ my_bool mysqld_show_warnings(THD *thd, ulong levels_to_show)
|
||||
offset--;
|
||||
continue;
|
||||
}
|
||||
if (limit-- == 0)
|
||||
break;
|
||||
protocol->prepare_for_resend();
|
||||
protocol->store(warning_level_names[err->level],
|
||||
warning_level_length[err->level], system_charset_info);
|
||||
@ -210,8 +212,6 @@ my_bool mysqld_show_warnings(THD *thd, ulong levels_to_show)
|
||||
protocol->store(err->msg, strlen(err->msg), system_charset_info);
|
||||
if (protocol->write())
|
||||
DBUG_RETURN(1);
|
||||
if (!--limit)
|
||||
break;
|
||||
}
|
||||
send_eof(thd);
|
||||
DBUG_RETURN(0);
|
||||
|
Reference in New Issue
Block a user