Bug #1502 | For set Query_Cache_size, there is no error Or warning from server | ||
---|---|---|---|
Submitted: | 8 Oct 2003 1:57 | Modified: | 5 Nov 2003 22:51 |
Reporter: | Lokesh Babu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 4.x | OS: | All Operating Systems |
Assigned to: | Oleksandr Byelkin | CPU Architecture: | Any |
[8 Oct 2003 1:57]
Lokesh Babu
[8 Oct 2003 14:17]
Oleksandr Byelkin
Thank you for bug report. But it is imposible to fix it in 4.0 (lack of warnings + 4.0 is freeze => big changes is not allowed) Following is for 4.1 ChangeSet 1.1579 03/10/09 00:13:15 bell@laptop.sanja.is.com.ua +26 -0 added worning about changing requested size of query cache (BUG#1502)
[26 Oct 2003 12:33]
Oleksandr Byelkin
Thank you for bugreport. Patch for this bug is pushed in source repository on MySQL 4.1 and will be present in next release.
[3 Nov 2003 1:36]
Lokesh Babu
I verified that changes are in the tree and test case (query_cache.result) also passes. But, when I set the query_cache_size from mysql monitor, defect is not yet fixed. I verified this on both Linux and NetWare. If I set query_cache_size to 1024 from mysql monitor, there is no error warning and the query_cache_size is still zero. Guess that, I am looking for correct behavior only.
[3 Nov 2003 12:34]
Oleksandr Byelkin
Which version of mysql you use? Does "mysql monitor" supports new protocol of 4.1 and warning in it?
[4 Nov 2003 0:15]
Lokesh Babu
Just to make sure, I again tried today on Redhat Linux 9.0. We pulled the code at 10 am (India time) today (11/3/2003) and built the binaries. Both MySQL server and MySQL monitor are running on the same Linux box. But, the behavior is still same. There is no warning to the client.
[4 Nov 2003 0:23]
Lokesh Babu
Sorry, I forgot to mention MySQL version in my last edit. It is 4.1.1-alpha. As I mentioned, code was pulled from bitkepper, today at 10 am (India time).
[4 Nov 2003 0:56]
Oleksandr Byelkin
As was found there are to things can be called "mysql monnitor" 1. web tool written in PHP 2. MySQL command line tool called 'mysql' Which one you mean? You use public repository which have some lag relative to our internal repository, are you sure that my bugfix is in your repository (check test suite for example)
[4 Nov 2003 1:42]
Lokesh Babu
By MySQL monitor, I mean command line tool 'mysql' shipped as part of MySQL binaries. I again verified that your fix is in public repository. Following is the snippet from query_cache.result file: -------------------------------------------------------------------------------- set GLOBAL query_cache_size=1024; Warnings: Warning 1280 Query cache failed to set size 1024, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 ------------------------------------------------------------------------------- #define ER_WARN_QC_RESIZE 1279, is the new error code added in mysqld_error.h Following is the snippet from set_var.cc ------------------------------------------------------------------------------- static void fix_query_cache_size(THD *thd, enum_var_type type) { #ifdef HAVE_QUERY_CACHE ulong requested= query_cache_size; query_cache.resize(query_cache_size); if (requested != query_cache_size) push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_QC_RESIZE, ER(ER_WARN_QC_RESIZE), requested, query_cache_size); #endif } -------------------------------------------------------------------------------
[4 Nov 2003 23:40]
Oleksandr Byelkin
Can you check thet you use mysql program from same distribution (to be sure that it can receive warning at all) (BTW, normally mysql show only number of warnings, you need issue additional command "show warning" to see them, only mysql-test do it automatically) Can you see other warnings?
[5 Nov 2003 22:07]
Lokesh Babu
Got it. Working with "show warnings" command. So, it looks like MySQL server is sending proper error message and it is up to client to handle the error in its own way