Skip to content

Commit 1f21481

Browse files
committed
Implement test on directory is not empty issue for #3075
1 parent 616b232 commit 1f21481

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Issue when we unable to drop and create new table in some cases
2+
while it produces error that directory is not empty
3+
https://github.com/manticoresoftware/manticoresearch/issues/3075
4+
––– block: ../base/start-searchd –––
5+
––– input –––
6+
LOG_FILE=$(mktemp)
7+
––– output –––
8+
––– input –––
9+
while true; do
10+
mysql -h0 -P9306 << EOF
11+
INSERT INTO a (id, value) VALUES (0, 'hello world');
12+
EOF
13+
sleep 2
14+
done > /dev/null &
15+
––– output –––
16+
––– input –––
17+
while true; do
18+
mysql -h0 -P9306 << EOF
19+
select * from a where match('world');
20+
EOF
21+
sleep 0.2
22+
done > /dev/null &
23+
––– output –––
24+
––– input –––
25+
while true; do
26+
mysql -h0 -P9306 << EOF
27+
DROP TABLE IF EXISTS b;
28+
CREATE TABLE b (id bigint, value string);
29+
EOF
30+
done > $LOG_FILE &
31+
––– output –––
32+
––– input –––
33+
timeout 10 tail -f $LOG_FILE | while read line; do
34+
if echo "$line" | grep -q "directory is not empty"; then
35+
kill $(jobs -p)
36+
break
37+
fi
38+
done
39+
––– output –––

0 commit comments

Comments
 (0)