diff options
author | konstantin@mysql.com <> | 2005-06-04 14:58:32 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2005-06-04 14:58:32 +0400 |
commit | f0233c2e3dd2b06fc2894ed426552fcb771b379b (patch) | |
tree | 91657c41a2b675fcb61fa27bfbfa7e79aa8806f9 /sql | |
parent | 7a1282b3e52323c7f12d9da8ce80e20251220c4b (diff) | |
download | mariadb-git-f0233c2e3dd2b06fc2894ed426552fcb771b379b.tar.gz |
Fix show warnings limit 0 and show warnings limit 0, 0.
Add test coverage for SHOW WARNINGS LIMIT a, b;
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_error.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc index d19e9fbdb09..a31e15d0745 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -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); |