Testing global settings for slow.log

Registered by Oleg Tsarev

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
Oleg Tsarev
Direction:
Needs approval
Assignee:
Oleg Tsarev
Definition:
Approved
Series goal:
Accepted for 5.1
Implementation:
Implemented
Milestone target:
None
Started by
Oleg Tsarev
Completed by
Oleg Tsarev

Related branches

Sprints

Whiteboard

https://blueprints.launchpad.net/percona-server/+spec/control-global-slow
http://www.percona.com/docs/wiki/patches:use_global_long_query_time
http://www.percona.com/docs/wiki/patches:microslow_innodb

* For every flag we need separated test, but separated tests can share many code.

* Test package include:
1) positive test (test work of patches)
2) negative test (verifies the absence of regression)

* In the current paper I use the following terms (for example, variable use_global_long_query_time):
1) Config setup param (CSP) - param setup on server start (default mysql way)
2) Dynamic setup param (DSP) - param setup on server run (percona way - patch use_global_long_query_time).

For good coverage by tests we should test following things for every variable:
CSP: y | DSP: nothing | Behaviour: run with "y" value param.
CSP: y | DSP: x | Behaviour: run with "x" value of param.

Test has follwoing steps:
1) Server start with parameter --long-query-time=2
1) Run series of query as "select sleep(x)", where x has value 1, 3, 5
2) Then we setup long_query_time over global variable:
set global long_query_time=4;
set global use_global_long_query_time=1;
3) Again run series of query
4) Analyze log for check effects of test. Now we only check log's event's count over sh
cat var/mysqld.1/data/percona_slow_query_log.log | grep Query_time | wc -l

Suggestions and corrections are welcome!

====
Comment from VadimTk:

All looks fine for me beside 3).
mysql-tests may be not good working with external tools. but we can call perl from *.test, please
check
binlog/t/binlog_stm_unsafe_warning.test file
I think simple grep will be enough for this kind of tests.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.