Skip to content

SELECT does not wait for FREEZE + UPDATE #2805

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
merged 20 commits into from
Mar 19, 2025
Merged
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions test/clt-tests/core/test-freeze-unfreeze-update.rec
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ mysql -P9315 -h0 -e "select * from t;"
| 1 | a |
+------+------+
––– input –––
rm -f /tmp/update.sql; for n in `seq 1 10000`; do echo "update t set s='b' where id=1;" >> /tmp/update.sql; done; while true; do mysql -P9315 -h0 < /tmp/update.sql | break; done &
(rm -f /tmp/update.sql; for n in `seq 1 10000`; do echo "update t set s='b' where id=1;" >> /tmp/update.sql; done; for i in `seq 1 10`; do mysql -P9315 -h0 < /tmp/update.sql; done; 2>&1 &)
––– output –––
[#!/[0-9]{1}/!#] %{NUMBER}
––– input –––
sleep 30; mysql -P9315 -h0 -e "select * from t;"
––– output –––
Expand All @@ -38,7 +37,7 @@ sleep 30; mysql -P9315 -h0 -e "select * from t;"
| 1 | b |
+------+------+
––– input –––
stdbuf -oL mysql -P9315 -h0 -e "freeze t"
mysql -P9315 -h0 -e "freeze t"
––– output –––
+------------------------+------------------------+
| file | normalized |
Expand Down Expand Up @@ -75,3 +74,31 @@ mysql -P9315 -h0 -e "DESCRIBE t"
mysql -P9315 -h0 -e "UPDATE t SET s='с' WHERE id=1; FLUSH RAMCHUNK t"; echo $?
––– output –––
0
––– input –––
(sleep 1; mysql -P9315 -h0 -e "drop table if exists t; create table t(a string); insert into t values(1, 'a'); flush ramchunk t; freeze t"; mysql -P9315 -h0 -e "update t set a='b' where id = 1" 2>&1 &)
––– output –––
+------------------------+------------------------+
| file | normalized |
+------------------------+------------------------+
| /tmp/data/t/t.0.spa | /tmp/data/t/t.0.spa |
| /tmp/data/t/t.0.spb | /tmp/data/t/t.0.spb |
| /tmp/data/t/t.0.spd | /tmp/data/t/t.0.spd |
| /tmp/data/t/t.0.spe | /tmp/data/t/t.0.spe |
| /tmp/data/t/t.0.sph | /tmp/data/t/t.0.sph |
| /tmp/data/t/t.0.sphi | /tmp/data/t/t.0.sphi |
| /tmp/data/t/t.0.spi | /tmp/data/t/t.0.spi |
| /tmp/data/t/t.0.spidx | /tmp/data/t/t.0.spidx |
| /tmp/data/t/t.0.spm | /tmp/data/t/t.0.spm |
| /tmp/data/t/t.0.spp | /tmp/data/t/t.0.spp |
| /tmp/data/t/t.0.spt | /tmp/data/t/t.0.spt |
| /tmp/data/t/t.meta | /tmp/data/t/t.meta |
| /tmp/data/t/t.settings | /tmp/data/t/t.settings |
+------------------------+------------------------+
––– input –––
sleep 1; mysql -P9315 -h0 -e "select * from t;"
––– output –––
+------+------+
| id | a |
+------+------+
| 1 | a |
+------+------+