1
0
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:
unknown
2005-06-04 14:58:32 +04:00
parent a681af904d
commit d6e0883b07
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);