Skip to content

Commit 7d1e4ed

Browse files
Created test-update-with-query-log-min-msec.rec (#3210)
* Created test-update-with-query-log-min-msec.reс --------- Co-authored-by: Sergey Nikolaev <[email protected]>
1 parent 80ff3a9 commit 7d1e4ed

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
––– input –––
2+
mkdir -p /var/{run,lib,log}/manticore; echo -e "common {\n\tplugin_dir = /usr/local/lib/manticore\n\tlemmatizer_base = /usr/share/manticore/morph/\n}\nsearchd {\n\tlisten = 127.0.0.1:9306:mysql41\n\tlisten = 127.0.0.1:9312\n\tlisten = 127.0.0.1:9308:http\n\tlog = /var/log/manticore/searchd.log\n\tquery_log = /var/log/manticore/query.log\n\tpid_file = /var/log/manticore/searchd.pid\n\tdata_dir = /var/log/manticore\n\tquery_log_format = sphinxql\n\tquery_log_min_msec = 500\n}" > /tmp/manticore.conf
3+
––– output –––
4+
––– input –––
5+
cat /tmp/manticore.conf
6+
––– output –––
7+
common {
8+
plugin_dir = /usr/local/lib/manticore
9+
lemmatizer_base = /usr/share/manticore/morph/
10+
}
11+
searchd {
12+
listen = 127.0.0.1:9306:mysql41
13+
listen = 127.0.0.1:9312
14+
listen = 127.0.0.1:9308:http
15+
log = /var/log/manticore/searchd.log
16+
query_log = /var/log/manticore/query.log
17+
pid_file = /var/log/manticore/searchd.pid
18+
data_dir = /var/log/manticore
19+
query_log_format = sphinxql
20+
query_log_min_msec = 500
21+
}
22+
––– input –––
23+
stdbuf -oL searchd -c /tmp/manticore.conf > /dev/null
24+
––– output –––
25+
––– input –––
26+
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
27+
––– output –––
28+
Accepting connections!
29+
––– input –––
30+
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(a int); INSERT INTO t VALUES(1, 1); UPDATE t SET a = 2 WHERE id = 1;"; echo $?
31+
––– output –––
32+
0
33+
––– input –––
34+
cat /var/log/manticore/query.log
35+
––– output –––
36+
––– input –––
37+
mysql -h0 -P9306 -e "set global query_log_min_msec=0"
38+
––– output –––
39+
––– input –––
40+
mysql -h0 -P9306 -e "UPDATE t SET a = 2 WHERE id = 1;"; echo $?
41+
––– output –––
42+
0
43+
––– input –––
44+
cat /var/log/manticore/query.log
45+
––– output –––
46+
/* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# */ UPDATE t SET a = 2 WHERE id = 1;

0 commit comments

Comments
 (0)