-
-
Notifications
You must be signed in to change notification settings - Fork 607
Created test-update-with-query-log-min-msec.rec #3210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
PavelShilin89
merged 5 commits into
master
from
test/query-log-min-msec-is-ignored-for-update
Mar 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7f8e418
Created test-update-with-query-log-min-msec.rec
PavelShilin89 0a220ad
Updated test-update-with-query-log-min-msec.rec
PavelShilin89 6e11498
Merge branch 'master' into test/query-log-min-msec-is-ignored-for-update
PavelShilin89 84e0cdd
Added new case to test/clt-tests/core/test-update-with-query-log-min-…
PavelShilin89 1aa3fc3
Update test/clt-tests/core/test-update-with-query-log-min-msec.rec
sanikolaev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
test/clt-tests/core/test-update-with-query-log-min-msec.rec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
––– input ––– | ||
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 | ||
––– output ––– | ||
––– input ––– | ||
cat /tmp/manticore.conf | ||
––– output ––– | ||
common { | ||
plugin_dir = /usr/local/lib/manticore | ||
lemmatizer_base = /usr/share/manticore/morph/ | ||
} | ||
searchd { | ||
listen = 127.0.0.1:9306:mysql41 | ||
listen = 127.0.0.1:9312 | ||
listen = 127.0.0.1:9308:http | ||
log = /var/log/manticore/searchd.log | ||
query_log = /var/log/manticore/query.log | ||
pid_file = /var/log/manticore/searchd.pid | ||
data_dir = /var/log/manticore | ||
query_log_format = sphinxql | ||
query_log_min_msec = 500 | ||
} | ||
––– input ––– | ||
stdbuf -oL searchd -c /tmp/manticore.conf > /dev/null | ||
––– output ––– | ||
––– input ––– | ||
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 | ||
––– output ––– | ||
Accepting connections! | ||
––– input ––– | ||
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; SELECT * FROM t WHERE id = 1" | ||
––– output ––– | ||
+------+------+ | ||
| id | a | | ||
+------+------+ | ||
| 1 | 2 | | ||
+------+------+ | ||
––– input ––– | ||
mysql -h0 -P9306 -e "SELECT * FROM t WHERE id = 1" > /tmp/select_result.log | ||
––– output ––– | ||
––– input ––– | ||
if grep -q "2" /tmp/select_result.log; then echo "SELECT shows updated value: a = 2"; else echo "SELECT failed to show updated value!"; exit 1; fi | ||
––– output ––– | ||
SELECT shows updated value: a = 2 | ||
––– input ––– | ||
if grep -q "UPDATE t SET a = 2 WHERE id = 1" /var/log/manticore/query.log && grep -q "real 0\.[0-4][0-9][0-9]" /var/log/manticore/query.log; then | ||
echo "Fast UPDATE (real < 0.500 sec) is still logged despite query_log_min_msec = 500" | ||
tail -n 5 /var/log/manticore/query.log | ||
exit 1 | ||
else | ||
echo "Fast UPDATE is not logged as expected with query_log_min_msec = 500" | ||
tail -n 5 /var/log/manticore/query.log | ||
fi | ||
––– output ––– | ||
Fast UPDATE is not logged as expected with query_log_min_msec = 500 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.