1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix show warnings limit 0 and show warnings limit 0, 0.

Add test coverage for SHOW WARNINGS LIMIT a, b;
This commit is contained in:
konstantin@mysql.com
2005-06-04 14:58:32 +04:00
parent 7a1282b3e5
commit f0233c2e3d
3 changed files with 77 additions and 2 deletions

View File

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