Merge lp:~dingqi-lxb/percona-server/5.5_log_queries_in_memory into lp:percona-server/5.5
Status: | Superseded |
---|---|
Proposed branch: | lp:~dingqi-lxb/percona-server/5.5_log_queries_in_memory |
Merge into: | lp:percona-server/5.5 |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~dingqi-lxb/percona-server/5.5_log_queries_in_memory |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Oleg Tsarev | 2011-12-29 | Pending | |
Review via email:
|
This proposal supersedes a proposal from 2011-12-23.
This proposal has been superseded by a proposal from 2012-01-02.
Description of the change
http://
patch for https:/
add a variable 'slowlog_
If the current_memory grows larger than max_memory, the eldest ones will be wash out.
Same action happens when max_mamory are set to a new value that is less than current_memory.
Oleg Tsarev (tsarev) wrote : | # |
8.
+ ulonglong utime_of_query= thd->current_
+ if (utime_of_query <= thd->variables.
+ return;
Please look into the slow_extended.
static inline ulonglong get_query_
...
thd->server_
Please better use this status variable, instead of calculate query execution time directly.
林晓斌 (dingqi-lxb) wrote : | # |
Thank you. Oleg, I have some items to discuss.
2. About innodb_trx_id. Please look to two following cases
In these two cases, the variable thd->innodb_trx_id is set to 0. It seems that I have to show it in the result table as 0, is there other result even use innodb_was_used ?
8.About calculating query execution time directly, it is because that I have to get the query_time, the status is not enough.
* Why plugin doesn't uninstall in test?
You mean that it shows " Plugin is busy and will be uninstalled on shutdown" in result-file? It is the same with the demo for audit plugin "null_audit", the strategy decided by mysqld
Oleg Tsarev (tsarev) wrote : | # |
On Mon, Dec 12, 2011 at 12:05 PM, 林晓斌 <email address hidden> wrote:
> Thank you. Oleg, I have some items to discuss.
>
> 2. About innodb_trx_id. Please look to two following cases
> In these two cases, the variable thd->innodb_trx_id is set to 0. It seems that I have to show it in the result table as 0, is there other result even use innodb_was_used ?
I think right decision is "NULL" value instead of 0.
>
> 8.About calculating query execution time directly, it is because that I have to get the query_time, the status is not enough.
>
> * Why plugin doesn't uninstall in test?
> You mean that it shows " Plugin is busy and will be uninstalled on shutdown" in result-file? It is the same with the demo for audit plugin "null_audit", the strategy decided by mysqld
Ok
> --
> https:/
> You are reviewing the proposed merge of lp:~dingqi-lxb/percona-server/5.5_log_queries_in_memory into lp:percona-server.
--
Oleg Tsarev, Software Engineer, Percona Inc.
林晓斌 (dingqi-lxb) wrote : | # |
2. About innodb_trx_id. Generally, when the thd->innodb_trx_id is 0, the value of "INNODB_TRX_ID" should show NULL, so the thd->innodb_
7. Please add tests to sys_vars suite for the all added variables.
The variable add in this plugin will not be seen in other test-case, it can only be seen the plugin is installed. So, is test-case in sys_vars suits necessary?
Stewart Smith (stewart) wrote : | # |
On Wed, 21 Dec 2011 02:50:35 -0000, 林晓斌 <email address hidden> wrote:
> +There are two plugins in the feature. They can be installed by
> command ``"install plugin SLOWLOG_
> 'slowlog_
> 'slowlog_
I think we should be consistent in naming. SLOW_LOG instead of SLOWLOG
and slow_log instead of slowlog.
--
Stewart Smith
Baron Schwartz (baron-xaprb) wrote : | # |
I'm sorry that I haven't noticed this discussion before, but I believe that it would be best to avoid a query time in milliseconds:
1. It should have microsecond resolution. Milliseconds is not enough.
2. It should be named EXEC_TIME and should be a floating-point value in seconds so the user does not have to convert the value to seconds.
1. Please add patch name to the "patches/series" file
2. About innodb_trx_id. Please look to two following cases:
* log_slow_verbosity doesn't set "innodb"
* query doesn't use the InnoDB
In first case slow query log will has no information about InnoDB
In second case slow query will have line "# No InnoDB statistics available for this query\n"
In this two cases innodb_trx_id will be incorrect, and you can't use and setup it.
Please handle variable innodb_was_used correctly (at least for innodb_trx_id)
3. Following is very, very bad: query= "NULL"; query_len= 5; SCHEMA. I_S_SLOW_ LOG WHERE QUERY IS NULL
+ if (general_query)
+ {
....
+ }
+ else
+ {
+ this->general_
+ this->general_
+ }
You are break SQL semantic. For example query:
SELECT * FROM INSFORMATION_
or any join will not work correctly.
You are break SQL language semantic by string "NULL" instead of NULL
Same for Schema.
4. I_S_SLOW_LOG not very good name. Why SLOW_LOG bad?
5. Please add documentation to the doc/
6. Sleep in the test file - bad idea. Please replace this by debug variable query_exec_time.
7. Please add tests to sys_vars suite for the all added variables.
Please fix this, and I will review again.