On-the-fly filtering for KNN (prototype, WIP)#4129
On-the-fly filtering for KNN (prototype, WIP)#4129sanikolaev wants to merge 3 commits intomasterfrom
Conversation
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/vector-knn/test-knn-id.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "create table test ( title text, image_vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2' );"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 'test': knn library not loaded
––– input –––
mysql -h0 -P9306 -e "insert into test values ( 1, 'yellow bag', (0.653448,0.192478,0.017971,0.339821) ), ( 2, 'white bag', (-0.148894,0.748278,0.091892,-0.095406) );"
––– output –––
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from test where knn ( image_vector, 5, (0.286569,-0.031816,0.066684,0.032926), {ef=2000} );"
––– output –––
- +------+------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'test' in search request
- | id | knn_dist() |
- +------+------------+
- | 1 | 0.28146550 |
- | 2 | 0.81527930 |
- +------+------------+
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from test where knn ( image_vector, 5, 1 );"
––– output –––
- +------+------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'test' in search request
- | id | knn_dist() |
- +------+------------+
- | 2 | 1.14755321 |
- +------+------------+
––– input –––
mysql -h0 -P9306 -e "select * from test where knn ( image_vector, 5, 1 );"
––– output –––
- +------+-----------+---------------------------------------+------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'test' in search request
- | id | title | image_vector | @knn_dist |
- +------+-----------+---------------------------------------+------------+
- | 2 | white bag | -0.148894,0.748278,0.091892,-0.095406 | 1.14755321 |
- +------+-----------+---------------------------------------+------------+
––– input –––
mysql -h0 -P9306 -e "select count(*) from test where knn ( image_vector, 5, 1 );"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'test' in search request
- | count(*) |
- +----------+
- | 2 |
- +----------+
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test (id BIGINT, model TEXT, color TEXT, sold BOOL, date_added BIGINT, storage_capacity UINT, release_year UINT, price FLOAT, discounted_price FLOAT, product_codes JSON, values JSON, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 'knn_test': knn library not loaded
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test (id, model, color, sold, date_added, storage_capacity, release_year, price, discounted_price, product_codes, values, additional_info, vector) VALUES (1, 'Model_1', 'Color_1', 1, 1620590570251, 512, 2022, 654.19, 855.34, '[81,56,60]', '[96,389,27]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.1, 0.2, 0.3, 0.4)), (2, 'Model_2', 'Color_2', 1, 1689374130160, 128, 2020, 663.70, 767.99, '[12,39,30]', '[226,305,123]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.286569, -0.031816, 0.066684, 0.032926)), (3, 'Model_3', 'Color_3', 0, 1640782021529, 512, 2020, 676.46, 847.08, '[62,13,4]', '[707,601,608]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (-0.5, 0.7, -0.1, 0.2)), (4, 'Model_4', 'Color_4', 0, 1615319697581, 128, 2020, 424.23, 883.90, '[98,96,89]', '[166,252,510]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.7, -0.8, 0.1, -0.2)), (5, 'Model_5', 'Color_5', 1, 1671157942660, 128, 2021, 1173.29, 977.33, '[27,12,37]', '[988,87,21]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.3, 0.4, 0.5, 0.6)), (6, 'Model_6', 'Color_6', 0, 1609876342571, 256, 2021, 755.99, 665.49, '[5,15,25]', '[15,100,500]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (-0.2, 0.4, -0.6, 0.8)), (7, 'Model_7', 'Color_7', 1, 1648765432160, 64, 2019, 299.99, 199.99, '[77,88,99]', '[99,888,555]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.5, -0.3, 0.9, -0.1)), (8, 'Model_8', 'Color_8', 0, 1654876543130, 256, 2019, 800.99, 699.99, '[22,33,44]', '[66,333,999]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.8, 0.6, 0.2, -0.4)), (9, 'Model_9', 'Color_9', 1, 1631567882541, 128, 2022, 499.99, 399.99, '[11,22,33]', '[111,222,333]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (-0.1, 0.3, -0.5, 0.7)), (10, 'Model_10', 'Color_10', 0, 1678956543120, 512, 2022, 1299.99, 1099.99, '[9,8,7]', '[555,444,333]', '{\"features\": [\"Feature_1\", \"Feature_2\", \"Feature_3\"]}', (0.9, 0.1, 0.8, -0.2));"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id, knn_dist() FROM knn_test WHERE knn(vector, 5, 1);"
––– output –––
- +------+------------+
- | id | knn_dist() |
- +------+------------+
- | 5 | 0.16000001 |
- | 2 | 0.27772635 |
- | 9 | 0.78000003 |
- | 3 | 0.81000006 |
- | 7 | 1.020000 |
- | 6 | 1.100000 |
- | 10 | 1.260000 |
- | 8 | 1.300000 |
- | 4 | 1.75999987 |
- +------+------------+
––– input –––
mysql -h0 -P9306 -e "SELECT id, knn_dist() FROM knn_test WHERE knn(vector, 5, 1);"
––– output –––
- +------+------------+
- | id | knn_dist() |
- +------+------------+
- | 5 | 0.16000001 |
- | 2 | 0.27772635 |
- | 9 | 0.78000003 |
- | 3 | 0.81000006 |
- | 7 | 1.020000 |
- | 6 | 1.100000 |
- | 10 | 1.260000 |
- | 8 | 1.300000 |
- | 4 | 1.75999987 |
- +------+------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM knn_test WHERE knn(vector, 5, 1)\G"
––– output –––
- *************************** 1. row ***************************
- id: 5
- model: Model_5
- color: Color_5
- sold: 1
- date_added: 1671157942660
- storage_capacity: 128
- release_year: 2021
- price: 1173.290039
- discounted_price: 977.330017
- product_codes: [27,12,37]
- values: [988,87,21]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: 0.300000,0.400000,0.500000,0.600000
- @knn_dist: 0.16000001
- *************************** 2. row ***************************
- id: 2
- model: Model_2
- color: Color_2
- sold: 1
- date_added: 1689374130160
- storage_capacity: 128
- release_year: 2020
- price: 663.700012
- discounted_price: 767.989990
- product_codes: [12,39,30]
- values: [226,305,123]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: 0.286569,-0.031816,0.066684,0.032926
- @knn_dist: 0.27772635
- *************************** 3. row ***************************
- id: 9
- model: Model_9
- color: Color_9
- sold: 1
- date_added: 1631567882541
- storage_capacity: 128
- release_year: 2022
- price: 499.989990
- discounted_price: 399.989990
- product_codes: [11,22,33]
- values: [111,222,333]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: -0.100000,0.300000,-0.500000,0.700000
- @knn_dist: 0.78000003
- *************************** 4. row ***************************
- id: 3
- model: Model_3
- color: Color_3
- sold: 0
- date_added: 1640782021529
- storage_capacity: 512
- release_year: 2020
- price: 676.460022
- discounted_price: 847.080017
- product_codes: [62,13,4]
- values: [707,601,608]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: -0.500000,0.700000,-0.100000,0.200000
- @knn_dist: 0.81000006
- *************************** 5. row ***************************
- id: 7
- model: Model_7
- color: Color_7
- sold: 1
- date_added: 1648765432160
- storage_capacity: 64
- release_year: 2019
- price: 299.989990
- discounted_price: 199.990005
- product_codes: [77,88,99]
- values: [99,888,555]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: 0.500000,-0.300000,0.900000,-0.100000
- @knn_dist: 1.020000
- *************************** 6. row ***************************
- id: 6
- model: Model_6
- color: Color_6
- sold: 0
- date_added: 1609876342571
- storage_capacity: 256
- release_year: 2021
- price: 755.989990
- discounted_price: 665.489990
- product_codes: [5,15,25]
- values: [15,100,500]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: -0.200000,0.400000,-0.600000,0.800000
- @knn_dist: 1.100000
- *************************** 7. row ***************************
- id: 10
- model: Model_10
- color: Color_10
- sold: 0
- date_added: 1678956543120
- storage_capacity: 512
- release_year: 2022
- price: 1299.989990
- discounted_price: 1099.989990
- product_codes: [9,8,7]
- values: [555,444,333]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: 0.900000,0.100000,0.800000,-0.200000
- @knn_dist: 1.260000
- *************************** 8. row ***************************
- id: 8
- model: Model_8
- color: Color_8
- sold: 0
- date_added: 1654876543130
- storage_capacity: 256
- release_year: 2019
- price: 800.989990
- discounted_price: 699.989990
- product_codes: [22,33,44]
- values: [66,333,999]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: 0.800000,0.600000,0.200000,-0.400000
- @knn_dist: 1.300000
- *************************** 9. row ***************************
- id: 4
- model: Model_4
- color: Color_4
- sold: 0
- date_added: 1615319697581
- storage_capacity: 128
- release_year: 2020
- price: 424.230011
- discounted_price: 883.900024
- product_codes: [98,96,89]
- values: [166,252,510]
- additional_info: {"features":["Feature_1","Feature_2","Feature_3"]}
- vector: 0.700000,-0.800000,0.100000,-0.200000
- @knn_dist: 1.75999987
––– input –––
mysql -h0 -P9306 -e "SELECT count(*) FROM knn_test WHERE knn(vector, 5, 1);"
––– output –––
- +----------+
- | count(*) |
- +----------+
- | 10 |
- +----------+test/clt-tests/vector-knn/test-knn-validation.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Manticore started!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test (id BIGINT, title TEXT, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 'knn_test': knn library not loaded
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test VALUES (1, 'first', (0.1, 0.2, 0.3, 0.4)), (2, 'second', (0.5, 0.6, 0.7, 0.8)), (3, 'third', (0.9, 0.1, 0.2, 0.3));"
––– output –––
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM knn_test WHERE knn(vector, 2, (0.1, 0.2, 0.3, 0.4));"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'knn_test' in search request
- | id |
- +------+
- | 1 |
- | 2 |
- | 3 |
- +------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM knn_test WHERE knn(vector, -1, (0.1, 0.2, 0.3, 0.4));" 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM knn_test WHERE knn(vector, 2, (0.1, 0.2, 0.3, 0.4), {ef=-100});" 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM knn_test WHERE knn(vector, 2, (0.1, 0.2, 0.3, 0.4), {oversampling=-2.0});" 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM knn_test WHERE knn(vector, 0, (0.1, 0.2, 0.3, 0.4));" 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM knn_test WHERE knn(vector, 2, (0.1, 0.2, 0.3, 0.4), {oversampling=0});" 2>&1
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":2}}' | python3 -m json.tool | grep '"total"'
––– output –––
- "total": 3,
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":-1}}'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":2,"ef":-100}}'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":2,"oversampling":-2.0}}'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":0}}'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":2,"ef":0}}'
––– output –––
- {"took":%{NUMBER},"timed_out":false,"hits":{"total":3,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_knn_dist":0.000000,"_source":{"title":"first","vector":[0.100000,0.200000,0.300000,0.400000]}},{"_id":2,"_score":1,"_knn_dist":0.64000005,"_source":{"title":"second","vector":[0.500000,0.600000,0.700000,0.800000]}},{"_id":3,"_score":1,"_knn_dist":0.66999990,"_source":{"title":"third","vector":[0.900000,0.100000,0.200000,0.300000]}}]}}
+ {"error":"unknown local table(s) 'knn_test' in search request"}
––– input –––
curl -s -X POST http://localhost:9308/search -H 'Content-Type: application/json' -d '{"table":"knn_test","knn":{"field":"vector","query_vector":[0.1,0.2,0.3,0.4],"k":2,"oversampling":0}}'
––– output –––
OKtest/clt-tests/vector-knn/test-knn-search-by-doc-id.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d "create table test ( test_vector float_vector knn_type='hnsw' knn_dims='2' hnsw_similarity='l2' )" > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d 'insert into test values ( 2, (0.2,0.3) ), ( 3, (0.2,0.7) ), ( 4, (0.3,0.5) ), ( 5, (0.5,0.5) ), ( 6, (0.7,0.2) ), ( 10, (0.9,0.9) )' > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
curl -s localhost:9308/search -d '{"index":"test","knn":{"field":"test_vector","doc_id":3,"k":5}}'; echo $?
––– output –––
- {"took":%{NUMBER},"timed_out":false,"hits":{"total":%{NUMBER},"total_relation":"eq","hits":[{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]+/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{1}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}}]}}0
+ {"error":"unknown local table(s) 'test' in search request"}0test/clt-tests/vector-knn/tets-insert-knn-errors.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test (id BIGINT, model TEXT, vector float_vector)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test (id, model, vector) VALUES (1, 'Model_1', '[0.9012, 0.2126, 0.2879, 0.7552]')"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT count(*) FROM knn_test WHERE knn(vector, 10, 1)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE knn_test"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test2 (id BIGINT, model TEXT, vector float_vector)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test2 (id, model, vector) VALUES (1, 'Model_1', (0.286569,-0.031816,0.066684,0.032926))"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT count(*) FROM knn_test2 WHERE knn(vector, 10, 1)"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE knn_test2"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test3 (id BIGINT, model TEXT, vector float_vector)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test3 (id, model, vector) VALUES (1, 'Model_1', '[0.9012, 0.2126, 0.2879, 0.7552]')"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT count(*) FROM knn_test3 WHERE knn(vector, 10, 1)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE knn_test3"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test4 (id BIGINT, model TEXT, vector int)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test4 (id, model, vector) VALUES (1, 'Model_1', '[0.9012, 0.2126, 0.2879, 0.7552]')"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT count(*) FROM knn_test4 WHERE knn(vector, 10, 1)"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE knn_test4"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE knn_test5 (id BIGINT, model TEXT, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2')"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: error adding table 'knn_test5': knn library not loaded
+ 1
––– input –––
mysql -h0 -P9306 -e "INSERT INTO knn_test5 (id, model, vector) VALUES (1, 'Model_1', (0.9012, 0.2126, 0.2879, 0.7552))"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT count(*) FROM knn_test5 WHERE knn(vector, 10, 1)"
––– output –––
- +----------+
- | count(*) |
- +----------+
- | 1 |
- +----------+
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE knn_test5"
––– output –––
- +-----------+-------------------------------------------------------------------------------------------------------------------------+
+ +-----------+---------------------------------------------------------------------------------+
- | Table | Create Table |
+ | Table | Create Table |
- +-----------+-------------------------------------------------------------------------------------------------------------------------+
+ +-----------+---------------------------------------------------------------------------------+
| knn_test5 | CREATE TABLE knn_test5 (
id bigint,
model text,
- vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='L2'
+ vector json
- ) |
+ ) min_infix_len='2' |
- +-----------+-------------------------------------------------------------------------------------------------------------------------+
+ +-----------+---------------------------------------------------------------------------------+ |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/test-configuration/test-buddy-max-connections-configuration.rec––– input –––
sed -i '/^searchd/a\ max_connections=1' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi;
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:11.998 2026] [22] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:12.029 2026] [22] using config file '/etc/manticoresearch/manticore.conf' (291 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
- Buddy started!
+ listening on 127.0.0.1:9308 for sphinx and http(s)
+ Buddy started!
––– input –––
mysql -P9306 -h0 -e "CREATE TABLE IF NOT EXISTS t (id INT); INSERT INTO t (id) VALUES(0); SHOW QUERIES\G;"
––– output –––
OK
––– input –––
stdbuf -oL searchd --stopwait
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:12.258 2026] [53] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] stop: successfully sent SIGTERM to pid %{NUMBER}
+ [Sun Jan 25 09:25:12.288 2026] [53] using config file '/etc/manticoresearch/manticore.conf' (291 chars)...
+ [Sun Jan 25 09:25:12.290 2026] [53] stop: successfully sent SIGTERM to pid 25
––– input –––
sed -i '/^searchd/,/^}/s/max_connections=1/max_connections=2/' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi;
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:13.256 2026] [57] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:13.285 2026] [57] using config file '/etc/manticoresearch/manticore.conf' (291 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
- precaching table 't'
+ listening on 127.0.0.1:9308 for sphinx and http(s)
- precached 1 tables in #!/[0-9]+.[0-9]+/!# sec
+ precaching table 't'
- Buddy started!
+ precached 1 tables in 0.001 sec
+ Buddy started!
––– input –––
for n in 1 2; do mysql -P9306 -h0 -e "CREATE TABLE IF NOT EXISTS b${n} (id INT);" ; done; for n in 1 2; do mysql -P9306 -h0 -e "INSERT INTO b${n} (id) VALUES(0)" & pids="$pids $!"; done; for pid in $pids; do wait $pid; done; mysql -P9306 -h0 -e "show queries\G;"
––– output –––
OKtest/clt-tests/test-configuration/timezone.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd ${SEARCHD_ARGS:-} > /dev/null
––– output –––
OK
––– 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 –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select curtime()\G" | awk 'NR>1 {print $2}' > /tmp/utc.txt
––– output –––
OK
––– input –––
cat /tmp/utc.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select now(), curtime(), curdate(), utc_time(), utc_timestamp();"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "set global timezone='UTC';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select now(), curtime(), curdate(), utc_time(), utc_timestamp();"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "set global timezone='Asia/Bangkok';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select curtime()\G" | awk 'NR>1 {print $2}' > /tmp/bkk.txt
––– output –––
OK
––– input –––
cat /tmp/bkk.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select now(), curtime(), curdate(), utc_time(), utc_timestamp();"
––– output –––
OK
––– input –––
[ $(( ($(date -d "$(cat /tmp/bkk.txt)" +%s) - $(date -d "$(cat /tmp/utc.txt)" +%s) + 43200) % 86400 - 43200 >= 25200 )) ] && echo "At least 7 hours apart" || echo "Less than 7 hours apart"
––– output –––
OK
––– input –––
cp /etc/manticoresearch/manticore.conf /tmp/manticore.conf.backup
––– output –––
OK
––– input –––
searchd --stopwait 2>&1 | grep "successfully sent SIGTERM"
––– output –––
OK
––– input –––
export TZ=Asia/Tokyo && searchd --config /etc/manticoresearch/manticore.conf > /dev/null 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select hour(now()) as tokyo_hour\G" | grep "tokyo_hour:" | awk '{print $2}' > /tmp/tokyo_hour.txt
––– output –––
OK
––– input –––
searchd --stopwait 2>&1 | grep "successfully sent SIGTERM"
––– output –––
OK
––– input –––
export TZ=UTC && searchd --config /etc/manticoresearch/manticore.conf > /dev/null 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select hour(now()) as utc_hour\G" | grep "utc_hour:" | awk '{print $2}' > /tmp/tz_utc_hour.txt
––– output –––
OK
––– input –––
cp -P /etc/localtime /tmp/localtime.backup
––– output –––
OK
––– input –––
cp /etc/timezone /tmp/timezone.backup
––– output –––
OK
––– input –––
searchd --stopwait 2>&1 | grep "successfully sent SIGTERM"
––– output –––
OK
––– input –––
ln -snf /usr/share/zoneinfo/Asia/Singapore /etc/localtime && echo "Asia/Singapore" > /etc/timezone
––– output –––
OK
––– input –––
unset TZ && searchd --config /etc/manticoresearch/manticore.conf > /dev/null 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
searchd --stopwait 2>&1 | grep "successfully sent SIGTERM"
––– output –––
OK
––– input –––
ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo "Europe/London" > /etc/timezone
––– output –––
OK
––– input –––
searchd --config /etc/manticoresearch/manticore.conf > /dev/null 2>&1
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
OK
––– input –––
echo "Europe/London works correctly from system files"
––– output –––
OK
––– input –––
searchd --stopwait 2>&1 | grep "successfully sent SIGTERM"
––– output –––
OK
––– input –––
cp /etc/manticoresearch/manticore.conf /tmp/manticore_tz.conf
––– output –––
OK
––– input –––
sed -i '/^searchd {/a\ timezone = America/New_York' /tmp/manticore_tz.conf
––– output –––
OK
––– input –––
searchd --config /tmp/manticore_tz.conf 2>&1 | head -2 | grep "Using time zone"
––– output –––
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] Using time zone 'America/New_York'
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
- Value: America/New_York
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
searchd --stopwait --config /tmp/manticore_tz.conf 2>&1 | grep "successfully sent SIGTERM"
––– output –––
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
export TZ=Africa/Cairo
––– output –––
OK
––– input –––
ln -snf /usr/share/zoneinfo/Australia/Sydney /etc/localtime && echo "Australia/Sydney" > /etc/timezone
––– output –––
OK
––– input –––
searchd --config /tmp/manticore_tz.conf 2>&1 | head -2 | grep "Using time zone"
––– output –––
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] Using time zone 'America/New_York'
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
- Value: America/New_York
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
echo "Priority test: Config (America/New_York) overrides TZ (Africa/Cairo) and system (Australia/Sydney)"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "set global timezone='UTC';"
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "select hour(1615787586) as h_utc\G" | grep "h_utc:" | awk '{print $2}' > /tmp/hour_utc.txt
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "set global timezone='Asia/Tokyo';"
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "select hour(1615787586) as h_tokyo\G" | grep "h_tokyo:" | awk '{print $2}' > /tmp/hour_tokyo.txt
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
UTC_H=$(cat /tmp/hour_utc.txt)
––– output –––
OK
––– input –––
TOKYO_H=$(cat /tmp/hour_tokyo.txt)
––– output –––
OK
––– input –––
DIFF=$(( (TOKYO_H - UTC_H + 24) % 24 ))
––– output –––
OK
––– input –––
if [ $DIFF -eq 9 ]; then echo "HOUR(timestamp) works: Tokyo is UTC+9"; else echo "HOUR() error: diff is $DIFF, expected 9"; fi
––– output –––
- HOUR(timestamp) works: Tokyo is UTC+9
+ HOUR() error: diff is 0, expected 9
––– input –––
mysql -h0 -P9306 -e "set global timezone='GMT';"
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
- Value: GMT
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "set global timezone='EST5EDT';"
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
- Value: EST5EDT
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "set global timezone='Asia/Kolkata';"
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "show variables like 'timezone'\G" | grep Value
––– output –––
- Value: Asia/Kolkata
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
mysql -h0 -P9306 -e "select hour(now()) as kolkata_h, minute(now()) as kolkata_m\G" | grep -E "kolkata_h:|kolkata_m:" | awk '{print $2}' | tr '\n' ':' | sed 's/:$//' > /tmp/kolkata_time.txt
––– output –––
+ ERROR 2003 (HY000): Can't connect to MySQL server on '0:9306' (111)
––– input –––
echo "Kolkata (UTC+5:30) time: $(cat /tmp/kolkata_time.txt)"
––– output –––
- #!/Kolkata \(UTC\+5:30\) time: .*/!#
+ Kolkata (UTC+5:30) time:
––– input –––
searchd --stopwait --config /tmp/manticore_tz.conf 2>&1 | grep "successfully sent SIGTERM"
––– output –––
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
mv /tmp/localtime.backup /etc/localtime
––– output –––
OK
––– input –––
mv /tmp/timezone.backup /etc/timezone
––– output –––
OK
––– input –––
mv /tmp/manticore.conf.backup /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /tmp/manticore_tz.conf /tmp/*.txt
––– output –––
OK |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/buddy/test-show-version.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show version\G;"
––– output –––
*************************** 1. row ***************************
Component: Daemon
Version: %{VERSION}
*************************** 2. row ***************************
Component: Columnar
Version: columnar %{VERSION}
*************************** 3. row ***************************
Component: Secondary
Version: secondary %{VERSION}
*************************** 4. row ***************************
- Component: Knn
+ Component: Buddy
- Version: knn %{VERSION}
+ Version: buddy v3.40.6-g8ef265
- *************************** 5. row ***************************
- Component: Embeddings
- Version: embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#
- *************************** 6. row ***************************
- Component: Buddy
- Version: buddy %{VERSION}test/clt-tests/buddy/test-manticore-version-in-telemetry.rec––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
sed -i '/data_dir = \/var\/lib\/manticore/a\ buddy_path = manticore-executor -n /usr/share/manticore/modules/manticore-buddy/src/main.php --telemetry-period=5' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
export SEARCHD_FLAGS="--logdebugvv"
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
timeout 20 bash -c 'grep -m 1 "labels:" <(tail -f /var/log/manticore/searchd.log) | sed "s/.*labels: //" | jq -M .'
––– output –––
{
"collector": "buddy",
"os_name": "Linux",
"os_release_name": "Ubuntu",
"os_release_version": "%{SEMVER} LTS (#!/[A-Za-z]+\s[A-Za-z]+/!#)",
"machine_type": "x86_64",
"machine_id": "#!/[0-9A-Za-z]+/!#",
"dockerized": "#!/\b(?:unknown|yes)\b/!#",
"official_docker": "#!/\b(?:no|yes)\b/!#",
"buddy_version": "%{VERSION}",
"manticore_version": "%{VERSION}",
"columnar_version": "%{VERSION}",
"secondary_version": "%{VERSION}",
- "knn_version": "%{VERSION}",
+ "manticore_mode": "rt",
- "embeddings_version": "%{VERSION}",
+ "manticore_binlog_enabled": "yes",
- "manticore_mode": "#!/[A-Za-z]+/!#",
+ "manticore_auto_optimize_enabled": "yes",
- "manticore_binlog_enabled": "#!/\b(?:no|yes)\b/!#",
+ "manticore_query_log_format": "sphinxql",
- "manticore_auto_optimize_enabled": "#!/\b(?:no|yes)\b/!#",
+ "manticore_max_allowed_packet": "134217728",
- "manticore_query_log_format": "#!/[A-Za-z]+/!#",
+ "manticore_pseudo_sharding_enabled": "yes",
- "manticore_max_allowed_packet": "%{NUMBER}",
+ "manticore_secondary_indexes_enabled": "yes",
- "manticore_pseudo_sharding_enabled": "#!/\b(?:no|yes)\b/!#",
+ "manticore_accurate_aggregation_enabled": "no",
- "manticore_secondary_indexes_enabled": "#!/\b(?:no|yes)\b/!#",
+ "manticore_distinct_precision_threshold": "3500"
- "manticore_accurate_aggregation_enabled": "#!/\b(?:no|yes)\b/!#",
+ }
- "manticore_distinct_precision_threshold": "%{NUMBER}"
- } |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/http-interface/show-version-trailing-semicolon.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'|grep -v "\-\-\-"|grep -v Component; echo
––– output –––
- | Daemon | %{VERSION} #!/\s*/!#|
+ | Daemon | 0.0.0 a87203724@26012508 |
- | Columnar | columnar %{VERSION} #!/\s*/!#|
+ | Columnar | columnar 10.0.0 88c182b@26011113 |
- | Secondary | secondary %{VERSION} #!/\s*/!#|
+ | Secondary | secondary 10.0.0 88c182b@26011113 |
- | Knn | knn %{VERSION} #!/\s*/!#|
+ | Buddy | buddy v3.40.6-g8ef265 |
- | Embeddings | embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)\s*/!#|
- | Buddy | buddy %{VERSION} #!/\s*/!#|
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":%{NUMBER},"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{VERSION}"},{"Component":"Columnar","Version":"columnar %{VERSION}"},{"Component":"Secondary","Version":"secondary %{VERSION}"},{"Component":"Knn","Version":"knn %{VERSION}"},{"Component":"Embeddings","Version":"embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"},{"Component":"Buddy","Version":"buddy %{VERSION}"}]}]
+ [{"total":4,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"0.0.0 a87203724@26012508"},{"Component":"Columnar","Version":"columnar 10.0.0 88c182b@26011113"},{"Component":"Secondary","Version":"secondary 10.0.0 88c182b@26011113"},{"Component":"Buddy","Version":"buddy v3.40.6-g8ef265"}]}]
––– input –––
curl -s "http://localhost:9308/sql?mode=raw" -d "show version"; echo
––– output –––
- [{"total":%{NUMBER},"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{VERSION}"},{"Component":"Columnar","Version":"columnar %{VERSION}"},{"Component":"Secondary","Version":"secondary %{VERSION}"},{"Component":"Knn","Version":"knn %{VERSION}"},{"Component":"Embeddings","Version":"embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"},{"Component":"Buddy","Version":"buddy %{VERSION}"}]}]
+ [{"total":4,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"0.0.0 a87203724@26012508"},{"Component":"Columnar","Version":"columnar 10.0.0 88c182b@26011113"},{"Component":"Secondary","Version":"secondary 10.0.0 88c182b@26011113"},{"Component":"Buddy","Version":"buddy v3.40.6-g8ef265"}]}]test/clt-tests/http-interface/test-distributed-inserts.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd ${SEARCHD_ARGS:-} > /dev/null
––– output –––
OK
––– 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 –––
OK
––– input –––
apt-get install -y jq > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test2;"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE test2 (
id BIGINT,
model TEXT,
storage_capacity INTEGER,
color STRING,
release_year INTEGER,
price FLOAT,
discounted_price FLOAT,
sold BOOL,
date_added TIMESTAMP,
product_codes MULTI,
values MULTI64,
additional_info JSON,
vector FLOAT_VECTOR
knn_type='hnsw'
knn_dims='4'
hnsw_similarity='l2'
) shards='3' rf='1';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -P9306 -h0 -e "show tables;"
––– output –––
- +-------+-------------+
- | Table | Type |
- +-------+-------------+
- | test2 | distributed |
- +-------+-------------+
––– input –––
mysql -P9306 -h0 -e "DESCRIBE test2;"
––– output –––
- +------------------+--------------+----------------+
+ ERROR 1064 (42000) at line 1: no such table 'test2'
- | Field | Type | Properties |
- +------------------+--------------+----------------+
- | id | bigint | |
- | model | text | indexed stored |
- | storage_capacity | uint | |
- | color | string | |
- | release_year | uint | |
- | price | float | |
- | discounted_price | float | |
- | sold | bool | |
- | date_added | timestamp | |
- | product_codes | mva | |
- | values | mva64 | |
- | additional_info | json | |
- | vector | float_vector | knn |
- +------------------+--------------+----------------+
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
"table": "test2",
"id": 1,
"doc": {
"model": "iPhone 13 Pro",
"storage_capacity": 256,
"color": "silver",
"release_year": 2021,
"price": 1099.99,
"discounted_price": 989.99,
"sold": 1,
"date_added": 1591362342000,
"product_codes": [1,2,3],
"values": [523456764345678976,98765409877866654098,1109876543450987650987],
"additional_info": {"features": ["ProMotion display", "A15 Bionic chip", "Ceramic Shield front cover"]},
"vector": [0.773448,0.312478,0.137971,0.459821]
}
}' | jq '.created'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
"table": "test2",
"id": 2,
"doc": {
"model": "Galaxy S21 Ultra",
"storage_capacity": 128,
"color": "black",
"release_year": 2021,
"price": 1199.99,
"discounted_price": 1099.99,
"sold": 1,
"date_added": 1609459200000,
"product_codes": [4,5,6],
"values": [1234567890123456789,9876543210987654321],
"additional_info": {"features": ["Dynamic AMOLED 2X", "Exynos 2100", "108MP camera"]},
"vector": [0.5,0.4,0.3,0.2]
}
}' | jq '.created'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
"table": "test2",
"id": 3,
"doc": {
"model": "Pixel 6",
"storage_capacity": 128,
"color": "white",
"release_year": 2021,
"price": 599.99,
"discounted_price": 549.99,
"sold": false,
"date_added": 1630454400000,
"product_codes": [7,8,9],
"values": [987654321987654321,123456789123456789],
"additional_info": {"features": ["Smooth display", "Google Tensor chip", "AI-powered camera"]},
"vector": [0.8,0.6,0.4,0.2]
}
}' | jq '.created'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+--------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+--------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------+
- | 1 | iPhone 13 Pro | 256 | silver | 2021 | 1099.989990 | 989.989990 | 1 | 2224442480 | 1,2,3 | 523456764345678976 | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | 0.773448,0.312478,0.137971,0.459821 |
+ | 1 | iPhone 13 Pro | silver | 256 | 2021 | 1099.989990 | 989.989990 | 1 | 1591362342000 | 1,2,3 | [523456764345678976,98765409877866659840.000000,1109876543450987626496.000000] | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | [0.773448,0.312478,0.137971,0.459821] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1199.989990 | 1099.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ | 3 | Pixel 6 | white | 128 | 2021 | 599.989990 | 549.989990 | 0 | 1630454400000 | 7,8,9 | [987654321987654321,123456789123456789] | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+--------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/replace -d '{
"table": "test2",
"id": 1,
"doc": {
"model": "Updated Model",
"storage_capacity": 512,
"color": "black",
"release_year": 2022,
"price": 1399.99,
"discounted_price": 1299.99,
"sold": false,
"date_added": 1630454400000,
"product_codes": [10,11,12],
"values": [987654321987654321,123456789123456789],
"additional_info": {"features": ["New feature 1","New feature 2"]},
"vector": [0.7,0.8,0.9,1.0]
}
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1199.989990 | 1099.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ | 3 | Pixel 6 | white | 128 | 2021 | 599.989990 | 549.989990 | 0 | 1630454400000 | 7,8,9 | [987654321987654321,123456789123456789] | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/update -d '{
"table": "test2",
"id": 2,
"doc": {
"price": 1099.99,
"discounted_price": 999.99
}
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1099.989990 | 999.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ | 3 | Pixel 6 | white | 128 | 2021 | 599.989990 | 549.989990 | 0 | 1630454400000 | 7,8,9 | [987654321987654321,123456789123456789] | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/update -d '{
"table": "test2",
"id": 2,
"doc": {
"price": 1099.99,
"discounted_price": 999.99
}
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1099.989990 | 999.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ | 3 | Pixel 6 | white | 128 | 2021 | 599.989990 | 549.989990 | 0 | 1630454400000 | 7,8,9 | [987654321987654321,123456789123456789] | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/delete -d '{
"table": "test2",
"id": 3
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1099.989990 | 999.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/delete -d '{
"table": "test2",
"id": 3
}' | jq '.result'
––– output –––
OK
––– input –––
bulk_insert=$(mktemp); echo -e '{ "index": { "_index": "test2", "_id": 4 } }\n{ "id": 4, "model": "iPhone 14", "storage_capacity": 256, "color": "black", "release_year": 2022, "price": 999.99, "discounted_price": 899.99, "sold": 1, "date_added": 1661990400, "product_codes": [19, 20, 21], "values": [1234567890123456789, 9876543210987654321], "additional_info": { "features": ["A16 Bionic", "Dynamic Island"] }, "vector": [0.1, 0.2, 0.3, 0.4] }\n{ "index": { "_index": "test2", "_id": 5 } }\n{ "id": 5, "model": "Pixel 7", "storage_capacity": 128, "color": "white", "release_year": 2022, "price": 699.99, "discounted_price": 649.99, "sold": 0, "date_added": 1661990400, "product_codes": [16, 17, 18], "values": [223344556677889900, 998877665544332211], "additional_info": { "features": ["Tensor G2", "120Hz display"] }, "vector": [0.4, 0.5, 0.6, 0.7] }' > "$bulk_insert"
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_insert" http://localhost:9308/_bulk | jq '.items[] | {index: .index.result, id: .index._id}'
––– output –––
{
"index": "created",
- "id": 4
+ "id": "4"
}
{
"index": "created",
- "id": 5
+ "id": "5"
}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1099.989990 | 999.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 4 | iPhone 14 | black | 256 | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | [1234567890123456789,9876543210987655168.000000] | {"features":["A16 Bionic","Dynamic Island"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 5 | Pixel 7 | 128 | white | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]} | 0.400000,0.500000,0.600000,0.700000 |
+ | 5 | Pixel 7 | white | 128 | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | [223344556677889900,998877665544332211] | {"features":["Tensor G2","120Hz display"]} | [0.400000,0.500000,0.600000,0.700000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
bulk_insert=$(mktemp); echo -e '{"index":{"_index":"test2","_id":6}}\n{"id":6,"model":"OnePlus 10","storage_capacity":256,"color":"blue","release_year":2022,"price":899.99,"discounted_price":849.99,"sold":0,"date_added":1661990400,"product_codes":[22,23,24],"values":[111222333444555666,777888999000111222],"additional_info":{"features":["Snapdragon 8","OxygenOS"]},"vector":[0.2,0.3,0.4,0.5]}\n{"index":{"_index":"test2","_id":7}}\n{"id":7,"model":"Xiaomi 12","storage_capacity":128,"color":"gray","release_year":2022,"price":799.99,"discounted_price":749.99,"sold":1,"date_added":1661990400,"product_codes":[25,26,27],"values":[333444555666777888,999000111222333444],"additional_info":{"features":["MIUI 13","5G"]},"vector":[0.3,0.4,0.5,0.6]}' > "$bulk_insert"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_insert" http://localhost:9308/_bulk | jq '.items[] | {index: .index.result, id: .index._id}'
––– output –––
{
"index": "created",
- "id": 6
+ "id": "6"
}
{
"index": "created",
- "id": 7
+ "id": "7"
}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1099.989990 | 999.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 4 | iPhone 14 | black | 256 | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | [1234567890123456789,9876543210987655168.000000] | {"features":["A16 Bionic","Dynamic Island"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 5 | Pixel 7 | 128 | white | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]} | 0.400000,0.500000,0.600000,0.700000 |
+ | 5 | Pixel 7 | white | 128 | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | [223344556677889900,998877665544332211] | {"features":["Tensor G2","120Hz display"]} | [0.400000,0.500000,0.600000,0.700000] |
- | 6 | OnePlus 10 | 256 | blue | 2022 | 899.989990 | 849.989990 | 0 | 1661990400 | 22,23,24 | 111222333444555666,777888999000111222 | {"features":["Snapdragon 8","OxygenOS"]} | 0.200000,0.300000,0.400000,0.500000 |
+ | 6 | OnePlus 10 | blue | 256 | 2022 | 899.989990 | 849.989990 | 0 | 1661990400 | 22,23,24 | [111222333444555666,777888999000111222] | {"features":["Snapdragon 8","OxygenOS"]} | [0.200000,0.300000,0.400000,0.500000] |
- | 7 | Xiaomi 12 | 128 | gray | 2022 | 799.989990 | 749.989990 | 1 | 1661990400 | 25,26,27 | 333444555666777888,999000111222333444 | {"features":["MIUI 13","5G"]} | 0.300000,0.400000,0.500000,0.600000 |
+ | 7 | Xiaomi 12 | gray | 128 | 2022 | 799.989990 | 749.989990 | 1 | 1661990400 | 25,26,27 | [333444555666777888,999000111222333444] | {"features":["MIUI 13","5G"]} | [0.300000,0.400000,0.500000,0.600000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
bulk_update=$(mktemp); echo -e '{"update":{"_index":"test2","_id":6}}\n{"doc":{"price": 799.99, "discounted_price": 749.99}}\n{"update":{"_index":"test2","_id":7}}\n{"doc":{"price": 699.99, "discounted_price": 649.99}}' > "$bulk_update"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_update" http://localhost:9308/_bulk | jq '.items[] | {update: .update.result, id: .update._id}'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ | 2 | Galaxy S21 Ultra | black | 128 | 2021 | 1099.989990 | 999.989990 | 1 | 1609459200000 | 4,5,6 | [1234567890123456789,9876543210987655168.000000] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 4 | iPhone 14 | black | 256 | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | [1234567890123456789,9876543210987655168.000000] | {"features":["A16 Bionic","Dynamic Island"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 5 | Pixel 7 | 128 | white | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]} | 0.400000,0.500000,0.600000,0.700000 |
+ | 5 | Pixel 7 | white | 128 | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | [223344556677889900,998877665544332211] | {"features":["Tensor G2","120Hz display"]} | [0.400000,0.500000,0.600000,0.700000] |
- | 6 | OnePlus 10 | 256 | blue | 2022 | 799.989990 | 749.989990 | 0 | 1661990400 | 22,23,24 | 111222333444555666,777888999000111222 | {"features":["Snapdragon 8","OxygenOS"]} | 0.200000,0.300000,0.400000,0.500000 |
+ | 6 | OnePlus 10 | blue | 256 | 2022 | 799.989990 | 749.989990 | 0 | 1661990400 | 22,23,24 | [111222333444555666,777888999000111222] | {"features":["Snapdragon 8","OxygenOS"]} | [0.200000,0.300000,0.400000,0.500000] |
- | 7 | Xiaomi 12 | 128 | gray | 2022 | 699.989990 | 649.989990 | 1 | 1661990400 | 25,26,27 | 333444555666777888,999000111222333444 | {"features":["MIUI 13","5G"]} | 0.300000,0.400000,0.500000,0.600000 |
+ | 7 | Xiaomi 12 | gray | 128 | 2022 | 699.989990 | 649.989990 | 1 | 1661990400 | 25,26,27 | [333444555666777888,999000111222333444] | {"features":["MIUI 13","5G"]} | [0.300000,0.400000,0.500000,0.600000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
bulk_delete=$(mktemp); echo -e '{"delete":{"_index":"test2","_id":2}}\n{"delete":{"_index":"test2","_id":3}}' > "$bulk_delete"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_delete" http://localhost:9308/_bulk | jq '.items[] | {delete: .delete.result, id: .delete._id}'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+---------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+------------------------------------------------+-------------------------------------+
+ +------+---------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+------------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+---------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+------------------------------------------------+-------------------------------------+
+ +------+---------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+------------------------------------------------+---------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ | 1 | Updated Model | black | 512 | 2022 | 1399.989990 | 1299.989990 | 0 | 1630454400000 | 10,11,12 | [987654321987654321,123456789123456789] | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1] |
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 4 | iPhone 14 | black | 256 | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | [1234567890123456789,9876543210987655168.000000] | {"features":["A16 Bionic","Dynamic Island"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 5 | Pixel 7 | 128 | white | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]} | 0.400000,0.500000,0.600000,0.700000 |
+ | 5 | Pixel 7 | white | 128 | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | [223344556677889900,998877665544332211] | {"features":["Tensor G2","120Hz display"]} | [0.400000,0.500000,0.600000,0.700000] |
- | 6 | OnePlus 10 | 256 | blue | 2022 | 799.989990 | 749.989990 | 0 | 1661990400 | 22,23,24 | 111222333444555666,777888999000111222 | {"features":["Snapdragon 8","OxygenOS"]} | 0.200000,0.300000,0.400000,0.500000 |
+ | 6 | OnePlus 10 | blue | 256 | 2022 | 799.989990 | 749.989990 | 0 | 1661990400 | 22,23,24 | [111222333444555666,777888999000111222] | {"features":["Snapdragon 8","OxygenOS"]} | [0.200000,0.300000,0.400000,0.500000] |
- | 7 | Xiaomi 12 | 128 | gray | 2022 | 699.989990 | 649.989990 | 1 | 1661990400 | 25,26,27 | 333444555666777888,999000111222333444 | {"features":["MIUI 13","5G"]} | 0.300000,0.400000,0.500000,0.600000 |
+ | 7 | Xiaomi 12 | gray | 128 | 2022 | 699.989990 | 649.989990 | 1 | 1661990400 | 25,26,27 | [333444555666777888,999000111222333444] | {"features":["MIUI 13","5G"]} | [0.300000,0.400000,0.500000,0.600000] |
- +------+---------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+------------------------------------------------+-------------------------------------+
+ +------+---------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------+------------------------------------------------+---------------------------------------+
––– input –––
bulk_ops=$(mktemp); echo -e '{"delete":{"_index":"test2","_id":1}}\n{"index":{"_index":"test2","_id":2}}\n{"model":"C","storage_capacity":256,"color":"black","release_year":2023,"price":799.99,"discounted_price":749.99,"sold":0,"date_added":1672531200,"product_codes":[10,11,12],"values":[1234567890123456789,9876543210987654321],"additional_info":{"features":["Feature A","Feature B"]},"vector":[0.5,0.6,0.7,0.8]}\n{"index":{"_index":"test2","_id":17}}\n{"model":"Updated B","storage_capacity":128,"color":"blue","release_year":2024,"price":899.99,"discounted_price":849.99,"sold":1,"date_added":1672531200,"product_codes":[40,41,42],"values":[222222222222222222,333333333333333333],"additional_info":{"features":["Feature X","Feature Y"]},"vector":[0.1,0.2,0.3,0.4]}\n{"update":{"_index":"test2","_id":6}}\n{"doc":{"price":749.99,"discounted_price":699.99}}' > "$bulk_ops"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_ops" http://localhost:9308/_bulk | jq -c '.items[] | {operation: (to_entries | .[0].key), result: (.[].result?), id: (.[]._id?), status: (.[].status?), error: (.[].error?)}'
––– output –––
- {"operation":"delete","result":"deleted","id":1,"status":201,"error":null}
+ {"operation":"delete","result":"deleted","id":"1","status":201,"error":null}
- {"operation":"index","result":"created","id":2,"status":201,"error":null}
+ {"operation":"index","result":"created","id":"2","status":201,"error":null}
- {"operation":"index","result":"created","id":17,"status":201,"error":null}
+ {"operation":"index","result":"created","id":"17","status":201,"error":null}
- {"operation":"update","result":"updated","id":6,"status":201,"error":null}
+ {"operation":"update","result":"updated","id":"6","status":201,"error":null}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 WHERE id = 4;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+--------------------------------------------------+----------------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+--------------------------------------------------+----------------------------------------------+---------------------------------------+
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 4 | iPhone 14 | black | 256 | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | [1234567890123456789,9876543210987655168.000000] | {"features":["A16 Bionic","Dynamic Island"]} | [0.100000,0.200000,0.300000,0.400000] |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+--------------------------------------------------+----------------------------------------------+---------------------------------------+
––– input –––
mysql -h0 -P9306 -e "DELETE FROM test2 WHERE id BETWEEN 11 AND 20;"; echo $?
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
"table": "test2",
"id": 4,
"doc": {
"model": "Updated iPhone 14",
"storage_capacity": 512,
"color": "black",
"release_year": 2022,
"price": 1299.99,
"discounted_price": 1199.99,
"sold": 1,
"date_added": 1661990400,
"product_codes": [19,20,21],
"values": [1234567890123456789,9876543210987654321],
"additional_info": {"features": ["A16 Bionic","Dynamic Island","Improved camera"]},
"vector": [0.1,0.2,0.3,0.4]
}
}' | jq -e '.error' && echo "Duplicate ID test passed!" || echo "Duplicate ID test failed!"
––– output –––
{
"type": "action_request_validation_exception",
"reason": "duplicate id '4'",
- "table": "system.test2_s2",
+ "table": "test2"
- "index": "test2"
+ }
- }
+ Duplicate ID test passed!
- Duplicate ID test passed!
––– input –––
(for i in {1..10}; do curl -s -X POST http://localhost:9308/insert -d '{
"table": "test2",
"id": '$((10 + i))',
"doc": {
"model": "Device '$i'",
"storage_capacity": 64,
"color": "black",
"release_year": 2023,
"price": 499.99,
"discounted_price": 449.99,
"sold": "0",
"date_added": 1672531200,
"product_codes": [1,2,3],
"values": [1234567890123456789,9876543210987654321],
"additional_info": {"features": ["Feature 1","Feature 2"]},
"vector": [0.1,0.2,0.3,0.4]
}
}' & done; wait) | jq -s 'map(select(.created == true)) | length == 10' > /dev/null && echo "Parallel insert test passed!" || echo "Parallel insert test failed!"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 WHERE id BETWEEN 11 AND 20;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+--------------------------------------------------+----------------------------------------+---------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | storage_capacity | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+--------------------------------------------------+----------------------------------------+---------------------------------------+
- | 12 | Device 2 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 15 | Device 5 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 13 | Device 3 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 12 | Device 2 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 14 | Device 4 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 17 | Device 7 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 15 | Device 5 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 20 | Device 10 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 16 | Device 6 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 11 | Device 1 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 17 | Device 7 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 16 | Device 6 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 18 | Device 8 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 18 | Device 8 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 19 | Device 9 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 14 | Device 4 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 20 | Device 10 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 19 | Device 9 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- | 11 | Device 1 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ | 13 | Device 3 | black | 64 | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | [1234567890123456789,9876543210987655168.000000] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+--------------------------------------------------+----------------------------------------+---------------------------------------+test/clt-tests/http-interface/test-inserts.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd ${SEARCHD_ARGS:-} > /dev/null
––– output –––
OK
––– 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 –––
OK
––– input –––
apt-get install -y jq > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test1;"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE test1 (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: error adding table 'test1': knn library not loaded
+ 1
––– input –––
mysql -h0 -P9306 -e "INSERT INTO test1 VALUES (1, 'iPhone 13 Pro', 256, 'silver', 2021, 1099.99, 989.99, 1, '1591362342000', (1,2,3), (523456764345678976, 98765409877866654098, 1109876543450987650987), '{\"features\": [\"ProMotion display\", \"A15 Bionic chip\", \"Ceramic Shield front cover\"]}', (0.773448, 0.312478, 0.137971, 0.459821));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ 1
––– input –––
mysql -h0 -P9306 -e "INSERT INTO test1 VALUES (2, 'Galaxy S21 Ultra', 128, 'black', 2021, 1199.99, 1099.99, 0, '1609459200000', (4,5,6), (1234567890123456789, 9876543210987654321), '{\"features\": [\"Dynamic AMOLED 2X\", \"Exynos 2100\", \"108MP camera\"]}', (0.5, 0.4, 0.3, 0.2));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ 1
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{"table": "test1", "id": 3, "doc": {"model": "Pixel 6", "storage_capacity": 128, "color": "white", "release_year": 2021, "price": 599.99, "discounted_price": 549.99, "sold": false, "date_added": 1630454400000, "product_codes": [7, 8, 9], "values": [987654321987654321, 123456789123456789], "additional_info": {"features": ["Smooth display", "Google Tensor chip", "AI-powered camera"]}, "vector": [0.8, 0.6, 0.4, 0.2]}}' | jq '.created == true'
––– output –––
- true
+ false
––– input –––
mysql -P9306 -h0 -e "SHOW TABLES LIKE 't_s%';"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "select * from test1;"
––– output –––
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 0 | 3141431296 | 4,5,6 | 1234567890123456789,9223372036854775807 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
- | 1 | iPhone 13 Pro | 256 | silver | 2021 | 1099.989990 | 989.989990 | 1 | 2224442480 | 1,2,3 | 523456764345678976,9223372036854775807 | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | 0.773448,0.312478,0.137971,0.459821 |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/replace -d '{"table": "test1", "id": 1, "doc": {"model": "iPhone 13 Pro Max", "storage_capacity": 512, "color": "gold", "release_year": 2021, "price": 1299.99, "discounted_price": 1199.99, "sold": true, "date_added": 1591362342000, "product_codes": [7, 8, 9], "values": [1234567890123456789, 9876543210987654321], "additional_info": {"features": ["ProMotion display", "A15 Bionic chip", "Improved battery life"]}, "vector": [0.9, 0.8, 0.7, 0.6]}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -P9306 -h0 -e "select * from test1;"
––– output –––
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+------------------------------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+------------------------------------------------------------------------------+-------------------------------------+
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
- | 1 | iPhone 13 Pro Max | 512 | gold | 2021 | 1299.989990 | 1199.989990 | 1 | 2224442480 | 7,8,9 | 1234567890123456789 | {"features":["ProMotion display","A15 Bionic chip","Improved battery life"]} | 0.900000,0.800000,0.700000,0.600000 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 0 | 3141431296 | 4,5,6 | 1234567890123456789,9223372036854775807 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+------------------------------------------------------------------------------+-------------------------------------+
––– input –––
echo -e '{"index":{"_index":"test1","_id":4}}\n{"id":4,"model":"iPhone 14","storage_capacity":256,"color":"black","release_year":2022,"price":999.99,"discounted_price":899.99,"sold":1,"date_added":1661990400,"product_codes":[19,20,21],"values":[1234567890123456789,9876543210987654321],"additional_info":{"features":["A16 Bionic","Dynamic Island"]},"vector":[0.1,0.2,0.3,0.4]}\n{"index":{"_index":"test1","_id":5}}\n{"id":5,"model":"Pixel 7","storage_capacity":128,"color":"white","release_year":2022,"price":699.99,"discounted_price":649.99,"sold":0,"date_added":1661990400,"product_codes":[16,17,18],"values":[223344556677889900,998877665544332211],"additional_info":{"features":["Tensor G2","120Hz display"]},"vector":[0.4,0.5,0.6,0.7]}' > bulk.json; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @bulk.json http://localhost:9308/_bulk | jq '.items[] | {index: .index.result, id: .index._id}'
––– output –––
{
- "index": "created",
+ "index": null,
- "id": "4"
+ "id": 4
}
{
- "index": "created",
+ "index": null,
- "id": "5"
+ "id": 5
}
––– input –––
mysql -P9306 -h0 -e "select * from test1;"
––– output –––
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+------------------------------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+------------------------------------------------------------------------------+-------------------------------------+
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 0 | 3141431296 | 4,5,6 | 1234567890123456789,9223372036854775807 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 1 | iPhone 13 Pro Max | 512 | gold | 2021 | 1299.989990 | 1199.989990 | 1 | 2224442480 | 7,8,9 | 1234567890123456789 | {"features":["ProMotion display","A15 Bionic chip","Improved battery life"]} | 0.900000,0.800000,0.700000,0.600000 |
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
- | 5 | Pixel 7 | 128 | white | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]} | 0.400000,0.500000,0.600000,0.700000 |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+------------------------------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/delete -d '{"table": "test1", "id": 1}' | jq '.result'
––– output –––
- "deleted"
+ "not found"
––– input –––
mysql -P9306 -h0 -e "select * from test1;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 0 | 3141431296 | 4,5,6 | 1234567890123456789,9223372036854775807 | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 4 | iPhone 14 | 256 | black | 2022 | 999.989990 | 899.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
- | 5 | Pixel 7 | 128 | white | 2022 | 699.989990 | 649.989990 | 0 | 1661990400 | 16,17,18 | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]} | 0.400000,0.500000,0.600000,0.700000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
––– input –––
mysql -P9306 -h0 -e "DROP TABLE test1;"; echo $?
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "show tables;"; echo $?
––– output –––
OKtest/clt-tests/http-interface/sql-mode-raw-endpoint.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT, value_attr STRING) min_infix_len = '3' min_prefix_len = '3'; INSERT INTO t VALUES (1, 'example', 'example'), (2, 'test', 'test');"
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "show version" | jq '.[0].data'
––– output –––
[
{
"Component": "Daemon",
"Version": "%{VERSION}"
},
{
"Component": "Columnar",
"Version": "columnar %{VERSION}"
},
{
"Component": "Secondary",
"Version": "secondary %{VERSION}"
},
{
- "Component": "Knn",
+ "Component": "Buddy",
- "Version": "knn %{VERSION}"
+ "Version": "buddy v3.40.6-g8ef265"
- },
+ }
- {
+ ]
- "Component": "Embeddings",
- "Version": "embeddings %{VERSION}"
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "show buddy plugins" | jq '.[0].data | .[0:3] | .[] | {Plugin, Type, Info}'
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('exmaple') option fuzzy=1" | jq '.[0].data'
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "show fields from t" | jq '.[0].data'
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "create table t_copy like t" | jq '.[0] | {total, error, warning}'
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "show full tables" | jq '.[0].data'
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t limit 1" | jq '.[0].data'
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=select%20count(*)%20from%20t" | jq '.[0].data'
––– output –––
OKtest/clt-tests/http-interface/cli-json-endpoint.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT, value_attr STRING) min_infix_len = '3' min_prefix_len = '3'; INSERT INTO t VALUES (1, 'example', 'example'), (2, 'test', 'test');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json?show%20version"
––– output –––
- [{"total":%{NUMBER},"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{VERSION}"},{"Component":"Columnar","Version":"columnar %{VERSION}"},{"Component":"Secondary","Version":"secondary %{VERSION}"},{"Component":"Knn","Version":"knn %{VERSION}"},{"Component":"Embeddings","Version":"embeddings %{VERSION}"},{"Component":"Buddy","Version":"buddy %{VERSION}"}]}]
+ [{"total":4,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"0.0.0 a87203724@26012508"},{"Component":"Columnar","Version":"columnar 10.0.0 88c182b@26011113"},{"Component":"Secondary","Version":"secondary 10.0.0 88c182b@26011113"},{"Component":"Buddy","Version":"buddy v3.40.6-g8ef265"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json?show%20buddy%20plugins"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json?select%20*%20from%20t%20where%20match('exmaple')%20option%20fuzzy=1"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json?show%20fields%20from%20t"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json?create%20table%20t_copy2%20like%20t"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json?select%20*%20from%20t%20limit%201"
––– output –––
OKtest/clt-tests/http-interface/show-version-http.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | sed 's/ *|/|/g' | awk '!/row.*in set/'|grep -v "\-\-\-"|grep -v Component
––– output –––
| Daemon| %{VERSION}|
| Columnar| columnar %{VERSION}|
| Secondary| secondary %{VERSION}|
- | Knn| knn %{VERSION}|
+ | Buddy| buddy v3.40.6-g8ef265|
- | Embeddings| embeddings %{VERSION}|
- | Buddy| buddy %{VERSION}| |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/expected-errors/buddy-plugin-select.rec––– input –––
apt-get -y remove 'manticore-buddy' > /dev/null; echo $?
––– output –––
OK
––– input –––
stdbuf -oL searchd
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:22.461 2026] [35] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:22.491 2026] [35] using config file '/etc/manticoresearch/manticore.conf' (269 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
+ listening on 127.0.0.1:9308 for sphinx and http(s)
––– input –––
mysql -h0 -P9306 -e 'CREATE TABLE test (id BIGINT, name TEXT, date TIMESTAMP);'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM manticore.test;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM `manticore`.test;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM `Manticore`.test;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM information_schema.files;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM information_schema.tables;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM information_schema.triggers;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM information_schema.column_statistics;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT * FROM information_schema.columns;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE id = '1';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE id IN ('1');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COALESCE(name, '') = '' FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE CONTAINS(text_field, 'NEAR((word1, word2), 3)');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DISTINCT TABLE_SCHEMA from information_schema.TABLES;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE_ADD(DATE(date), INTERVAL (HOUR(date) * 60 * 60 + MINUTE(date) * 60 + SECOND(date)) SECOND) AS date FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE_ADD(DATE(date), INTERVAL (HOUR(date) * 60 * 60 + MINUTE(date) * 60 + SECOND(date)) SECOND) FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE_ADD(DATE(date), INTERVAL (HOUR(date)*60 + MINUTE(date)) MINUTE) AS date FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE_ADD(DATE(date), INTERVAL (HOUR(date)*60*60 + MINUTE(date)*60 + SECOND(date)) SECOND) FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE_ADD(DATE(date), INTERVAL HOUR(date) HOUR) AS date FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE_ADD(DATE(date), INTERVAL HOUR(date) HOUR) FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE(date) AS date FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT DATE(date) FROM test;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT DATE(DATE_SUB(date, INTERVAL DAYOFMONTH(date)-1 DAY)) AS date FROM test;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT DATE(DATE_SUB(date, INTERVAL DAYOFMONTH(date)-1 DAY)) FROM test;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT DATE(DATE_SUB(date, INTERVAL DAYOFYEAR(date)-1 DAY)) AS date FROM test;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SELECT DATE(DATE_SUB(date, INTERVAL DAYOFYEAR(date)-1 DAY)) FROM test;'
––– output –––
OKtest/clt-tests/expected-errors/buddy-plugin-backup.rec––– input –––
apt-get -y remove 'manticore-buddy' > /dev/null; echo $?
––– output –––
OK
––– input –––
stdbuf -oL searchd
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:16.972 2026] [35] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:17.002 2026] [35] using config file '/etc/manticoresearch/manticore.conf' (269 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
+ listening on 127.0.0.1:9308 for sphinx and http(s)
––– input –––
mysql -h0 -P9306 -e 'CREATE TABLE test (id BIGINT, name TEXT, date TIMESTAMP);'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'BACKUP TABLES users, posts TO '/backup/location';'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'BACKUP TABLES users, posts TO '/backup/location' OPTIONS compress=true, async=false;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'BACKUP TABLES TO '/backup/location' OPTIONS compress=true, async=false;'
––– output –––
OKtest/clt-tests/expected-errors/test-inconsistency-in-error-messages.rec––– input –––
echo -e 'common {\n\tplugin_dir = /usr/local/lib/manticore\n\tlemmatizer_base = /usr/share/manticore/morph/\n}\n\nsearchd {\n\tlisten = 9306:mysql41\n\tlisten = 9312\n\tlisten = 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_commands = 1\n\tbuddy_path =\n}\n' > manticore.conf
––– output –––
OK
––– input –––
stdbuf -oL searchd --config ./manticore.conf > /dev/null
––– output –––
OK
––– 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 –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists a; drop table if exists test; create table a (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');create table test type='distributed' local='a';"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 'a': knn library not loaded
––– input –––
for i in {1..100}; do response=$(curl -s -X POST http://localhost:9308/insert -d '{"table": "test", "id": 1, "doc": {"model": "iPhone 13 Pro", "storage_capacity": 256, "color": "silver", "release_year": 2021, "price": 1099.99, "discounted_price": 989.99, "sold": 1, "date_added": 1591362342000, "product_codes": [1,2,3], "values": [523456764345678976,98765409877866654098,1109876543450987650987], "additional_info": {"features": ["ProMotion display", "A15 Bionic chip", "Ceramic Shield front cover"]}, "vector": [0.773448,0.312478,0.137971,0.459821]}}'); if [[ "$response" != *'"error":{"type":"action_request_validation_exception","reason":"table '\''test'\'' does not support INSERT","table":"test"},"status":409'* ]]; then echo "Mismatch found at iteration $i: $response"; exit 1; fi; done; echo "All 100 requests returned the same error"
––– output –––
- All 100 requests returned the same error
+ Mismatch found at iteration 1: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 2: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 3: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 4: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 5: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 6: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 7: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 8: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 9: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 10: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 11: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 12: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 13: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 14: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 15: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 16: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 17: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 18: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 19: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 20: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 21: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 22: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 23: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 24: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 25: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 26: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 27: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 28: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 29: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 30: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 31: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 32: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 33: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 34: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 35: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 36: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 37: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 38: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 39: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 40: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 41: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 42: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 43: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 44: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 45: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 46: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 47: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 48: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 49: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 50: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 51: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 52: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 53: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 54: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 55: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 56: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 57: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 58: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 59: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 60: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 61: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 62: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 63: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 64: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 65: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 66: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 67: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 68: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 69: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 70: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 71: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 72: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 73: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 74: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 75: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 76: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 77: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 78: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 79: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 80: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 81: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 82: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 83: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 84: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 85: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 86: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 87: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 88: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 89: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 90: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 91: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 92: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 93: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 94: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 95: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 96: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 97: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 98: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 99: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ Mismatch found at iteration 100: {"error":{"type":"action_request_validation_exception","reason":"table 'test' absent","table":"test"},"status":409}
+ bash: line 13: exit: command not found
+ All 100 requests returned the same errortest/clt-tests/expected-errors/buddy-plugin-show.rec––– input –––
apt-get -y remove 'manticore-buddy' > /dev/null; echo $?
––– output –––
OK
––– input –––
stdbuf -oL searchd
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:26.831 2026] [35] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:26.861 2026] [35] using config file '/etc/manticoresearch/manticore.conf' (269 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
+ listening on 127.0.0.1:9308 for sphinx and http(s)
––– input –––
mysql -h0 -P9306 -e 'CREATE TABLE test (id BIGINT, name TEXT, date TIMESTAMP);'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SHOW QUERIES;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SHOW FULL TABLES;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SHOW SCHEMAS;'
––– output –––
OKtest/clt-tests/expected-errors/buddy-plugin-empty-string.rec––– input –––
apt-get -y remove 'manticore-buddy' > /dev/null; echo $?
––– output –––
OK
––– input –––
stdbuf -oL searchd
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:19.710 2026] [35] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:19.742 2026] [35] using config file '/etc/manticoresearch/manticore.conf' (269 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
+ listening on 127.0.0.1:9308 for sphinx and http(s)
––– input –––
mysql -h0 -P9306 -e 'CREATE TABLE test (id BIGINT, name TEXT, date TIMESTAMP);'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SET @saved_cs_client = @@character_set_client;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e 'SET character_set_client = utf8mb4;'
––– output –––
OK |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/buddy-plugins/test-enable-disable-buddy-plugin.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW QUERIES\G"|grep "1. row"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DISABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-show"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW QUERIES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ENABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-show"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW QUERIES\G"|grep "1. row"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "create table t (id bigint, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2')"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 't': knn library not loaded
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from t where knn ( image_vector, 5, 1 );"
––– output –––
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
––– input –––
mysql -h0 -P9306 -e "DISABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-knn"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from t where knn ( image_vector, 5, 1 );"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ENABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-knn"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from t where knn ( image_vector, 5, 1 );"
––– output –––
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search requesttest/clt-tests/buddy-plugins/test-skipping-plugin-loading.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW BUDDY PLUGINS\G;" | grep "manticoresoftware/buddy-plugin-replace"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS tbl;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE tbl (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 'tbl': knn library not loaded
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
- +-------+------+
- | Table | Type |
- +-------+------+
- | tbl | rt |
- +-------+------+
––– input –––
./test/clt-tests/scripts/generate-1mln-records.sh 1000
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 15 PRO' WHERE id = 101; SELECT * FROM tbl WHERE id = 101\G"
––– output –––
*************************** 1. row ***************************
id: 101
model: iPhone 15 PRO
- storage_capacity: 256
+ color: silver
- color: silver
+ sold: TRUE
- release_year: 2021
+ date_added: 1591362342000
- price: 1099.989990
+ storage_capacity: 256
- discounted_price: 989.989990
+ release_year: 2021
- sold: 1
+ price: 1099.989990
- date_added: 2224442480
+ discounted_price: 989.989990
product_codes: 1,2,3
- values: 523456764345678976,9223372036854775807
+ values: NULL
additional_info: {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]}
- vector: 0.773448,0.312478,0.137971,0.459821
+ vector: NULL
––– input –––
stdbuf -oL searchd --stopwait 2>&1 | grep -i 'SIGTERM'
––– output –––
OK
––– input –––
sed -i '/data_dir = \/var\/lib\/manticore/a\ buddy_path = manticore-executor -n /usr/share/manticore/modules/manticore-buddy/src/main.php --log-level=debugv --skip=manticoresoftware/buddy-plugin-replace' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99 WHERE id = 117; select * from tbl WHERE id = 117;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW BUDDY PLUGINS\G;" | grep "manticoresoftware/buddy-plugin-replace"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW BUDDY PLUGINS\G;" | grep "manticoresoftware/buddy-plugin-alter-rename-table"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2001(f text, s string); insert into index2001 values(01,'abc','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE index2001 RENAME new_index2001;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
stdbuf -oL searchd --stopwait 2>&1 | grep -i 'SIGTERM'
––– output –––
OK
––– input –––
sed -i '/buddy_path =/c\ buddy_path = manticore-executor -n /usr/share/manticore/modules/manticore-buddy/src/main.php --log-level=debugv --skip=manticoresoftware/buddy-plugin-alter-rename-table --skip=manticoresoftware/buddy-plugin-replace' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW BUDDY PLUGINS\G;" | grep "manticoresoftware/buddy-plugin-alter-rename-table"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE new_index2001 RENAME new_index2002;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
stdbuf -oL searchd --stopwait 2>&1 | grep -i 'SIGTERM'
––– output –––
OK
––– input –––
sed -i '/buddy_path =/c\ buddy_path = manticore-executor -n /usr/share/manticore/modules/manticore-buddy/src/main.php --log-level=debugv' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW BUDDY PLUGINS\G;" | grep "manticoresoftware/buddy-plugin-alter-rename-table"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE new_index2001 RENAME new_index2002;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OKtest/clt-tests/buddy-plugins/test-prometheus-exporter.rec––– input –––
export SEARCHD_FLAGS="--iostats --cpustats"
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
curl -s 0:9308/metrics > /tmp/exporter_unfiltered_output.txt
––– output –––
OK
––– input –––
cat /tmp/exporter_unfiltered_output.txt | grep -e "^manticore" | cut -d" " -f1 | sed 's/^manticore_//' | sed 's/qcache_thresh_microseconds/qcache_thresh_msec/' | sort > /tmp/exporter_output.txt
––– output –––
OK
––– input –––
searchd --iostats --cpustats --status | cut -d":" -f1 | tail -n +10 | sort > /tmp/searchd_output.txt
––– output –––
OK
––– input –––
ls -1 /tmp
––– output –––
OK
––– input –––
cat /tmp/exporter_unfiltered_output.txt | grep "Warning"
––– output –––
OK
––– input –––
while read -r line; do grep -q "^$line" /tmp/exporter_output.txt || echo "$line"; done < /tmp/searchd_output.txt
––– output –––
+ --------------
––– input –––
echo "new-option" >> /tmp/searchd_output.txt
––– output –––
OK
––– input –––
while read -r line; do grep -q "^$line" /tmp/exporter_output.txt || echo "$line"; done < /tmp/searchd_output.txt
––– output –––
- new-option
+ --------------
+ new-optiontest/clt-tests/buddy-plugins/test-inconsistent-comunication-with-buddy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW TABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20TABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW TABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20TABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW META"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20META"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW META"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20META"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
[
{
"total": %{NUMBER},
"error": "",
"warning": "",
"columns": [
{
"Component": {
"type": "string"
}
},
{
"Version": {
"type": "string"
}
}
],
"data": [
{
"Component": "Daemon",
"Version": "%{VERSION}"
},
{
"Component": "Columnar",
"Version": "columnar %{VERSION}"
},
{
"Component": "Secondary",
"Version": "secondary %{VERSION}"
},
{
- "Component": "Knn",
+ "Component": "Buddy",
- "Version": "knn %{VERSION}"
+ "Version": "buddy v3.40.6-g8ef265"
- },
+ }
- {
+ ]
- "Component": "Embeddings",
+ }
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
+ ]
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
[
{
"total": %{NUMBER},
"error": "",
"warning": "",
"columns": [
{
"Component": {
"type": "string"
}
},
{
"Version": {
"type": "string"
}
}
],
"data": [
{
"Component": "Daemon",
"Version": "%{VERSION}"
},
{
"Component": "Columnar",
"Version": "columnar %{VERSION}"
},
{
"Component": "Secondary",
"Version": "secondary %{VERSION}"
},
{
- "Component": "Knn",
+ "Component": "Buddy",
- "Version": "knn %{VERSION}"
+ "Version": "buddy v3.40.6-g8ef265"
- },
+ }
- {
+ ]
- "Component": "Embeddings",
+ }
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
+ ]
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
[
{
"total": %{NUMBER},
"error": "",
"warning": "",
"columns": [
{
"Component": {
"type": "string"
}
},
{
"Version": {
"type": "string"
}
}
],
"data": [
{
"Component": "Daemon",
"Version": "%{VERSION}"
},
{
"Component": "Columnar",
"Version": "columnar %{VERSION}"
},
{
"Component": "Secondary",
"Version": "secondary %{VERSION}"
},
{
- "Component": "Knn",
+ "Component": "Buddy",
- "Version": "knn %{VERSION}"
+ "Version": "buddy v3.40.6-g8ef265"
- },
+ }
- {
+ ]
- "Component": "Embeddings",
+ }
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
+ ]
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
[
{
"total": %{NUMBER},
"error": "",
"warning": "",
"columns": [
{
"Component": {
"type": "string"
}
},
{
"Version": {
"type": "string"
}
}
],
"data": [
{
"Component": "Daemon",
"Version": "%{VERSION}"
},
{
"Component": "Columnar",
"Version": "columnar %{VERSION}"
},
{
"Component": "Secondary",
"Version": "secondary %{VERSION}"
},
{
- "Component": "Knn",
+ "Component": "Buddy",
- "Version": "knn %{VERSION}"
+ "Version": "buddy v3.40.6-g8ef265"
- },
+ }
- {
+ ]
- "Component": "Embeddings",
+ }
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
+ ]
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ] |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI:
test/clt-tests/data-manipulation/test-replace-into.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd ${SEARCHD_ARGS:-} > /dev/null
––– output –––
OK
––– 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 –––
OK
––– input –––
mysql -v -h0 -P9306 -e "SHOW TABLES; DROP TABLE IF EXISTS tbl; SHOW TABLES; CREATE TABLE tbl (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');"
––– output –––
--------------
SHOW TABLES
--------------
--------------
DROP TABLE IF EXISTS tbl
--------------
--------------
SHOW TABLES
--------------
--------------
CREATE TABLE tbl (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2')
--------------
+ ERROR 1064 (42000) at line 1: error adding table 'tbl': knn library not loaded
––– input –––
chmod +x ./test/clt-tests/scripts/generate-1mln-records.sh
––– output –––
OK
––– input –––
total_iterations=20000 ./test/clt-tests/scripts/generate-1mln-records.sh
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 15 PRO' WHERE id = 101; select * from tbl WHERE id = 101;"
––– output –––
- +------+---------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------+--------+------+---------------+------------------+--------------+-------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+---------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------+--------+------+---------------+------------------+--------------+-------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | 101 | iPhone 15 PRO | 256 | silver | 2021 | 1099.989990 | 989.989990 | 1 | 2224442480 | 1,2,3 | 523456764345678976,9223372036854775807 | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | 0.773448,0.312478,0.137971,0.459821 |
+ | 101 | iPhone 15 PRO | silver | TRUE | 1591362342000 | 256 | 2021 | 1099.989990 | 989.989990 | 1,2,3 | NULL | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | NULL |
- +------+---------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------+--------+------+---------------+------------------+--------------+-------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET values = (623456764345678976, 9223372036854775807) WHERE id = 120; select * from tbl WHERE id = 120;"
––– output –––
- +------+---------+------------------+-------------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------+-------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+---------+------------------+-------------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------+-------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | 120 | LG Wing | 256 | aurora gray | 2020 | 999.989990 | 899.989990 | 1 | 1496660080 | 57,58,59 | 623456764345678976,9223372036854775807 | {"features":["Qualcomm Snapdragon 765G","Swivel display","Triple-camera system"]} | 0.863448,0.402478,0.227971,0.549821 |
+ | 120 | LG Wing | aurora gray | TRUE | 1698008742000 | 256 | 2020 | 999.989990 | 899.989990 | 57,58,59 | NULL | {"features":["Qualcomm Snapdragon 765G","Swivel display","Triple-camera system"]} | NULL |
- +------+---------+------------------+-------------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------+-------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET product_codes = (53,45,77), values = (92233777368548,92233720368548) WHERE id = 119; select * from tbl WHERE id = 119;"
––– output –––
- +------+---------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+---------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | 119 | BlackBerry Evolve X | 64 | black | 2018 | 599.989990 | 499.989990 | 0 | 3697138672 | 45,53,77 | 92233720368548,92233777368548 | {"features":["Qualcomm Snapdragon 660","5.99-inch display","Dual-camera system"]} | 0.051106,0.948278,0.291892,0.104594 |
+ | 119 | BlackBerry Evolve X | black | FALSE | 1691619286000 | 64 | 2018 | 599.989990 | 499.989990 | 45,53,77 | NULL | {"features":["Qualcomm Snapdragon 660","5.99-inch display","Dual-camera system"]} | NULL |
- +------+---------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99 WHERE id = 117; select * from tbl WHERE id = 117;"
––– output –––
- +------+----------------------+------------------+---------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+ +------+----------------------+---------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+--------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+----------------------+------------------+---------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+ +------+----------------------+---------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+--------------------------------------------------------------------------------+--------+
- | 117 | Motorola Edge 20 Pro | 256 | midnight blue | 2021 | 15000.990234 | 599.989990 | 0 | 1501096560 | 48,49,50 | 1123456764345678976,9223372036854775807 | {"features":["Qualcomm Snapdragon 870","OLED display","Triple-camera system"]} | 0.041106,0.938278,0.281892,0.094594 |
+ | 117 | Motorola Edge 20 Pro | midnight blue | FALSE | 1676538342000 | 256 | 2021 | 15000.990234 | 599.989990 | 48,49,50 | NULL | {"features":["Qualcomm Snapdragon 870","OLED display","Triple-camera system"]} | NULL |
- +------+----------------------+------------------+---------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+ +------+----------------------+---------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+--------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99, discounted_price =445.88 WHERE id = 330; select * from tbl WHERE id = 330;"
––– output –––
- +------+------------------------------+------------------+------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+---------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------------------+------------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+---------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+------------------------------+------------------+------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+---------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------------------+------------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+---------------------------------------------------------------------------+--------+
- | 330 | Motorola Moto G Power (2021) | 64 | flash gray | 2021 | 15000.990234 | 445.880005 | 1 | 1306783344 | 84,85,86 | 2323456764345678976,9223372036854775807 | {"features":["Snapdragon 662","6.6-inch display","Triple-camera system"]} | 0.663448,0.202478,0.027971,0.349821 |
+ | 330 | Motorola Moto G Power (2021) | flash gray | TRUE | 1766538342000 | 64 | 2021 | 15000.990234 | 445.880005 | 84,85,86 | NULL | {"features":["Snapdragon 662","6.6-inch display","Triple-camera system"]} | NULL |
- +------+------------------------------+------------------+------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+---------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------------------+------------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+---------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET vector= (-0.037794, 0.856278, 0.202892, 0.015594) WHERE id = 102; select * from tbl WHERE id = 102;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ +------+-----------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+------------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ +------+-----------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+------------------------------------------------------------------------------------+--------+
- | 102 | iPhone 13 | 128 | blue | 2021 | 799.989990 | 719.989990 | 0 | 1820294112 | 4,5,6 | 623456764345678976,9223372036854775807 | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | -0.037794,0.856278,0.202892,0.015594 |
+ | 102 | iPhone 13 | blue | FALSE | 1625317932000 | 128 | 2021 | 799.989990 | 719.989990 | 4,5,6 | NULL | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | NULL |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ +------+-----------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+------------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99, discounted_price =445.88, vector= (-0.037794, 0.856278, 0.202892, 0.015594) WHERE id = 336; select * from tbl WHERE id = 336;"
––– output –––
- +------+----------------------+------------------+-------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+--------------------------------------+
+ +------+----------------------+-------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+----------------------+------------------+-------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+--------------------------------------+
+ +------+----------------------+-------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | 336 | HTC Wildfire E1 lite | 32 | black | 2021 | 15000.990234 | 445.880005 | 1 | 3438054384 | 102,103,104 | 2923456764345678976,9223372036854775807 | {"features":["MediaTek Helio A20","6.1-inch display","Dual-camera system"]} | -0.037794,0.856278,0.202892,0.015594 |
+ | 336 | HTC Wildfire E1 lite | black | TRUE | 1811619286000 | 32 | 2021 | 15000.990234 | 445.880005 | 102,103,104 | NULL | {"features":["MediaTek Helio A20","6.1-inch display","Dual-camera system"]} | NULL |
- +------+----------------------+------------------+-------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+--------------------------------------+
+ +------+----------------------+-------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model='iPhone 13 Pro Max', color='titan', storage_capacity=1000, release_year=2023, sold=1, date_added=4077861360, product_codes=(30,31,32), values= (9223372444854775807,9223372036812375244), additional_info= '{\"features\":[\"Snapdragon 900\",\"8.0-inch display\",\"Dual-camera new-system\"]}', vector= (-0.037795, 0.856278, 0.202892, -0.015595) WHERE id = 247; select * from tbl WHERE id = 247;"
––– output –––
- +------+-------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+---------------------------------------+
+ ERROR 1064 (42000) at line 1: row 1, column 4: string expected
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+---------------------------------------+
- | 247 | iPhone 13 Pro Max | 1000 | titan | 2023 | 799.989990 | 699.989990 | 1 | 4077861360 | 30,31,32 | 9223372036812375244,9223372036854775807 | {"features":["Snapdragon 900","8.0-inch display","Dual-camera new-system"]} | -0.037795,0.856278,0.202892,-0.015595 |
- +------+-------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+---------------------------------------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET additional_info= '{\"features\":[\"Snapdragon 900\",\"8.0-inch display\",\"Dual-camera new-system\"]}' WHERE id = 323; select * from tbl WHERE id =323;"
––– output –––
- +------+------------------+------------------+---------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+---------------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+------------------+------------------+---------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+---------------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | 323 | Asus ROG Phone 5 | 256 | phantom black | 2021 | 999.989990 | 899.989990 | 0 | 3632367600 | 66,67,68 | 1723456764345678976,9223372036854775807 | {"features":["Snapdragon 900","8.0-inch display","Dual-camera new-system"]} | 0.071106,0.968278,0.311892,0.124594 |
+ | 323 | Asus ROG Phone 5 | phantom black | FALSE | 1721619286000 | 256 | 2021 | 999.989990 | 899.989990 | 66,67,68 | NULL | {"features":["Snapdragon 900","8.0-inch display","Dual-camera new-system"]} | NULL |
- +------+------------------+------------------+---------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+---------------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "Replace Into tbl Set price =15780.99, discounted_price =335.88 WHERE id = 335; select * from tbl WHERE id = 335;"
––– output –––
- +------+-------------+------------------+--------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------+
+ +------+-------------+--------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+-------------+------------------+--------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------+
+ +------+-------------+--------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-------------------------------------------------------------------------+--------+
- | 335 | LG G8 ThinQ | 128 | aurora black | 2019 | 15780.990234 | 335.880005 | 0 | 1194467680 | 99,100,101 | 2823456764345678976,9223372036854775807 | {"features":["Snapdragon 855","6.1-inch display","Dual-camera system"]} | -0.118894,0.778278,0.121892,-0.065406 |
+ | 335 | LG G8 ThinQ | aurora black | FALSE | 1805080732000 | 128 | 2019 | 15780.990234 | 335.880005 | 99,100,101 | NULL | {"features":["Snapdragon 855","6.1-inch display","Dual-camera system"]} | NULL |
- +------+-------------+------------------+--------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------+
+ +------+-------------+--------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-------------------------------------------------------------------------+--------+
––– input –––
curl -s -X POST "http://localhost:9308/tbl/_update/101" -H "Content-Type: application/json" -d '{"doc": {"model": "new-model", "color": "new-color"}}'; echo $?
––– output –––
OK
––– input –––
start_time=$(date +%s%3N) && for i in {1..5000}; do echo "REPLACE INTO tbl SET color = 'color_$i' WHERE id = ${i}01;"; done > /tmp/replace_dump && mysql -h0 -P9306 < /tmp/replace_dump > /dev/null && end_time=$(date +%s%3N) && export elapsed_time=$((end_time - start_time))
––– output –––
OK
––– input –––
echo $elapsed_time
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select count(*) from tbl WHERE regex (color, 'color_[0-9]+')"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: table tbl: stored fields can't be used in expressions
- | count(*) |
- +----------+
- | 5000 |
- +----------+
––– input –––
start_time2=$(date +%s%3N) && for i in {1..5000}; do echo "REPLACE INTO tbl (id, model, storage_capacity, color, release_year, price, discounted_price, sold, date_added, product_codes, values, additional_info, vector) VALUES (${i}101, 'iPhone 13 Pro', 256, 'silver${i}', 2021, 1099.99, 989.99, 'TRUE', '1591362342000', (1,2,3), (523456764345678976, 98765409877866654098, 1109876543450987650987), '{\"features\": [\"ProMotion display\", \"A15 Bionic chip\", \"Ceramic Shield front cover\"]}', (0.773448, 0.312478, 0.137971, 0.459821));"; done > /tmp/replace_dump && mysql -h0 -P9306 < /tmp/replace_dump > /dev/null && end_time2=$(date +%s%3N) && export elapsed_time2=$((end_time2 - start_time2))
––– output –––
OK
––– input –––
echo $elapsed_time2
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select count(*) from tbl WHERE regex (color, 'silver[0-9]+')"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: table tbl: stored fields can't be used in expressions
- | count(*) |
- +----------+
- | 5000 |
- +----------+
––– input –––
echo $((elapsed_time / elapsed_time2))
––– output –––
OK
––– input –––
mysql -v -h0 -P9306 -e "SHOW TABLES; DROP TABLE IF EXISTS abc; create table abc(id, t1 text, t2 text indexed); insert into abc VALUES (1, 'abc', 'cde'); desc abc;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO abc SET t1 ='iPhone 15 PRO' WHERE id = 1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 16 PRO MAX' WHERE id > 105;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 17 PRO MAX' WHERE id = 'abs';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 18 PRO' WHERE id in (1,2,3);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 18 PRO' WHERE sold = 0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET id =777 WHERE id = 144; select * from tbl WHERE id = 144;"
––– output –––
- +------+-----------------+------------------+--------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+--------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+-----------------+------------------+--------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+--------------------------------------------------------------------+--------+
- | 144 | Sony Xperia XZ3 | 64 | forest green | 2018 | 899.989990 | 799.989990 | 1 | 3308512240 | 126,127,128 | 3723456764345678976,9223372036854775807 | {"features":["Snapdragon 845","6.0-inch display","Single camera"]} | 0.733448,0.272478,0.097971,0.419821 |
+ | 144 | Sony Xperia XZ3 | forest green | TRUE | 1871619286000 | 64 | 2018 | 899.989990 | 799.989990 | 126,127,128 | NULL | {"features":["Snapdragon 845","6.0-inch display","Single camera"]} | NULL |
- +------+-----------------+------------------+--------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+--------------------------------------------------------------------+--------+
––– input –––
mysql -v -h0 -P9306 -e "SHOW TABLES; DROP TABLE IF EXISTS tbl; DROP TABLE IF EXISTS abc; SHOW TABLES; CREATE TABLE tbl (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2') engine='columnar';"
––– output –––
--------------
SHOW TABLES
--------------
+-------+------+
| Table | Type |
+-------+------+
| abc | rt |
| tbl | rt |
+-------+------+
--------------
DROP TABLE IF EXISTS tbl
--------------
--------------
DROP TABLE IF EXISTS abc
--------------
--------------
SHOW TABLES
--------------
--------------
CREATE TABLE tbl (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2') engine='columnar'
--------------
+ ERROR 1064 (42000) at line 1: error adding table 'tbl': knn library not loaded
––– input –––
chmod +x ./test/clt-tests/scripts/generate-1mln-records.sh
––– output –––
OK
––– input –––
total_iterations=20000 ./test/clt-tests/scripts/generate-1mln-records.sh
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 15 PRO' WHERE id = 101; select * from tbl WHERE id = 101;"
––– output –––
- +------+---------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------+--------+------+---------------+------------------+--------------+-------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+---------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------+--------+------+---------------+------------------+--------------+-------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | 101 | iPhone 15 PRO | 256 | silver | 2021 | 1099.989990 | 989.989990 | 1 | 2224442480 | 1,2,3 | 523456764345678976,9223372036854775807 | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | 0.773448,0.312478,0.137971,0.459821 |
+ | 101 | iPhone 15 PRO | silver | TRUE | 1591362342000 | 256 | 2021 | 1099.989990 | 989.989990 | 1,2,3 | NULL | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | NULL |
- +------+---------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------+--------+------+---------------+------------------+--------------+-------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET values = (623456764345678976, 9223372036854775807) WHERE id = 120; select * from tbl WHERE id = 120;"
––– output –––
- +------+---------+------------------+-------------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------+-------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+---------+------------------+-------------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------+-------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | 120 | LG Wing | 256 | aurora gray | 2020 | 999.989990 | 899.989990 | 1 | 1496660080 | 57,58,59 | 623456764345678976,9223372036854775807 | {"features":["Qualcomm Snapdragon 765G","Swivel display","Triple-camera system"]} | 0.863448,0.402478,0.227971,0.549821 |
+ | 120 | LG Wing | aurora gray | TRUE | 1698008742000 | 256 | 2020 | 999.989990 | 899.989990 | 57,58,59 | NULL | {"features":["Qualcomm Snapdragon 765G","Swivel display","Triple-camera system"]} | NULL |
- +------+---------+------------------+-------------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------+-------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET product_codes = (53,45,77), values = (92233777368548,92233720368548) WHERE id = 119; select * from tbl WHERE id = 119;"
––– output –––
- +------+---------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+---------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
- | 119 | BlackBerry Evolve X | 64 | black | 2018 | 599.989990 | 499.989990 | 0 | 3697138672 | 45,53,77 | 92233720368548,92233777368548 | {"features":["Qualcomm Snapdragon 660","5.99-inch display","Dual-camera system"]} | 0.051106,0.948278,0.291892,0.104594 |
+ | 119 | BlackBerry Evolve X | black | FALSE | 1691619286000 | 64 | 2018 | 599.989990 | 499.989990 | 45,53,77 | NULL | {"features":["Qualcomm Snapdragon 660","5.99-inch display","Dual-camera system"]} | NULL |
- +------+---------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+---------------------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99 WHERE id = 117; select * from tbl WHERE id = 117;"
––– output –––
- +------+----------------------+------------------+---------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+ +------+----------------------+---------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+--------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+----------------------+------------------+---------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+ +------+----------------------+---------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+--------------------------------------------------------------------------------+--------+
- | 117 | Motorola Edge 20 Pro | 256 | midnight blue | 2021 | 15000.990234 | 599.989990 | 0 | 1501096560 | 48,49,50 | 1123456764345678976,9223372036854775807 | {"features":["Qualcomm Snapdragon 870","OLED display","Triple-camera system"]} | 0.041106,0.938278,0.281892,0.094594 |
+ | 117 | Motorola Edge 20 Pro | midnight blue | FALSE | 1676538342000 | 256 | 2021 | 15000.990234 | 599.989990 | 48,49,50 | NULL | {"features":["Qualcomm Snapdragon 870","OLED display","Triple-camera system"]} | NULL |
- +------+----------------------+------------------+---------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------------------+-------------------------------------+
+ +------+----------------------+---------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+--------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99, discounted_price =445.88 WHERE id = 330; select * from tbl WHERE id = 330;"
––– output –––
- +------+------------------------------+------------------+------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+---------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------------------+------------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+---------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+------------------------------+------------------+------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+---------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------------------+------------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+---------------------------------------------------------------------------+--------+
- | 330 | Motorola Moto G Power (2021) | 64 | flash gray | 2021 | 15000.990234 | 445.880005 | 1 | 1306783344 | 84,85,86 | 2323456764345678976,9223372036854775807 | {"features":["Snapdragon 662","6.6-inch display","Triple-camera system"]} | 0.663448,0.202478,0.027971,0.349821 |
+ | 330 | Motorola Moto G Power (2021) | flash gray | TRUE | 1766538342000 | 64 | 2021 | 15000.990234 | 445.880005 | 84,85,86 | NULL | {"features":["Snapdragon 662","6.6-inch display","Triple-camera system"]} | NULL |
- +------+------------------------------+------------------+------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+---------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------------------+------------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+---------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET vector= (-0.037794, 0.856278, 0.202892, 0.015594) WHERE id = 102; select * from tbl WHERE id = 102;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ +------+-----------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+------------------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ +------+-----------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+------------------------------------------------------------------------------------+--------+
- | 102 | iPhone 13 | 128 | blue | 2021 | 799.989990 | 719.989990 | 0 | 1820294112 | 4,5,6 | 623456764345678976,9223372036854775807 | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | -0.037794,0.856278,0.202892,0.015594 |
+ | 102 | iPhone 13 | blue | FALSE | 1625317932000 | 128 | 2021 | 799.989990 | 719.989990 | 4,5,6 | NULL | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | NULL |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ +------+-----------+-------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+------------------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET price =15000.99, discounted_price =445.88, vector= (-0.037794, 0.856278, 0.202892, 0.015594) WHERE id = 336; select * from tbl WHERE id = 336;"
––– output –––
- +------+----------------------+------------------+-------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+--------------------------------------+
+ +------+----------------------+-------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+----------------------+------------------+-------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+--------------------------------------+
+ +------+----------------------+-------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | 336 | HTC Wildfire E1 lite | 32 | black | 2021 | 15000.990234 | 445.880005 | 1 | 3438054384 | 102,103,104 | 2923456764345678976,9223372036854775807 | {"features":["MediaTek Helio A20","6.1-inch display","Dual-camera system"]} | -0.037794,0.856278,0.202892,0.015594 |
+ | 336 | HTC Wildfire E1 lite | black | TRUE | 1811619286000 | 32 | 2021 | 15000.990234 | 445.880005 | 102,103,104 | NULL | {"features":["MediaTek Helio A20","6.1-inch display","Dual-camera system"]} | NULL |
- +------+----------------------+------------------+-------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+--------------------------------------+
+ +------+----------------------+-------+------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model='iPhone 13 Pro Max', color='titan', storage_capacity=1000, release_year=2023, sold=1, date_added=4077861360, product_codes=(30,31,32), values= (9223372444854775807,9223372036812375244), additional_info= '{\"features\":[\"Snapdragon 900\",\"8.0-inch display\",\"Dual-camera new-system\"]}', vector= (-0.037795, 0.856278, 0.202892, -0.015595) WHERE id = 247; select * from tbl WHERE id = 247;"
––– output –––
- +------+-------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+---------------------------------------+
+ ERROR 1064 (42000) at line 1: row 1, column 4: string expected
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+---------------------------------------+
- | 247 | iPhone 13 Pro Max | 1000 | titan | 2023 | 799.989990 | 699.989990 | 1 | 4077861360 | 30,31,32 | 9223372036812375244,9223372036854775807 | {"features":["Snapdragon 900","8.0-inch display","Dual-camera new-system"]} | -0.037795,0.856278,0.202892,-0.015595 |
- +------+-------------------+------------------+-------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+---------------------------------------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET additional_info= '{\"features\":[\"Snapdragon 900\",\"8.0-inch display\",\"Dual-camera new-system\"]}' WHERE id = 323; select * from tbl WHERE id =323;"
––– output –––
- +------+------------------+------------------+---------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+---------------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+------------------+------------------+---------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+---------------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
- | 323 | Asus ROG Phone 5 | 256 | phantom black | 2021 | 999.989990 | 899.989990 | 0 | 3632367600 | 66,67,68 | 1723456764345678976,9223372036854775807 | {"features":["Snapdragon 900","8.0-inch display","Dual-camera new-system"]} | 0.071106,0.968278,0.311892,0.124594 |
+ | 323 | Asus ROG Phone 5 | phantom black | FALSE | 1721619286000 | 256 | 2021 | 999.989990 | 899.989990 | 66,67,68 | NULL | {"features":["Snapdragon 900","8.0-inch display","Dual-camera new-system"]} | NULL |
- +------+------------------+------------------+---------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+-----------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+---------------+-------+---------------+------------------+--------------+------------+------------------+---------------+--------+-----------------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "Replace Into tbl Set price =15780.99, discounted_price =335.88 WHERE id = 335; select * from tbl WHERE id = 335;"
––– output –––
- +------+-------------+------------------+--------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------+
+ +------+-------------+--------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-------------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+-------------+------------------+--------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------+
+ +------+-------------+--------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-------------------------------------------------------------------------+--------+
- | 335 | LG G8 ThinQ | 128 | aurora black | 2019 | 15780.990234 | 335.880005 | 0 | 1194467680 | 99,100,101 | 2823456764345678976,9223372036854775807 | {"features":["Snapdragon 855","6.1-inch display","Dual-camera system"]} | -0.118894,0.778278,0.121892,-0.065406 |
+ | 335 | LG G8 ThinQ | aurora black | FALSE | 1805080732000 | 128 | 2019 | 15780.990234 | 335.880005 | 99,100,101 | NULL | {"features":["Snapdragon 855","6.1-inch display","Dual-camera system"]} | NULL |
- +------+-------------+------------------+--------------+--------------+--------------+------------------+------+------------+---------------+-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------+
+ +------+-------------+--------------+-------+---------------+------------------+--------------+--------------+------------------+---------------+--------+-------------------------------------------------------------------------+--------+
––– input –––
curl -s -X POST "http://localhost:9308/tbl/_update/101" -H "Content-Type: application/json" -d '{"doc": {"model": "new-model", "color": "new-color"}}'; echo $?
––– output –––
OK
––– input –––
start_time=$(date +%s%3N) && for i in {1..5000}; do echo "REPLACE INTO tbl SET color = 'color_$i' WHERE id = ${i}01;"; done > /tmp/replace_dump && mysql -h0 -P9306 < /tmp/replace_dump > /dev/null && end_time=$(date +%s%3N) && export elapsed_time=$((end_time - start_time))
––– output –––
OK
––– input –––
echo $elapsed_time
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select count(*) from tbl WHERE regex (color, 'color_[0-9]+')"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: table tbl: stored fields can't be used in expressions
- | count(*) |
- +----------+
- | 5000 |
- +----------+
––– input –––
start_time2=$(date +%s%3N) && for i in {1..5000}; do echo "REPLACE INTO tbl (id, model, storage_capacity, color, release_year, price, discounted_price, sold, date_added, product_codes, values, additional_info, vector) VALUES (${i}101, 'iPhone 13 Pro', 256, 'silver${i}', 2021, 1099.99, 989.99, 'TRUE', '1591362342000', (1,2,3), (523456764345678976, 98765409877866654098, 1109876543450987650987), '{\"features\": [\"ProMotion display\", \"A15 Bionic chip\", \"Ceramic Shield front cover\"]}', (0.773448, 0.312478, 0.137971, 0.459821));"; done > /tmp/replace_dump && mysql -h0 -P9306 < /tmp/replace_dump > /dev/null && end_time2=$(date +%s%3N) && export elapsed_time2=$((end_time2 - start_time2))
––– output –––
OK
––– input –––
echo $elapsed_time2
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select count(*) from tbl WHERE regex (color, 'silver[0-9]+')"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: table tbl: stored fields can't be used in expressions
- | count(*) |
- +----------+
- | 5000 |
- +----------+
––– input –––
echo $((elapsed_time / elapsed_time2))
––– output –––
OK
––– input –––
mysql -v -h0 -P9306 -e "SHOW TABLES; create table abc(id, t1 text, t2 text indexed) engine='columnar'; insert into abc VALUES (1, 'abc', 'cde'); desc abc;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO abc SET t1 ='iPhone 15 PRO' WHERE id = 1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 16 PRO MAX' WHERE id > 105;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 17 PRO MAX' WHERE id = 'abs';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 18 PRO' WHERE id in (1,2,3);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model ='iPhone 18 PRO' WHERE sold = 0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET id =777 WHERE id = 144; select * from tbl WHERE id = 144;"
––– output –––
- +------+-----------------+------------------+--------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+--------------------------------------------------------------------+--------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
+ | id | model | color | sold | date_added | storage_capacity | release_year | price | discounted_price | product_codes | values | additional_info | vector |
- +------+-----------------+------------------+--------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+--------------------------------------------------------------------+--------+
- | 144 | Sony Xperia XZ3 | 64 | forest green | 2018 | 899.989990 | 799.989990 | 1 | 3308512240 | 126,127,128 | 3723456764345678976,9223372036854775807 | {"features":["Snapdragon 845","6.0-inch display","Single camera"]} | 0.733448,0.272478,0.097971,0.419821 |
+ | 144 | Sony Xperia XZ3 | forest green | TRUE | 1871619286000 | 64 | 2018 | 899.989990 | 799.989990 | 126,127,128 | NULL | {"features":["Snapdragon 845","6.0-inch display","Single camera"]} | NULL |
- +------+-----------------+------------------+--------------+--------------+------------+------------------+------+------------+---------------+-----------------------------------------+--------------------------------------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+------+---------------+------------------+--------------+------------+------------------+---------------+--------+--------------------------------------------------------------------+--------+
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET model = 'Sony Xperia X\'Z3' WHERE id = 144; select * from tbl WHERE id = 144\G"
––– output –––
*************************** 1. row ***************************
id: 144
model: Sony Xperia X'Z3
- storage_capacity: 64
+ color: forest green
- color: forest green
+ sold: TRUE
- release_year: 2018
+ date_added: 1871619286000
- price: 899.989990
+ storage_capacity: 64
- discounted_price: 799.989990
+ release_year: 2018
- sold: 1
+ price: 899.989990
- date_added: 3308512240
+ discounted_price: 799.989990
product_codes: 126,127,128
- values: 3723456764345678976,9223372036854775807
+ values: NULL
additional_info: {"features":["Snapdragon 845","6.0-inch display","Single camera"]}
- vector: 0.733448,0.272478,0.097971,0.419821
+ vector: NULL
––– input –––
mysql -h0 -P9306 -e "REPLACE INTO tbl SET release_year = 2019 WHERE id = 144; select * from tbl WHERE id = 144\G"
––– output –––
*************************** 1. row ***************************
id: 144
model: Sony Xperia X'Z3
- storage_capacity: 64
+ color: forest green
- color: forest green
+ sold: TRUE
- release_year: 2019
+ date_added: 1871619286000
- price: 899.989990
+ storage_capacity: 64
- discounted_price: 799.989990
+ release_year: 2019
- sold: 1
+ price: 899.989990
- date_added: 3308512240
+ discounted_price: 799.989990
product_codes: 126,127,128
- values: 3723456764345678976,9223372036854775807
+ values: NULL
additional_info: {"features":["Snapdragon 845","6.0-inch display","Single camera"]}
- vector: 0.733448,0.272478,0.097971,0.419821
+ vector: NULLtest/clt-tests/data-manipulation/test-alter-rename-nightly.rec––– input –––
stdbuf -oL searchd; if timeout 10 grep -qm1 'accepting' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Started'; else echo 'Timeout or failed!'; fi
––– output –––
- Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)
+ Manticore 0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
- [#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
+ [Sun Jan 25 09:25:13.851 2026] [19] WARNING: Error initializing knn index: daemon requires knn library v10 (trying to load v9)
- starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#)' ...
+ [Sun Jan 25 09:25:13.883 2026] [19] using config file '/etc/manticoresearch/manticore.conf' (269 chars)...
- listening on %{IPADDR}:9312 for sphinx and http(s)
+ starting daemon version '0.0.0 a87203724@26012508 (columnar 10.0.0 88c182b@26011113) (secondary 10.0.0 88c182b@26011113)' ...
- listening on %{IPADDR}:9306 for mysql
+ listening on 127.0.0.1:9312 for sphinx and http(s)
- listening on %{IPADDR}:9308 for sphinx and http(s)
+ listening on 127.0.0.1:9306 for mysql
- Started
+ listening on 127.0.0.1:9308 for sphinx and http(s)
+ Started
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2001(f text, s string); insert into index2001 values(01,'abc','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2002(f text, s string); insert into index2002 values(02,'def','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2003(f text, s string); insert into index2003 values(03,'ghi','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2004(f text, s string); insert into index2004 values(04,'jkl','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE index2001 RENAME new_index2001;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE index2002 RENAME new_index2002;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE index2003 RENAME new_index2003;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE index2004 RENAME new_index2004;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2006(f text, s string); insert into index2006 values(3,'ghi','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2007(f text, s string); insert into index2007 values(4,'jkl','string');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE dist_table type='distributed' local='index2006' local='index2007';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES; DESC dist_table"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE dist_table RENAME new_dist_table;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE products(title text, meta json) type='pq';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE products RENAME new_products;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE nonexistent RENAME new_nonexistent;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE invalid-name RENAME new_invalid_name;"
––– output –––
OK
––– input –––
for i in $(seq 1 1000); do mysql -h0 -P9306 -e "CREATE TABLE index${i}(f text, s string); insert into index${i} values(${i}, 'value${i}', 'string');"; done
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES" | awk 'NR==1{print $0; next} {print $0 | "sort"}'
––– output –––
OK
––– input –––
for i in $(seq 1 1000); do mysql -h0 -P9306 -e "ALTER TABLE index${i} RENAME new_index${i};"; done
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES" | awk 'NR==1{print $0; next} {print $0 | "sort"}'
––– output –––
OK |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/replication/test-replication-with-mysqldump.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
echo 'the, and, of' > /tmp/stopwords.txt
––– output –––
OK
––– input –––
echo 'cat => feline' > /tmp/exceptions.txt
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl1 (id BIGINT, f TEXT, a INT, b FLOAT, j JSON, m MULTI, s STRING, e BOOL, d TIMESTAMP, v MULTI64, fv FLOAT_VECTOR KNN_TYPE='hnsw' KNN_DIMS='4' HNSW_SIMILARITY='l2') ENGINE='columnar' morphology='stem_en' stopwords='/tmp/stopwords.txt' exceptions='/tmp/exceptions.txt' rt_mem_limit='256M';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: error adding table 'tbl1': knn library not loaded
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLE tbl1 SETTINGS\G;"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: SHOW TABLE SETTINGS requires an existing table
- Variable_name: settings
- Value: engine = columnar
- exceptions = /var/log/manticore-1/tbl1/exceptions_chunk0_0.txt
- morphology = stem_en
- stopwords = /var/log/manticore-1/tbl1/stopwords_chunk0_0.txt
- rt_mem_limit = 268435456
––– input –––
mysql -h0 -P1306 -e "INSERT INTO tbl1 VALUES (1, 'The cat runs', 42, 3.14, '{\"key\":\"value\"}', (1,2,3), 'test', 1, '2024-12-16 12:00:00', (123456789012345678, 987654321098765432), (0.1, 0.2, 0.3, 0.4));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ 1
––– input –––
mysql -h0 -P1306 -e "ALTER CLUSTER c ADD tbl1;"
––– output –––
+ ERROR 1064 (42000) at line 1: unknown or wrong type of table 'tbl1'
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
echo '=> faster' > /tmp/wordforms.txt
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "CREATE TABLE tbl2 (id BIGINT, f TEXT, a INT, b FLOAT, j JSON, m MULTI, s STRING, e BOOL, d TIMESTAMP, v MULTI64, fv FLOAT_VECTOR KNN_TYPE='hnsw' KNN_DIMS='4' HNSW_SIMILARITY='l2') ENGINE='rowwise' morphology='stem_ru' wordforms='/tmp/wordforms.txt' rt_mem_limit='512M';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: error adding table 'tbl2': knn library not loaded
+ 1
––– input –––
mysql -h0 -P2306 -e "SHOW TABLE tbl2 SETTINGS\G;"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: SHOW TABLE SETTINGS requires an existing table
- Variable_name: settings
- Value: engine = rowwise
- morphology = stem_ru
- wordforms = /var/log/manticore-2/tbl2/wordforms_chunk0_0.txt
- rt_mem_limit = 536870912
––– input –––
mysql -h0 -P2306 -e "INSERT INTO tbl2 VALUES (1, 'Текст на русском', 84, 2.71, '{\"ключ\":\"значение\"}', (4,5,6), 'строка', 0, '2023-11-15 08:30:00', (987654321098765432, 123456789012345678), (0.4, 0.3, 0.2, 0.1));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ 1
––– input –––
mysql -h0 -P2306 -e "INSERT INTO tbl2 VALUES (2, 'Прыжок', 19, 1.62, '{\"движение\":\"прыжок\",\"число\":3}', (7,8,9), 'пример', 1, '2024-06-10 15:45:00', (345678901234567890, 567890123456789012), (0.8, 0.7, 0.6, 0.5));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ 1
––– input –––
mysql -h0 -P2306 -e "ALTER CLUSTER c ADD tbl2;"
––– output –––
+ ERROR 1064 (42000) at line 1: unknown or wrong type of table 'tbl2'
––– input –––
mysql -h0 -P3306 -e "CREATE TABLE tbl3 (id BIGINT, f TEXT, a INT, b FLOAT, j JSON, m MULTI, s STRING, e BOOL, d TIMESTAMP, v MULTI64, fv FLOAT_VECTOR KNN_TYPE='hnsw' KNN_DIMS='4' HNSW_SIMILARITY='l2') ENGINE='rowwise' rt_mem_limit='512M';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: error adding table 'tbl3': knn library not loaded
+ 1
––– input –––
mysql -h0 -P3306 -e "SHOW TABLE tbl3 SETTINGS\G;"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: SHOW TABLE SETTINGS requires an existing table
- Variable_name: settings
- Value: engine = rowwise
- rt_mem_limit = 536870912
––– input –––
mysql -h0 -P3306 -e "INSERT INTO tbl3 (id, f, a, b, j, m, s, e, d, v, fv) VALUES (1, 'Plain example', 42, 3.14, '{\"key\":\"value\"}', (1,2,3), 'plain_string', 1, '2024-12-16 12:00:00', (123456789012345678, 987654321098765432), (0.1, 0.2, 0.3, 0.4));"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "ALTER CLUSTER c ADD tbl3;"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
- +-------------------+----------------+
+ +-------------------+-------+
- | Counter | Value |
+ | Counter | Value |
- +-------------------+----------------+
+ +-------------------+-------+
- | cluster_c_indexes | tbl1,tbl2,tbl3 |
+ | cluster_c_indexes | tbl3 |
- +-------------------+----------------+
+ +-------------------+-------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl1 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl1 on port 2306:
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 1 | The cat runs | 42 | 3.140000 | {"key":"value"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ Data from c:tbl1 on port 3306:
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- Data from c:tbl1 on port 2306:
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | The cat runs | 42 | 3.140000 | {"key":"value"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl1 on port 3306:
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | The cat runs | 42 | 3.140000 | {"key":"value"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+--------------+------+----------+-----------------+-------+------+------+------+---------------------------------------+-------------------------------------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl2 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl2 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl2 on port 1306:
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl2 on port 2306:
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
+ Data from c:tbl2 on port 3306:
- | 2 | Прыжок | 19 | 1.620000 | {"движение":"прыжок","число":3} | 7,8,9 | пример | 1 | 0 | 345678901234567890,567890123456789012 | 0.800000,0.700000,0.600000,0.500000 |
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl2 on port 2306:
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
- | 2 | Прыжок | 19 | 1.620000 | {"движение":"прыжок","число":3} | 7,8,9 | пример | 1 | 0 | 345678901234567890,567890123456789012 | 0.800000,0.700000,0.600000,0.500000 |
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl2 on port 3306:
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
- | 2 | Прыжок | 19 | 1.620000 | {"движение":"прыжок","число":3} | 7,8,9 | пример | 1 | 0 | 345678901234567890,567890123456789012 | 0.800000,0.700000,0.600000,0.500000 |
- +------+--------------------------------+------+----------+----------------------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl3 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl3 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl3 on port 1306:
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
- | id | f | a | b | j | m | s | e | d | v | fv |
+ | id | f | s | d | a | b | j | m | e | v | fv |
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
- | 1 | Plain example | 42 | 3.140000 | {"key":"value"} | 1,2,3 | plain_string | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ | 1 | Plain example | plain_string | 2024-12-16 12:00:00 | 42 | 3.140000 | {"key":"value"} | 1,2,3 | 1 | 123456789012345678,987654321098765432 | NULL |
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
Data from c:tbl3 on port 2306:
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
- | id | f | a | b | j | m | s | e | d | v | fv |
+ | id | f | s | d | a | b | j | m | e | v | fv |
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
- | 1 | Plain example | 42 | 3.140000 | {"key":"value"} | 1,2,3 | plain_string | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ | 1 | Plain example | plain_string | 2024-12-16 12:00:00 | 42 | 3.140000 | {"key":"value"} | 1,2,3 | 1 | 123456789012345678,987654321098765432 | NULL |
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
Data from c:tbl3 on port 3306:
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
- | id | f | a | b | j | m | s | e | d | v | fv |
+ | id | f | s | d | a | b | j | m | e | v | fv |
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
- | 1 | Plain example | 42 | 3.140000 | {"key":"value"} | 1,2,3 | plain_string | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ | 1 | Plain example | plain_string | 2024-12-16 12:00:00 | 42 | 3.140000 | {"key":"value"} | 1,2,3 | 1 | 123456789012345678,987654321098765432 | NULL |
- +------+---------------+------+----------+-----------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+---------------+--------------+---------------------+------+----------+-----------------+-------+------+---------------------------------------+------+
––– input –––
mysql -h0 -P1306 -e "REPLACE INTO c:tbl1 VALUES (1, 'Updated feline runs', 42, 3.14, '{\"key\":\"updated\"}', (1,2,3), 'test', 1, '2024-12-16 12:00:00', (123456789012345678, 987654321098765432), (0.1, 0.2, 0.3, 0.4));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl1' absent
+ 1
––– input –––
mysqldump --skip-lock-tables -etc --column-statistics=0 --replace -u cluster -h0 -P1306 --skip-comments manticore c:tbl1 | mysql -h0 -P1306; echo $?
––– output –––
-- Warning: version string returned by server is incorrect.
- 0
+ mysqldump: Couldn't find table: "c:tbl1"
+ 0
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl1 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
––– input –––
for port in 1306 2306 3306; do mysql -h0 -P$port -e "SET GLOBAL cluster_user = 'new_username';"; done
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 10 bash -c "while ! mysql -h0 -P$port -e \"SHOW VARIABLES LIKE 'cluster_user';\" | grep -q '| cluster_user | new_username |'; do sleep 1; done" && echo "Port $port: cluster_user is new_username." || { echo "Port $port: cluster_user is not new_username."; exit 1; }; done
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "DELETE FROM c:tbl2 WHERE id = 2;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: unknown table 'tbl2' in delete request
+ 1
––– input –––
mysql -h0 -P3306 -e "INSERT INTO c:tbl3 (id, f, a, b, j, m, s, e, d, v, fv) VALUES (2, 'New plain entry', 50, 5.5, '{\"new\":\"entry\"}', (10,11,12), 'new_string', 0, '2025-03-02 10:00:00', (111222333444555666, 777888999000111222), (0.6, 0.7, 0.8, 0.9));"; echo $?
––– output –––
OK
––– input –––
mysqldump -etc --skip-lock-tables --column-statistics=0 --replace --net-buffer-length=16M -u new_username -h0 -P2306 --skip-comments manticore c:tbl1 c:tbl2 c:tbl3 | mysql -h0 -P3306; echo $?
––– output –––
-- Warning: version string returned by server is incorrect.
- 0
+ mysqldump: Couldn't find table: "c:tbl1"
+ 0
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl1 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl2 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl2 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl2 on port 1306:
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl2 on port 2306:
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
+ Data from c:tbl2 on port 3306:
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- Data from c:tbl2 on port 2306:
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl2 on port 3306:
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
- +------+--------------------------------+------+----------+---------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl3 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl3 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl3 on port 1306:
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
- | id | f | a | b | j | m | s | e | d | v | fv |
+ | id | f | s | d | a | b | j | m | e | v | fv |
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
- | 1 | Plain example | 42 | 3.140000 | {"key":"value"} | 1,2,3 | plain_string | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ | 1 | Plain example | plain_string | 2024-12-16 12:00:00 | 42 | 3.140000 | {"key":"value"} | 1,2,3 | 1 | 123456789012345678,987654321098765432 | NULL |
- | 2 | New plain entry | 50 | 5.500000 | {"new":"entry"} | 10,11,12 | new_string | 0 | 0 | 111222333444555666,777888999000111222 | 0.600000,0.700000,0.800000,0.900000 |
+ | 2 | New plain entry | new_string | 2025-03-02 10:00:00 | 50 | 5.500000 | {"new":"entry"} | 10,11,12 | 0 | 111222333444555666,777888999000111222 | NULL |
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
Data from c:tbl3 on port 2306:
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
- | id | f | a | b | j | m | s | e | d | v | fv |
+ | id | f | s | d | a | b | j | m | e | v | fv |
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
- | 1 | Plain example | 42 | 3.140000 | {"key":"value"} | 1,2,3 | plain_string | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ | 1 | Plain example | plain_string | 2024-12-16 12:00:00 | 42 | 3.140000 | {"key":"value"} | 1,2,3 | 1 | 123456789012345678,987654321098765432 | NULL |
- | 2 | New plain entry | 50 | 5.500000 | {"new":"entry"} | 10,11,12 | new_string | 0 | 0 | 111222333444555666,777888999000111222 | 0.600000,0.700000,0.800000,0.900000 |
+ | 2 | New plain entry | new_string | 2025-03-02 10:00:00 | 50 | 5.500000 | {"new":"entry"} | 10,11,12 | 0 | 111222333444555666,777888999000111222 | NULL |
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
Data from c:tbl3 on port 3306:
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
- | id | f | a | b | j | m | s | e | d | v | fv |
+ | id | f | s | d | a | b | j | m | e | v | fv |
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
- | 1 | Plain example | 42 | 3.140000 | {"key":"value"} | 1,2,3 | plain_string | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ | 1 | Plain example | plain_string | 2024-12-16 12:00:00 | 42 | 3.140000 | {"key":"value"} | 1,2,3 | 1 | 123456789012345678,987654321098765432 | NULL |
- | 2 | New plain entry | 50 | 5.500000 | {"new":"entry"} | 10,11,12 | new_string | 0 | 0 | 111222333444555666,777888999000111222 | 0.600000,0.700000,0.800000,0.900000 |
+ | 2 | New plain entry | new_string | 2025-03-02 10:00:00 | 50 | 5.500000 | {"new":"entry"} | 10,11,12 | 0 | 111222333444555666,777888999000111222 | NULL |
- +------+-----------------+------+----------+-----------------+----------+--------------+------+------+---------------------------------------+-------------------------------------+
+ +------+-----------------+--------------+---------------------+------+----------+-----------------+----------+------+---------------------------------------+------+
––– input –––
mysql -h0 -P1306 -e "ALTER CLUSTER c DROP tbl1;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: unknown or wrong type of table 'tbl1'
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
- +-------------------+-----------+
+ +-------------------+-------+
- | Counter | Value |
+ | Counter | Value |
- +-------------------+-----------+
+ +-------------------+-------+
- | cluster_c_indexes | tbl2,tbl3 |
+ | cluster_c_indexes | tbl3 |
- +-------------------+-----------+
+ +-------------------+-------+
––– input –––
echo 'new, stop, words' > /tmp/new_stopwords.txt; echo $?
––– output –––
OK
––– input –––
echo 'dog => canine' > /tmp/new_exceptions.txt; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "ALTER TABLE tbl1 stopwords='/tmp/new_stopwords.txt' exceptions='/tmp/new_exceptions.txt';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl1' is not found, or not real-time
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLE tbl1 SETTINGS\G;"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: SHOW TABLE SETTINGS requires an existing table
- Variable_name: settings
- Value: engine = columnar
- exceptions = /var/log/manticore-1/tbl1/exceptions_chunk0_1.txt
- morphology = stem_en
- stopwords = /var/log/manticore-1/tbl1/stopwords_chunk0_1.txt
- rt_mem_limit = 268435456
––– input –––
mysql -h0 -P1306 -e "REPLACE INTO tbl1 VALUES (1, 'Updated feline runs', 42, 3.14, '{\"key\":\"updated\"}', (1,2,3), 'test', 1, '2024-12-16 12:00:00', (123456789012345678, 987654321098765432), (0.1, 0.2, 0.3, 0.4));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl1' absent
+ 1
––– input –––
mysql -h0 -P1306 -e "ALTER CLUSTER c ADD tbl1;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: unknown or wrong type of table 'tbl1'
+ 1
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl1 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
––– input –––
mysql -h0 -P2306 -e "SHOW TABLE c:tbl1 SETTINGS\G;"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: SHOW TABLE SETTINGS requires an existing table
- Variable_name: settings
- Value: engine = columnar
- exceptions = /var/log/manticore-2/tbl1/exceptions_chunk0_1.txt
- morphology = stem_en
- stopwords = /var/log/manticore-2/tbl1/stopwords_chunk0_1.txt
- rt_mem_limit = 268435456
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT id, f, HIGHLIGHT() FROM c:tbl1 WHERE MATCH('new runs');"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+---------------------+----------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | highlight() |
+ Data from c:tbl1 on port 2306:
- +------+---------------------+----------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 1 | Updated feline runs | Updated feline <b>runs</b> |
+ Data from c:tbl1 on port 3306:
- +------+---------------------+----------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- Data from c:tbl1 on port 2306:
- +------+---------------------+----------------------------+
- | id | f | highlight() |
- +------+---------------------+----------------------------+
- | 1 | Updated feline runs | Updated feline <b>runs</b> |
- +------+---------------------+----------------------------+
- Data from c:tbl1 on port 3306:
- +------+---------------------+----------------------------+
- | id | f | highlight() |
- +------+---------------------+----------------------------+
- | 1 | Updated feline runs | Updated feline <b>runs</b> |
- +------+---------------------+----------------------------+
––– input –––
mysql -h0 -P1306 -e "INSERT INTO c:tbl1 (id, f, a, b, j, m, s, e, d, v, fv) VALUES (2, 'The dog barks', 10, 2.5, '{\"animal\":\"dog\"}', (4,5), 'bark', 1, '2025-01-01 10:00:00', (111222333444555, 666777888999000), (0.5, 0.6, 0.7, 0.8));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl1' absent
+ 1
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT id, f, HIGHLIGHT() FROM c:tbl1 WHERE MATCH('canine');"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+---------------+----------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | highlight() |
+ Data from c:tbl1 on port 2306:
- +------+---------------+----------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 2 | The dog barks | The <b>dog</b> barks |
+ Data from c:tbl1 on port 3306:
- +------+---------------+----------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- Data from c:tbl1 on port 2306:
- +------+---------------+----------------------+
- | id | f | highlight() |
- +------+---------------+----------------------+
- | 2 | The dog barks | The <b>dog</b> barks |
- +------+---------------+----------------------+
- Data from c:tbl1 on port 3306:
- +------+---------------+----------------------+
- | id | f | highlight() |
- +------+---------------+----------------------+
- | 2 | The dog barks | The <b>dog</b> barks |
- +------+---------------+----------------------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl1 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl1 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl1 on port 1306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
+ Data from c:tbl1 on port 3306:
- | 2 | The dog barks | 10 | 2.500000 | {"animal":"dog"} | 4,5 | bark | 1 | 0 | 111222333444555,666777888999000 | 0.500000,0.600000,0.700000,0.800000 |
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl1' in search request
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl1 on port 2306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- | 2 | The dog barks | 10 | 2.500000 | {"animal":"dog"} | 4,5 | bark | 1 | 0 | 111222333444555,666777888999000 | 0.500000,0.600000,0.700000,0.800000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl1 on port 3306:
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Updated feline runs | 42 | 3.140000 | {"key":"updated"} | 1,2,3 | test | 1 | 0 | 123456789012345678,987654321098765432 | 0.100000,0.200000,0.300000,0.400000 |
- | 2 | The dog barks | 10 | 2.500000 | {"animal":"dog"} | 4,5 | bark | 1 | 0 | 111222333444555,666777888999000 | 0.500000,0.600000,0.700000,0.800000 |
- +------+---------------------+------+----------+-------------------+-------+------+------+------+---------------------------------------+-------------------------------------+
––– input –––
mysql -h0 -P2306 -e "ALTER CLUSTER c DROP tbl2;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: unknown or wrong type of table 'tbl2'
+ 1
––– input –––
mysql -h0 -P2306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
- +-------------------+-----------+
+ +-------------------+-------+
- | Counter | Value |
+ | Counter | Value |
- +-------------------+-----------+
+ +-------------------+-------+
- | cluster_c_indexes | tbl3,tbl1 |
+ | cluster_c_indexes | tbl3 |
- +-------------------+-----------+
+ +-------------------+-------+
––– input –––
ls /usr/share/manticore/ru.pak
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "ALTER TABLE tbl2 morphology='lemmatize_ru';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl2' is not found, or not real-time
+ 1
––– input –––
mysql -h0 -P2306 -e "SHOW TABLE tbl2 SETTINGS\G;"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: SHOW TABLE SETTINGS requires an existing table
- Variable_name: settings
- Value: engine = rowwise
- morphology = lemmatize_ru
- wordforms = /var/log/manticore-2/tbl2/wordforms_chunk0_0.txt
- rt_mem_limit = 536870912
––– input –––
mysqldump -etc --column-statistics=0 --replace -u new_username -h0 -P2306 --skip-comments manticore tbl2 | mysql -P2306 -h0; echo $?
––– output –––
-- Warning: version string returned by server is incorrect.
- 0
+ mysqldump: Couldn't find table: "tbl2"
+ 0
––– input –––
mysql -h0 -P2306 -e "ALTER CLUSTER c ADD tbl2;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: unknown or wrong type of table 'tbl2'
+ 1
––– input –––
mysql -h0 -P2306 -e "INSERT INTO c:tbl2 (id, f, a, b, j, m, s, e, d, v, fv) VALUES (2, 'Кот прыжки делает', 5, 1.1, '{\"движение\":\"прыжки\"}', (10,11), 'кот', 1, '2025-03-11 12:00:00', (111111111, 222222222), (0.9, 0.8, 0.7, 0.6));"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl2' absent
+ 1
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl2 on port $port:"; mysql -h0 -P$port -e "SELECT id, f, HIGHLIGHT() FROM c:tbl2 WHERE MATCH('прыжок');"; done
––– output –––
Data from c:tbl2 on port 1306:
- +------+----------------------------------+-----------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | id | f | highlight() |
+ Data from c:tbl2 on port 2306:
- +------+----------------------------------+-----------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | 2 | Кот прыжки делает | Кот <b>прыжки</b> делает |
+ Data from c:tbl2 on port 3306:
- +------+----------------------------------+-----------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- Data from c:tbl2 on port 2306:
- +------+----------------------------------+-----------------------------------------+
- | id | f | highlight() |
- +------+----------------------------------+-----------------------------------------+
- | 2 | Кот прыжки делает | Кот <b>прыжки</b> делает |
- +------+----------------------------------+-----------------------------------------+
- Data from c:tbl2 on port 3306:
- +------+----------------------------------+-----------------------------------------+
- | id | f | highlight() |
- +------+----------------------------------+-----------------------------------------+
- | 2 | Кот прыжки делает | Кот <b>прыжки</b> делает |
- +------+----------------------------------+-----------------------------------------+
––– input –––
for port in 1306 2306 3306; do echo "Data from c:tbl2 on port $port:"; mysql -h0 -P$port -e "SELECT * FROM c:tbl2 ORDER BY id ASC;"; done
––– output –––
Data from c:tbl2 on port 1306:
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | id | f | a | b | j | m | s | e | d | v | fv |
+ Data from c:tbl2 on port 2306:
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
+ Data from c:tbl2 on port 3306:
- | 2 | Кот прыжки делает | 5 | 1.100000 | {"движение":"прыжки"} | 10,11 | кот | 1 | 0 | 111111111,222222222 | 0.900000,0.800000,0.700000,0.600000 |
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'tbl2' in search request
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl2 on port 2306:
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
- | 2 | Кот прыжки делает | 5 | 1.100000 | {"движение":"прыжки"} | 10,11 | кот | 1 | 0 | 111111111,222222222 | 0.900000,0.800000,0.700000,0.600000 |
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- Data from c:tbl2 on port 3306:
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | id | f | a | b | j | m | s | e | d | v | fv |
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
- | 1 | Текст на русском | 84 | 2.710000 | {"ключ":"значение"} | 4,5,6 | строка | 0 | 0 | 123456789012345678,987654321098765432 | 0.400000,0.300000,0.200000,0.100000 |
- | 2 | Кот прыжки делает | 5 | 1.100000 | {"движение":"прыжки"} | 10,11 | кот | 1 | 0 | 111111111,222222222 | 0.900000,0.800000,0.700000,0.600000 |
- +------+----------------------------------+------+----------+-------------------------------------+-------+--------------+------+------+---------------------------------------+-------------------------------------+
––– input –––
rm -f /tmp/stopwords.txt /tmp/exceptions.txt /tmp/wordforms.txt /var/lib/manticore/tbl3.conf dump.sql
––– output –––
OK |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/core/test-alter-rebuild-knn.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -P9306 -v -h0 -E -e "create table t(f text); insert into t values(1, 'abc'); select * from t;"
––– output –––
OK
––– input –––
mysql -P9306 -v -h0 -E -e "alter table t add column v1 FLOAT_VECTOR knn_type='hnsw' knn_dims='3' hnsw_similarity='COSINE'; insert into t(id,v1) values(2, (0.2,0.2,0.2)); select * from t;"
––– output –––
OK
––– input –––
mysql -P9306 -v -h0 -E -e "flush ramchunk t; select * from t;"
––– output –––
--------------
flush ramchunk t
--------------
- --------------
+ ERROR 1064 (42000) at line 1: table 't': FLUSH RAMCHUNK failed; TABLE UNUSABLE (knn library not loaded)
- select * from t
- --------------
- *************************** 1. row ***************************
- id: 1
- f: abc
- v1: 0.000000,0.000000,0.000000
- *************************** 2. row ***************************
- id: 2
- f:
- v1: 0.57735032,0.57735032,0.57735032
––– input –––
mysql -P9306 -v -h0 -E -e "alter table t add column v2 FLOAT_VECTOR knn_type='hnsw' knn_dims='3' hnsw_similarity='L2'; insert into t(id,v2) values(3,(1,1,1)); flush ramchunk t; select * from t"
––– output –––
--------------
alter table t add column v2 FLOAT_VECTOR knn_type='hnsw' knn_dims='3' hnsw_similarity='L2'
--------------
- --------------
+ ERROR 1064 (42000) at line 1: table t: unknown local table in ALTER request
- insert into t(id,v2) values(3,(1,1,1))
- --------------
- --------------
- flush ramchunk t
- --------------
- --------------
- select * from t
- --------------
- *************************** 1. row ***************************
- id: 1
- f: abc
- v1: 0.000000,0.000000,0.000000
- v2: 0.000000,0.000000,0.000000
- *************************** 2. row ***************************
- id: 3
- f:
- v1:
- v2: 1.000000,1.000000,1.000000
- *************************** 3. row ***************************
- id: 2
- f:
- v1: 0.57735032,0.57735032,0.57735032
- v2: 0.000000,0.000000,0.000000
––– input –––
stdbuf -oL searchd --stopwait > /dev/null
––– output –––
OK
––– input –––
rm -fr /var/lib/manticore/t/*.spknn
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -P9306 -h0 -v -E -e "select * from t where knn(v2, 10, (0.5,0.5,0.5))"
––– output –––
--------------
select * from t where knn(v2, 10, (0.5,0.5,0.5))
--------------
- ERROR 1064 (42000) at line 1: table t: KNN index not loaded
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
––– input –––
mysql -P9306 -h0 -v -E -e "alter table t rebuild knn; select *, knn_dist() dist from t where knn(v2, 10, (0.5,0.5,0.5)) order by dist asc, id asc"
––– output –––
--------------
alter table t rebuild knn
--------------
- --------------
+ ERROR 1064 (42000) at line 1: table t: unknown local table in ALTER request
- select *, knn_dist() dist from t where knn(v2, 10, (0.5,0.5,0.5)) order by dist asc, id asc
- --------------
- *************************** 1. row ***************************
- id: 3
- f:
- v1:
- v2: 1.000000,1.000000,1.000000
- @knn_dist: 0.750000
- dist: 0.750000
- *************************** 2. row ***************************
- id: 2
- f:
- v1: 0.57735032,0.57735032,0.57735032
- v2: 0.000000,0.000000,0.000000
- @knn_dist: 0.750000
- dist: 0.750000
- *************************** 3. row ***************************
- id: 1
- f: abc
- v1: 0.000000,0.000000,0.000000
- v2: 0.000000,0.000000,0.000000
- @knn_dist: 0.750000
- dist: 0.750000 |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/bugs/3602-knn-dist-attribute-error.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd ${SEARCHD_ARGS:-} > /dev/null
––– output –––
OK
––– 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 –––
OK
––– input –––
mysql -h0 -P9306 -e 'drop table if exists companysearch;'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "create table companysearch(f text, embeddings float_vector knn_type='hnsw' knn_dims='2' hnsw_similarity='l2');"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 'companysearch': knn library not loaded
––– input –––
mysql -h0 -P9306 -e "insert into companysearch values(1, 'web', (0,0));"
––– output –––
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM companysearch WHERE knn(embeddings, 5, (1,1)) AND MATCH('web') OPTION ranker=expr('knn_dist()');"
––– output –––
- ERROR 1064 (42000) at line 1: table companysearch: KNN_DIST() attribute not available in this context
+ ERROR 1064 (42000) at line 1: unknown local table(s) 'companysearch' in search request |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/sharding/replication/test-distributed-inserts-with-replication.rec––– input –––
apt-get install -y jq > /dev/null; echo $?
––– output –––
OK
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log;fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log;fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE CLUSTER ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "JOIN CLUSTER ${CLUSTER_NAME} AT '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "SHOW STATUS LIKE 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do echo "Checking status for port $port:"; timeout 10 bash -c "while ! mysql -h0 -P$port -e \"SHOW STATUS LIKE 'cluster_replication_node_state'\G\" | grep -q 'Value: synced'; do sleep 1; done" && echo "Port $port: Node is synced." || echo "Port $port: Node is not synced (Value: closed or other)."; done
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE IF EXISTS test2;"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE replication:test2 (id BIGINT, model TEXT, storage_capacity INTEGER, color STRING, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector FLOAT_VECTOR KNN_TYPE='hnsw' KNN_DIMS='4' HNSW_SIMILARITY='l2') SHARDS='3' RF='2';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_node_state'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES FROM SYSTEM\G"
––– output –––
*************************** 1. row ***************************
Table: system.sharding_queue
Type: rt
*************************** 2. row ***************************
Table: system.sharding_state
Type: rt
*************************** 3. row ***************************
Table: system.sharding_table
Type: rt
- *************************** 4. row ***************************
- Table: system.test2_s0
- Type: rt
- *************************** 5. row ***************************
- Table: system.test2_s1
- Type: rt
- *************************** 6. row ***************************
- Table: system.test2_s2
- Type: rt
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES FROM SYSTEM\G"
––– output –––
*************************** 1. row ***************************
Table: system.sharding_queue
Type: rt
*************************** 2. row ***************************
Table: system.sharding_state
Type: rt
*************************** 3. row ***************************
Table: system.sharding_table
Type: rt
- *************************** 4. row ***************************
- Table: system.test2_s0
- Type: rt
- *************************** 5. row ***************************
- Table: system.test2_s1
- Type: rt
- *************************** 6. row ***************************
- Table: system.test2_s2
- Type: rt
––– input –––
mysql -P1306 -h0 -e "SHOW TABLES;"
––– output –––
- +-------+-------------+
- | Table | Type |
- +-------+-------------+
- | test2 | distributed |
- +-------+-------------+
––– input –––
mysql -P2306 -h0 -e "SHOW TABLES;"
––– output –––
OK
––– input –––
mysql -P1306 -h0 -e "DESCRIBE test2;"
––– output –––
- +------------------+--------------+----------------+
+ ERROR 1064 (42000) at line 1: no such table 'test2'
- | Field | Type | Properties |
- +------------------+--------------+----------------+
- | id | bigint | |
- | model | text | indexed stored |
- | storage_capacity | uint | |
- | color | string | |
- | release_year | uint | |
- | price | float | |
- | discounted_price | float | |
- | sold | bool | |
- | date_added | timestamp | |
- | product_codes | mva | |
- | values | mva64 | |
- | additional_info | json | |
- | vector | float_vector | knn |
- +------------------+--------------+----------------+
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 1, "doc": {"model": "iPhone 13 Pro", "storage_capacity": 256, "color": "silver", "release_year": 2021, "price": 1099.99, "discounted_price": 989.99, "sold": 1, "date_added": 1591362342000, "product_codes": [1,2,3], "values": [523456764345678976], "additional_info": {"features": ["ProMotion display", "A15 Bionic chip"]}, "vector": [0.773448,0.312478,0.137971,0.459821]}}' | jq '.result'
––– output –––
- "created"
+ null
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 2, "doc": {"model": "Galaxy S21 Ultra", "storage_capacity": 128, "color": "black", "release_year": 2021, "price": 1199.99, "discounted_price": 1099.99, "sold": 1, "date_added": 1609459200000, "product_codes": [4,5,6], "values": [1234567890123456789], "additional_info": {"features": ["Dynamic AMOLED 2X", "Exynos 2100"]}, "vector": [0.5,0.4,0.3,0.2]}}' | jq '.result'
––– output –––
- "created"
+ null
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 3, "doc": {"model": "Pixel 6", "storage_capacity": 128, "color": "white", "release_year": 2021, "price": 599.99, "discounted_price": 549.99, "sold": false, "date_added": 1630454400000, "product_codes": [7,8,9], "values": [987654321987654321], "additional_info": {"features": ["Smooth display", "Google Tensor chip"]}, "vector": [0.8,0.6,0.4,0.2]}}' | jq '.result'
––– output –––
- "created"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | 1 | iPhone 13 Pro | 256 | silver | 2021 | 1099.989990 | 989.989990 | 1 | 2224442480 | 1,2,3 | 523456764345678976 | {"features":["ProMotion display","A15 Bionic chip"]} | 0.773448,0.312478,0.137971,0.459821 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 987654321987654321 | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/replace -d '{"cluster": "replication", "table": "test2", "id": 1, "doc": {"model": "Updated Model", "storage_capacity": 512, "color": "black", "release_year": 2022, "price": 1399.99, "discounted_price": 1299.99, "sold": false, "date_added": 1630454400000, "product_codes": [10,11,12], "values": [987654321987654321], "additional_info": {"features": ["New feature 1", "New feature 2"]}, "vector": [0.7,0.8,0.9,1.0]}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1199.989990 | 1099.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 987654321987654321 | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/update -d '{"cluster": "replication", "table": "test2", "id": 2, "doc": {"price": 1099.99, "discounted_price": 999.99}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 987654321987654321 | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/update -d '{"cluster": "replication", "table": "test2", "id": 2, "doc": {"price": 1099.99, "discounted_price": 999.99}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 3 | Pixel 6 | 128 | white | 2021 | 599.989990 | 549.989990 | 0 | 2661794816 | 7,8,9 | 987654321987654321 | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/delete -d '{"cluster": "replication", "table": "test2", "id": 3}' | jq '.result'
––– output –––
- "deleted"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+--------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+--------------------------------------------------+-------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+--------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/delete -d '{"cluster": "replication", "table": "test2", "id": 3}' | jq '.result'
––– output –––
- "not found"
+ null
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 4, "doc": {"model": "Updated iPhone 14", "storage_capacity": 512, "color": "black", "release_year": 2022, "price": 1299.99, "discounted_price": 1199.99, "sold": 1, "date_added": 1661990400, "product_codes": [19,20,21], "values": [1234567890123456789],"additional_info": {"features": ["A16 Bionic","Dynamic Island","Improved camera"]},"vector": [0.1,0.2,0.3,0.4]}}' | jq -e '.error' && echo "Duplicate ID test passed!" || echo "Duplicate ID test failed!"
––– output –––
- null
+ {
- Duplicate ID test failed!
+ "type": "action_request_validation_exception",
+ "reason": "table 'test2' is not in any cluster, use just 'test2'",
+ "table": "test2"
+ }
+ Duplicate ID test passed!
––– input –––
(for i in {1..10}; do curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": '$((10 + $i))', "doc": {"model": "Device '$i'", "storage_capacity": 64, "color": "black", "release_year": 2023, "price": 499.99, "discounted_price": 449.99, "sold": 0, "date_added": 1672531200, "product_codes": [1,2,3], "values": [1234567890123456789], "additional_info": {"features": ["Feature 1","Feature 2"]}, "vector": [0.1,0.2,0.3,0.4]}}' & done; wait) | jq -s 'map(select(.created == true)) | length == 10' > /dev/null && echo "Parallel insert test passed!" || echo "Parallel insert test failed!"
––– output –––
OK
––– input –––
sleep 2; mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+----------------------------------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+----------------------------------------------------------------+-------------------------------------+
- | 1 | Updated Model | 512 | black | 2022 | 1399.989990 | 1299.989990 | 0 | 2661794816 | 10,11,12 | 987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
- | 2 | Galaxy S21 Ultra | 128 | black | 2021 | 1099.989990 | 999.989990 | 1 | 3141431296 | 4,5,6 | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- | 4 | Updated iPhone 14 | 512 | black | 2022 | 1299.989990 | 1199.989990 | 1 | 1661990400 | 19,20,21 | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island","Improved camera"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 11 | Device 1 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 12 | Device 2 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 13 | Device 3 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 14 | Device 4 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 15 | Device 5 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 16 | Device 6 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 17 | Device 7 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 18 | Device 8 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 19 | Device 9 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 20 | Device 10 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+----------------------------------------------------------------+-------------------------------------+
––– input –––
sleep 2; mysql -h0 -P1306 -e "SELECT * FROM test2 WHERE id BETWEEN 11 AND 20 ORDER BY id ASC;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- | 11 | Device 1 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 12 | Device 2 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 13 | Device 3 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 14 | Device 4 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 15 | Device 5 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 16 | Device 6 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 17 | Device 7 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 18 | Device 8 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 19 | Device 9 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- | 20 | Device 10 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 WHERE id = 20;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- | id | model | storage_capacity | color | release_year | price | discounted_price | sold | date_added | product_codes | values | additional_info | vector |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- | 20 | Device 10 | 64 | black | 2023 | 499.989990 | 449.989990 | 0 | 1672531200 | 1,2,3 | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
––– input –––
rm -f bulk.json bulk_insert.json bulk_update.json bulk_delete.json bulk_operations.json; if [[ ! -f bulk.json && ! -f bulk_insert.json && ! -f bulk_update.json && ! -f bulk_delete.json && ! -f bulk_operations.json ]]; then echo "All temporary files deleted successfully."; else echo "Error: Some temporary files were not deleted."; fi
––– output –––
OK |
Related issue #4103
Related PR in MCL - manticoresoftware/columnar#128
Overview
This document describes the implementation of on-the-fly filtering for KNN (K-Nearest Neighbor) searches in Manticore Search. The feature integrates filtering directly into the HNSW search algorithm, ensuring that the search continues until
kfiltered candidates are found, rather than findingktotal candidates and then filtering them.Note: This feature is disabled by default and must be explicitly enabled using the
filteroption in both SQL and JSON API queries.Project Goals
hnswlibkfiltered results are found (or all matching results if fewer thankexist)Note: Full-text
MATCH()queries are not currently supported in on-the-fly filtering. They are still applied as post-filtering even whenfilter=1is enabled. See Limitations section for details.Technical Architecture
License Separation Strategy
To avoid license incompatibility between Manticore Search (GPLv3) and
hnswlib(Apache 2.0), a license-safe callback mechanism was implemented:columnar/knnlibrary (Apache 2.0) provides a license-safe callback interface (knn::FilterCallback_fn)FilterCallbackWrapper_cclass within the KNN library adapts the license-safe callback tohnswlib::BaseFilterFunctorFilter Flow
Implementation Details
1. HNSW Algorithm Modifications (
./hnswlib/hnswalg.h)Modified
searchKnnMethodThe
searchKnnmethod now:BaseFilterFunctor* isIdAllowedparametersearchBaseLayerSTModified
searchBaseLayerSTMethodKey changes:
kparameter (defaults to 0) to specify the target number of filtered resultsuse_filterflag:const bool use_filter = isIdAllowed && k > 0;use_filteris true, continues searching untilkfiltered candidates are found (oreftotal candidates ifkis 0 or not met)top_candidatesif they pass theisIdAllowedfilterTermination Logic:
2. KNN Library Changes (
./knn/)Header Changes (
knn.h)namespace hnswlib { class BaseFilterFunctor; }using FilterCallback_fn = std::function<bool(uint32_t)>;KNN_i::CreateIterator: Now accepts both::hnswlib::BaseFilterFunctor* pFilterandFilterCallback_fn fnFilterKNNIndex_i::Search: Now accepts both filter parametersLIB_VERSION: From9to10to reflect API changesImplementation Changes (
knn.cpp)Added
FilterCallbackWrapper_cclass: Wrapsknn::FilterCallback_fnto adapt it tohnswlib::BaseFilterFunctorUpdated
HNSWIndex_c::Search: UsesFilterCallbackWrapper_ciffnFilteris providedUpdated
KNN_c::CreateIterator: Accepts and passes both filter parametersIterator Changes (
iterator.h,iterator.cpp)CreateIteratorfunction: Accepts both::hnswlib::BaseFilterFunctor*andknn::FilterCallback_fnRowidIteratorKNN_cconstructor: Passes both filter parameters totIndex.Search3. Manticore Search Daemon Changes (
./src/)knnmisc.cppChangesRemoved:
#include "hnswlib.h"(license separation)#include <functional>(usingautofor lambda instead)KNNFilterCallback_cclass (moved to KNN library)Added:
CreateKNNIteratorthat:ISphFilter*andGetDocinfoByRowID_fnby valueboolindicating if a document passes the filterknn::FilterCallback_fnto the KNN librarym_bOnTheFlyFilteringis enabledKey Implementation:
knnmisc.hChangesCreateKNNIteratorsignature: AddedCSphQueryContext* pCtx,const columnar::Columnar_i* pColumnar,const BYTE* pBlobPool,GetDocinfoByRowID_fn fnGetDocinfoparametersCreateKNNIteratorssignature: Same parameter additionsGetDocinfoByRowID_fntype:using GetDocinfoByRowID_fn = std::function<const CSphRowitem * (RowID_t tRowID)>;sphinx.hChangesm_bOnTheFlyFilteringfield: New boolean field inKnnSearchSettings_tstructure (defaults tofalse)m_iKdefault:m_iKdefaults to0(meaning auto, which will be set tom_iLimitbySetupKNNLimit)searchdsql.cppChangesParseKNNOptionfunction: Added support forfilteroption in SQL (setsm_bOnTheFlyFiltering)SetupKNNLimit: Setsm_iKtom_iLimitifm_iK < 0(k=auto behavior)sphinxjsonquery.cppChangesParseKNNQueryfunction: Added support forfilteroption in JSON APIfilteris a boolean, it directly setsm_bOnTheFlyFilteringfilteris an object (containing filter criteria),m_bOnTheFlyFilteringis automatically set totruefilteris used for both the option and filter criteriaSetupKNNLimit: Setsm_iKtom_iLimitifm_iK < 0(k=auto behavior)sphinx.cppChangesCreateKNNIterator: Now passestCtx,m_pColumnar.get(),m_tBlobAttrs.GetReadPtr(), and a lambda forGetDocinfoByRowIDthisand callsGetDocinfoByRowID(tRowID)to retrieve docinfo for expression filtersCMakeLists.txtChangeshnswlibdependenciestarget_link_libraries(lmanticore PUBLIC hnswlib::hnswlib)target_include_directoriesfor hnswlibhnswlibcmake/GetColumnar.cmakeChangesNEED_KNN_API: From9to10to match the bumped version incolumnar/knn/knn.hFiles Modified
HNSW Library
hnswlib/hnswalg.h: ModifiedsearchKnnandsearchBaseLayerSTmethodsColumnar KNN Library (
./knn/)knn/knn.h: AddedFilterCallback_fn, updated interfaces, bumpedLIB_VERSIONto 10knn/knn.cpp: AddedFilterCallbackWrapper_c, updated implementationsknn/iterator.h: UpdatedCreateIteratorsignatureknn/iterator.cpp: UpdatedCreateIteratorandRowidIteratorKNN_cimplementationManticore Search Daemon
src/knnmisc.cpp: Removed hnswlib dependency, added conditional lambda-based filter callback (only whenm_bOnTheFlyFilteringis enabled), supports both columnar and expression filters viaGetDocinfoByRowID_fn. CalcFilter is skipped - onlyEval()is called directly.src/knnmisc.h: Updated function signatures, addedGetDocinfoByRowID_fntype definitionsrc/sphinx.h: Addedm_bOnTheFlyFilteringfield toKnnSearchSettings_tsrc/searchdsql.cpp: Added support forfilteroption in SQL parser, callsSetupKNNLimitsrc/sphinxjsonquery.cpp: Added support forfilteroption in JSON API parser (boolean or object), callsSetupKNNLimitsrc/knnmisc.cpp: AddedSetupKNNLimitfunction to setm_iK = m_iLimitwhenm_iK < 0(k=auto)src/sphinx.cpp: Updated calls to pass filter context andGetDocinfoByRowIDlambdasrc/CMakeLists.txt: Removed hnswlib dependenciescmake/GetColumnar.cmake: UpdatedNEED_KNN_APIto 10API Changes
Version Bump
LIB_VERSION: Bumped from9to10incolumnar/knn/knn.hNEED_KNN_API: Updated from9to10incmake/GetColumnar.cmakeNew Interface Methods
All methods now accept both:
::hnswlib::BaseFilterFunctor* pFilter(for internal use)knn::FilterCallback_fn fnFilter(license-safe public API)If
fnFilteris provided, it takes precedence and is wrapped inFilterCallbackWrapper_c.How It Works
Filter Evaluation Process
CreateKNNIteratoris calledtKNN.m_bOnTheFlyFilteringis enabled AND filters exist AND (pColumnarorfnGetDocinfois available)pCtx->m_pFilter->SetColumnar(pColumnar)is called ifpColumnaris not nullpCtx->m_pFilter->SetBlobStorage(pBlobPool)is called ifpBlobPoolis not nullGetDocinfoByRowIDfunctionCSphMatchobject is created with the document'sRowID_tm_pStaticis set usingfnGetDocinfoif available (needed for expression filters)m_pDynamicis set tonullptr(CalcFilter is not called - it's skipped)ISphFilter::Eval()directlykfiltered candidates are foundMATCH()queries are always applied as post-filtering (limitation). If on-the-fly filtering is disabled, all filters are post-filtered.HNSW Search Algorithm Integration
The modified
searchBaseLayerSTmethod:top_candidatesuse_filteris true)kfiltered candidates are found (whenuse_filteris true)isIdAllowed) to determine if a candidate should be includeduse_filteris true andtop_candidates.size() < k, exploration continues regardless ofeforlowerBoundConfiguration
Default Behavior
m_bOnTheFlyFiltering = false)kresults, then filters them)k=autobehavior: Whenkis not specified (or set to-1), it defaults to the query'sLIMITvalue (which is 20 by default if not specified). This is handled bySetupKNNLimit().Enabling On-the-Fly Filtering
To enable on-the-fly filtering, use the
filteroption:SQL:
knn(vec, 5, (0.5, 0.6, 0.7, 0.8), {filter=1})JSON: When
filteris an object (containing filter criteria), on-the-fly filtering is automatically enabled. If you want to control it explicitly, use"filter": true(but note this conflicts with filter criteria object - you cannot have both).Usage
Enabling On-the-Fly Filtering
On-the-fly filtering is disabled by default for backward compatibility. To enable it, use the
filteroption:SQL Syntax
Without on-the-fly filtering (default - post-filtering):
With on-the-fly filtering enabled:
JSON API Syntax
Without on-the-fly filtering (default - post-filtering):
{ "index": "test_knn_filter", "knn": { "field": "vec", "query_vector": [0.5, 0.6, 0.7, 0.8], "k": 5, "filter": { "equals": {"category": 1} } } }With on-the-fly filtering enabled:
{ "index": "test_knn_filter", "knn": { "field": "vec", "query_vector": [0.5, 0.6, 0.7, 0.8], "k": 5, "filter": { "equals": {"category": 1} } } }Note: In JSON API, when
filteris an object (containing filter criteria), on-the-fly filtering is automatically enabled. Iffilteris a boolean, it directly controls the option. You cannot have both a booleanfilterand a filter criteria object in the same request.Notes
kparameter inknn()specifies how many results to return from each HNSW index/chunkktotal results (each chunk returnskresults)filter=1(SQL) to enable. In JSON, whenfilteris an object (criteria), it's automatically enabled.kfiltered results (or all matching results if fewer thankexist)kfiltered results are found (for attribute filters only)kresults, then filters them)MATCH()queries are always applied as post-filtering, even whenfilter=1is enabled (see Limitations)Performance Costs
Filter Evaluation Overhead
kfinal candidates)Columnar Storage Access
Search Continuation
kto find enough filtered resultsefparameter controls search breadthefvalues help find filtered results faster but increase computationFilter Complexity
category=1):Multiple Evaluations
Performance Testing (not done)
To validate performance in production:
kandefparameter valuesLimitations
Full-Text MATCH() Queries
On-the-fly filtering currently only applies attribute filters, not full-text
MATCH()queries.When you use a query like:
The on-the-fly filtering will apply
category=1filter during the HNSW search, however theMATCH('special')filter will be applied as post-filtering (after the search completes).Why this limitation exists:
m_pFilterinCSphQueryContextonly contains attribute filters, not full-text queriesImpact:
MATCH()clauses will still apply full-text matching as post-filteringExample: