Skip to content

Renew: cli table tests #3020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Renew: cli table tests #3020

wants to merge 19 commits into from

Conversation

donhardman
Copy link
Contributor

Type of Change (select one):

  • Bug fix
  • New feature
  • Documentation update

Description of the Change:

Related Issue (provide the link):

Copy link

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 33
❌ Failed: 1
⏳ Duration: 496s
👉 Check Action Results for commit 9a84650
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{SEMVER} %{COMMITDATE} dev     |
| Columnar  | columnar %{SEMVER} %{COMMITDATE}  |
| Secondary | secondary %{SEMVER} %{COMMITDATE} |
| KNN       | knn %{SEMVER} %{COMMITDATE}       |
- | Buddy     | buddy v%{SEMVER}                     |
+ | Buddy     | buddy v3.17.0-g8fc1b8            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{SEMVER} %{COMMITDATE} dev"},{"Component":"Columnar","Version":"columnar %{SEMVER} %{COMMITDATE}"},{"Component":"Secondary","Version":"secondary %{SEMVER} %{COMMITDATE}"},{"Component":"KNN","Version":"knn %{SEMVER} %{COMMITDATE}"},{"Component":"Buddy","Version":"buddy v%{SEMVER}"}]}]
+ [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"6.3.9 9a84650cf@25012902 dev"},{"Component":"Columnar","Version":"columnar 2.3.1 0be00ac@25012210"},{"Component":"Secondary","Version":"secondary 2.3.1 0be00ac@25012210"},{"Component":"KNN","Version":"knn 2.3.1 0be00ac@25012210"},{"Component":"Buddy","Version":"buddy v3.17.0-g8fc1b8"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
- {"Counter":"version","Value":"%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) (buddy v%{SEMVER})"},
+ {"Counter":"version","Value":"6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.0-g8fc1b8)"},
{"Counter":"mysql_version","Value":"%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | awk '!/row.*in set/'; echo
––– output –––
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Counter                       | Value                                                                                                                                         |
+ | Counter                       | Value                                                                                                                                                  |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | uptime                        | %{NUMBER}                                                                                                                                             |
+ | uptime                        | 1                                                                                                                                                      |
- | connections                   | %{NUMBER}                                                                                                                                            |
+ | connections                   | 25                                                                                                                                                     |
- | maxed_out                     | %{NUMBER}                                                                                                                                             |
+ | maxed_out                     | 0                                                                                                                                                      |
- | version                       | %{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) (buddy v%{SEMVER}) |
+ | version                       | 6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.0-g8fc1b8) |
- | mysql_version                 | %{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})                |
+ | mysql_version                 | 6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210)                         |
- | command_search                | %{NUMBER}                                                                                                                                             |
+ | command_search                | 5                                                                                                                                                      |
- | command_excerpt               | 0                                                                                                                                             |
+ | command_excerpt               | 0                                                                                                                                                      |
- | command_update                | 0                                                                                                                                             |
+ | command_update                | 0                                                                                                                                                      |
- | command_keywords              | 0                                                                                                                                             |
+ | command_keywords              | 0                                                                                                                                                      |
- | command_persist               | 0                                                                                                                                             |
+ | command_persist               | 0                                                                                                                                                      |
- | command_status                | %{NUMBER}                                                                                                                                             |
+ | command_status                | 4                                                                                                                                                      |
- | command_flushattrs            | 0                                                                                                                                             |
+ | command_flushattrs            | 0                                                                                                                                                      |
- | command_sphinxql              | 0                                                                                                                                             |
+ | command_sphinxql              | 0                                                                                                                                                      |
- | command_ping                  | 0                                                                                                                                             |
+ | command_ping                  | 0                                                                                                                                                      |
- | command_delete                | 0                                                                                                                                             |
+ | command_delete                | 0                                                                                                                                                      |
- | command_set                   | 0                                                                                                                                             |
+ | command_set                   | 0                                                                                                                                                      |
- | command_insert                | %{NUMBER}                                                                                                                                             |
+ | command_insert                | 1                                                                                                                                                      |
- | command_replace               | 0                                                                                                                                             |
+ | command_replace               | 0                                                                                                                                                      |
- | command_commit                | 0                                                                                                                                             |
+ | command_commit                | 0                                                                                                                                                      |
- | command_suggest               | 0                                                                                                                                             |
+ | command_suggest               | 0                                                                                                                                                      |
- | command_json                  | 0                                                                                                                                             |
+ | command_json                  | 0                                                                                                                                                      |
- | command_callpq                | 0                                                                                                                                             |
+ | command_callpq                | 0                                                                                                                                                      |
- | command_cluster               | 0                                                                                                                                             |
+ | command_cluster               | 0                                                                                                                                                      |
- | command_getfield              | 0                                                                                                                                             |
+ | command_getfield              | 0                                                                                                                                                      |
- | insert_replace_stats_ms_avg   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_avg   | 1.695 1.695 1.695                                                                                                                                      |
- | insert_replace_stats_ms_min   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_min   | 1.695 1.695 1.695                                                                                                                                      |
- | insert_replace_stats_ms_max   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_max   | 1.695 1.695 1.695                                                                                                                                      |
- | insert_replace_stats_ms_pct95 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct95 | 1.695 1.695 1.695                                                                                                                                      |
- | insert_replace_stats_ms_pct99 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct99 | 1.695 1.695 1.695                                                                                                                                      |
- | search_stats_ms_avg           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_avg           | 0.133 0.133 0.133                                                                                                                                      |
- | search_stats_ms_min           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_min           | 0.087 0.087 0.087                                                                                                                                      |
- | search_stats_ms_max           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_max           | 0.178 0.178 0.178                                                                                                                                      |
- | search_stats_ms_pct95         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct95         | 0.138 0.138 0.138                                                                                                                                      |
- | search_stats_ms_pct99         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct99         | 0.138 0.138 0.138                                                                                                                                      |
- | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_min           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_min           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_max           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_max           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                            |
- | agent_connect                 | 0                                                                                                                                             |
+ | agent_connect                 | 0                                                                                                                                                      |
- | agent_tfo                     | 0                                                                                                                                             |
+ | agent_tfo                     | 0                                                                                                                                                      |
- | agent_retry                   | 0                                                                                                                                             |
+ | agent_retry                   | 0                                                                                                                                                      |
- | queries                       | %{NUMBER}                                                                                                                                             |
+ | queries                       | 6                                                                                                                                                      |
- | dist_queries                  | 0                                                                                                                                             |
+ | dist_queries                  | 0                                                                                                                                                      |
- | workers_total                 | %{NUMBER}                                                                                                                                             |
+ | workers_total                 | 4                                                                                                                                                      |
- | workers_active                | %{NUMBER}                                                                                                                                             |
+ | workers_active                | 4                                                                                                                                                      |
- | workers_clients               | %{NUMBER}                                                                                                                                             |
+ | workers_clients               | 2                                                                                                                                                      |
- | workers_clients_vip           | 0                                                                                                                                             |
+ | workers_clients_vip           | 0                                                                                                                                                      |
- | workers_clients_buddy         | %{NUMBER}                                                                                                                                             |
+ | workers_clients_buddy         | 1                                                                                                                                                      |
- | work_queue_length             | 6                                                                                                                                             |
+ | work_queue_length             | 6                                                                                                                                                      |
- | load                          | 0.00 0.00 0.00                                                                                                                                |
+ | load                          | 0.00 0.00 0.00                                                                                                                                         |
- | load_primary                  | 0.00 0.00 0.00                                                                                                                                |
+ | load_primary                  | 0.00 0.00 0.00                                                                                                                                         |
- | load_secondary                | 0.00 0.00 0.00                                                                                                                                |
+ | load_secondary                | 0.00 0.00 0.00                                                                                                                                         |
- | query_wall                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | query_wall                    | 0.000                                                                                                                                                  |
- | query_cpu                     | OFF                                                                                                                                           |
+ | query_cpu                     | OFF                                                                                                                                                    |
- | dist_wall                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wall                     | 0.000                                                                                                                                                  |
- | dist_local                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_local                    | 0.000                                                                                                                                                  |
- | dist_wait                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wait                     | 0.000                                                                                                                                                  |
- | query_reads                   | OFF                                                                                                                                           |
+ | query_reads                   | OFF                                                                                                                                                    |
- | query_readkb                  | OFF                                                                                                                                           |
+ | query_readkb                  | OFF                                                                                                                                                    |
- | query_readtime                | OFF                                                                                                                                           |
+ | query_readtime                | OFF                                                                                                                                                    |
- | avg_query_wall                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_query_wall                | 0.000                                                                                                                                                  |
- | avg_query_cpu                 | OFF                                                                                                                                           |
+ | avg_query_cpu                 | OFF                                                                                                                                                    |
- | avg_dist_wall                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wall                 | 0.000                                                                                                                                                  |
- | avg_dist_local                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_local                | 0.000                                                                                                                                                  |
- | avg_dist_wait                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wait                 | 0.000                                                                                                                                                  |
- | avg_query_reads               | OFF                                                                                                                                           |
+ | avg_query_reads               | OFF                                                                                                                                                    |
- | avg_query_readkb              | OFF                                                                                                                                           |
+ | avg_query_readkb              | OFF                                                                                                                                                    |
- | avg_query_readtime            | OFF                                                                                                                                           |
+ | avg_query_readtime            | OFF                                                                                                                                                    |
- | qcache_max_bytes              | 16777216                                                                                                                                      |
+ | qcache_max_bytes              | 16777216                                                                                                                                               |
- | qcache_thresh_msec            | 3000                                                                                                                                          |
+ | qcache_thresh_msec            | 3000                                                                                                                                                   |
- | qcache_ttl_sec                | 60                                                                                                                                            |
+ | qcache_ttl_sec                | 60                                                                                                                                                     |
- | qcache_cached_queries         | 0                                                                                                                                             |
+ | qcache_cached_queries         | 0                                                                                                                                                      |
- | qcache_used_bytes             | 0                                                                                                                                             |
+ | qcache_used_bytes             | 0                                                                                                                                                      |
- | qcache_hits                   | 0                                                                                                                                             |
+ | qcache_hits                   | 0                                                                                                                                                      |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

Copy link

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 33
❌ Failed: 1
⏳ Duration: 495s
👉 Check Action Results for commit 9a84650
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{SEMVER} %{COMMITDATE} dev     |
| Columnar  | columnar %{SEMVER} %{COMMITDATE}  |
| Secondary | secondary %{SEMVER} %{COMMITDATE} |
| KNN       | knn %{SEMVER} %{COMMITDATE}       |
- | Buddy     | buddy v%{SEMVER}                     |
+ | Buddy     | buddy v3.17.0-g8fc1b8            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{SEMVER} %{COMMITDATE} dev"},{"Component":"Columnar","Version":"columnar %{SEMVER} %{COMMITDATE}"},{"Component":"Secondary","Version":"secondary %{SEMVER} %{COMMITDATE}"},{"Component":"KNN","Version":"knn %{SEMVER} %{COMMITDATE}"},{"Component":"Buddy","Version":"buddy v%{SEMVER}"}]}]
+ [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"6.3.9 9a84650cf@25012902 dev"},{"Component":"Columnar","Version":"columnar 2.3.1 0be00ac@25012210"},{"Component":"Secondary","Version":"secondary 2.3.1 0be00ac@25012210"},{"Component":"KNN","Version":"knn 2.3.1 0be00ac@25012210"},{"Component":"Buddy","Version":"buddy v3.17.0-g8fc1b8"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
- {"Counter":"version","Value":"%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) (buddy v%{SEMVER})"},
+ {"Counter":"version","Value":"6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.0-g8fc1b8)"},
{"Counter":"mysql_version","Value":"%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | awk '!/row.*in set/'; echo
––– output –––
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Counter                       | Value                                                                                                                                         |
+ | Counter                       | Value                                                                                                                                                  |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | uptime                        | %{NUMBER}                                                                                                                                             |
+ | uptime                        | 1                                                                                                                                                      |
- | connections                   | %{NUMBER}                                                                                                                                            |
+ | connections                   | 25                                                                                                                                                     |
- | maxed_out                     | %{NUMBER}                                                                                                                                             |
+ | maxed_out                     | 0                                                                                                                                                      |
- | version                       | %{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) (buddy v%{SEMVER}) |
+ | version                       | 6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.0-g8fc1b8) |
- | mysql_version                 | %{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})                |
+ | mysql_version                 | 6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210)                         |
- | command_search                | %{NUMBER}                                                                                                                                             |
+ | command_search                | 5                                                                                                                                                      |
- | command_excerpt               | 0                                                                                                                                             |
+ | command_excerpt               | 0                                                                                                                                                      |
- | command_update                | 0                                                                                                                                             |
+ | command_update                | 0                                                                                                                                                      |
- | command_keywords              | 0                                                                                                                                             |
+ | command_keywords              | 0                                                                                                                                                      |
- | command_persist               | 0                                                                                                                                             |
+ | command_persist               | 0                                                                                                                                                      |
- | command_status                | %{NUMBER}                                                                                                                                             |
+ | command_status                | 4                                                                                                                                                      |
- | command_flushattrs            | 0                                                                                                                                             |
+ | command_flushattrs            | 0                                                                                                                                                      |
- | command_sphinxql              | 0                                                                                                                                             |
+ | command_sphinxql              | 0                                                                                                                                                      |
- | command_ping                  | 0                                                                                                                                             |
+ | command_ping                  | 0                                                                                                                                                      |
- | command_delete                | 0                                                                                                                                             |
+ | command_delete                | 0                                                                                                                                                      |
- | command_set                   | 0                                                                                                                                             |
+ | command_set                   | 0                                                                                                                                                      |
- | command_insert                | %{NUMBER}                                                                                                                                             |
+ | command_insert                | 1                                                                                                                                                      |
- | command_replace               | 0                                                                                                                                             |
+ | command_replace               | 0                                                                                                                                                      |
- | command_commit                | 0                                                                                                                                             |
+ | command_commit                | 0                                                                                                                                                      |
- | command_suggest               | 0                                                                                                                                             |
+ | command_suggest               | 0                                                                                                                                                      |
- | command_json                  | 0                                                                                                                                             |
+ | command_json                  | 0                                                                                                                                                      |
- | command_callpq                | 0                                                                                                                                             |
+ | command_callpq                | 0                                                                                                                                                      |
- | command_cluster               | 0                                                                                                                                             |
+ | command_cluster               | 0                                                                                                                                                      |
- | command_getfield              | 0                                                                                                                                             |
+ | command_getfield              | 0                                                                                                                                                      |
- | insert_replace_stats_ms_avg   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_avg   | 1.763 1.763 1.763                                                                                                                                      |
- | insert_replace_stats_ms_min   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_min   | 1.763 1.763 1.763                                                                                                                                      |
- | insert_replace_stats_ms_max   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_max   | 1.763 1.763 1.763                                                                                                                                      |
- | insert_replace_stats_ms_pct95 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct95 | 1.763 1.763 1.763                                                                                                                                      |
- | insert_replace_stats_ms_pct99 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct99 | 1.763 1.763 1.763                                                                                                                                      |
- | search_stats_ms_avg           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_avg           | 0.125 0.125 0.125                                                                                                                                      |
- | search_stats_ms_min           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_min           | 0.083 0.083 0.083                                                                                                                                      |
- | search_stats_ms_max           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_max           | 0.196 0.196 0.196                                                                                                                                      |
- | search_stats_ms_pct95         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct95         | 0.135 0.135 0.135                                                                                                                                      |
- | search_stats_ms_pct99         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct99         | 0.135 0.135 0.135                                                                                                                                      |
- | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_min           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_min           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_max           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_max           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                            |
- | agent_connect                 | 0                                                                                                                                             |
+ | agent_connect                 | 0                                                                                                                                                      |
- | agent_tfo                     | 0                                                                                                                                             |
+ | agent_tfo                     | 0                                                                                                                                                      |
- | agent_retry                   | 0                                                                                                                                             |
+ | agent_retry                   | 0                                                                                                                                                      |
- | queries                       | %{NUMBER}                                                                                                                                             |
+ | queries                       | 6                                                                                                                                                      |
- | dist_queries                  | 0                                                                                                                                             |
+ | dist_queries                  | 0                                                                                                                                                      |
- | workers_total                 | %{NUMBER}                                                                                                                                             |
+ | workers_total                 | 4                                                                                                                                                      |
- | workers_active                | %{NUMBER}                                                                                                                                             |
+ | workers_active                | 4                                                                                                                                                      |
- | workers_clients               | %{NUMBER}                                                                                                                                             |
+ | workers_clients               | 2                                                                                                                                                      |
- | workers_clients_vip           | 0                                                                                                                                             |
+ | workers_clients_vip           | 0                                                                                                                                                      |
- | workers_clients_buddy         | %{NUMBER}                                                                                                                                             |
+ | workers_clients_buddy         | 1                                                                                                                                                      |
- | work_queue_length             | 6                                                                                                                                             |
+ | work_queue_length             | 6                                                                                                                                                      |
- | load                          | 0.00 0.00 0.00                                                                                                                                |
+ | load                          | 0.00 0.00 0.00                                                                                                                                         |
- | load_primary                  | 0.00 0.00 0.00                                                                                                                                |
+ | load_primary                  | 0.00 0.00 0.00                                                                                                                                         |
- | load_secondary                | 0.00 0.00 0.00                                                                                                                                |
+ | load_secondary                | 0.00 0.00 0.00                                                                                                                                         |
- | query_wall                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | query_wall                    | 0.000                                                                                                                                                  |
- | query_cpu                     | OFF                                                                                                                                           |
+ | query_cpu                     | OFF                                                                                                                                                    |
- | dist_wall                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wall                     | 0.000                                                                                                                                                  |
- | dist_local                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_local                    | 0.000                                                                                                                                                  |
- | dist_wait                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wait                     | 0.000                                                                                                                                                  |
- | query_reads                   | OFF                                                                                                                                           |
+ | query_reads                   | OFF                                                                                                                                                    |
- | query_readkb                  | OFF                                                                                                                                           |
+ | query_readkb                  | OFF                                                                                                                                                    |
- | query_readtime                | OFF                                                                                                                                           |
+ | query_readtime                | OFF                                                                                                                                                    |
- | avg_query_wall                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_query_wall                | 0.000                                                                                                                                                  |
- | avg_query_cpu                 | OFF                                                                                                                                           |
+ | avg_query_cpu                 | OFF                                                                                                                                                    |
- | avg_dist_wall                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wall                 | 0.000                                                                                                                                                  |
- | avg_dist_local                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_local                | 0.000                                                                                                                                                  |
- | avg_dist_wait                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wait                 | 0.000                                                                                                                                                  |
- | avg_query_reads               | OFF                                                                                                                                           |
+ | avg_query_reads               | OFF                                                                                                                                                    |
- | avg_query_readkb              | OFF                                                                                                                                           |
+ | avg_query_readkb              | OFF                                                                                                                                                    |
- | avg_query_readtime            | OFF                                                                                                                                           |
+ | avg_query_readtime            | OFF                                                                                                                                                    |
- | qcache_max_bytes              | 16777216                                                                                                                                      |
+ | qcache_max_bytes              | 16777216                                                                                                                                               |
- | qcache_thresh_msec            | 3000                                                                                                                                          |
+ | qcache_thresh_msec            | 3000                                                                                                                                                   |
- | qcache_ttl_sec                | 60                                                                                                                                            |
+ | qcache_ttl_sec                | 60                                                                                                                                                     |
- | qcache_cached_queries         | 0                                                                                                                                             |
+ | qcache_cached_queries         | 0                                                                                                                                                      |
- | qcache_used_bytes             | 0                                                                                                                                             |
+ | qcache_used_bytes             | 0                                                                                                                                                      |
- | qcache_hits                   | 0                                                                                                                                             |
+ | qcache_hits                   | 0                                                                                                                                                      |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

Copy link

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 33
❌ Failed: 1
⏳ Duration: 503s
👉 Check Action Results for commit 9a84650
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{SEMVER} %{COMMITDATE} dev     |
| Columnar  | columnar %{SEMVER} %{COMMITDATE}  |
| Secondary | secondary %{SEMVER} %{COMMITDATE} |
| KNN       | knn %{SEMVER} %{COMMITDATE}       |
- | Buddy     | buddy v%{SEMVER}                     |
+ | Buddy     | buddy v3.17.0-g8fc1b8            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{SEMVER} %{COMMITDATE} dev"},{"Component":"Columnar","Version":"columnar %{SEMVER} %{COMMITDATE}"},{"Component":"Secondary","Version":"secondary %{SEMVER} %{COMMITDATE}"},{"Component":"KNN","Version":"knn %{SEMVER} %{COMMITDATE}"},{"Component":"Buddy","Version":"buddy v%{SEMVER}"}]}]
+ [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"6.3.9 9a84650cf@25012902 dev"},{"Component":"Columnar","Version":"columnar 2.3.1 0be00ac@25012210"},{"Component":"Secondary","Version":"secondary 2.3.1 0be00ac@25012210"},{"Component":"KNN","Version":"knn 2.3.1 0be00ac@25012210"},{"Component":"Buddy","Version":"buddy v3.17.0-g8fc1b8"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
- {"Counter":"version","Value":"%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) (buddy v%{SEMVER})"},
+ {"Counter":"version","Value":"6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.0-g8fc1b8)"},
{"Counter":"mysql_version","Value":"%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | awk '!/row.*in set/'; echo
––– output –––
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Counter                       | Value                                                                                                                                         |
+ | Counter                       | Value                                                                                                                                                  |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | uptime                        | %{NUMBER}                                                                                                                                             |
+ | uptime                        | 0                                                                                                                                                      |
- | connections                   | %{NUMBER}                                                                                                                                            |
+ | connections                   | 25                                                                                                                                                     |
- | maxed_out                     | %{NUMBER}                                                                                                                                             |
+ | maxed_out                     | 0                                                                                                                                                      |
- | version                       | %{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) (buddy v%{SEMVER}) |
+ | version                       | 6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.0-g8fc1b8) |
- | mysql_version                 | %{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})                |
+ | mysql_version                 | 6.3.9 9a84650cf@25012902 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210)                         |
- | command_search                | %{NUMBER}                                                                                                                                             |
+ | command_search                | 5                                                                                                                                                      |
- | command_excerpt               | 0                                                                                                                                             |
+ | command_excerpt               | 0                                                                                                                                                      |
- | command_update                | 0                                                                                                                                             |
+ | command_update                | 0                                                                                                                                                      |
- | command_keywords              | 0                                                                                                                                             |
+ | command_keywords              | 0                                                                                                                                                      |
- | command_persist               | 0                                                                                                                                             |
+ | command_persist               | 0                                                                                                                                                      |
- | command_status                | %{NUMBER}                                                                                                                                             |
+ | command_status                | 4                                                                                                                                                      |
- | command_flushattrs            | 0                                                                                                                                             |
+ | command_flushattrs            | 0                                                                                                                                                      |
- | command_sphinxql              | 0                                                                                                                                             |
+ | command_sphinxql              | 0                                                                                                                                                      |
- | command_ping                  | 0                                                                                                                                             |
+ | command_ping                  | 0                                                                                                                                                      |
- | command_delete                | 0                                                                                                                                             |
+ | command_delete                | 0                                                                                                                                                      |
- | command_set                   | 0                                                                                                                                             |
+ | command_set                   | 0                                                                                                                                                      |
- | command_insert                | %{NUMBER}                                                                                                                                             |
+ | command_insert                | 1                                                                                                                                                      |
- | command_replace               | 0                                                                                                                                             |
+ | command_replace               | 0                                                                                                                                                      |
- | command_commit                | 0                                                                                                                                             |
+ | command_commit                | 0                                                                                                                                                      |
- | command_suggest               | 0                                                                                                                                             |
+ | command_suggest               | 0                                                                                                                                                      |
- | command_json                  | 0                                                                                                                                             |
+ | command_json                  | 0                                                                                                                                                      |
- | command_callpq                | 0                                                                                                                                             |
+ | command_callpq                | 0                                                                                                                                                      |
- | command_cluster               | 0                                                                                                                                             |
+ | command_cluster               | 0                                                                                                                                                      |
- | command_getfield              | 0                                                                                                                                             |
+ | command_getfield              | 0                                                                                                                                                      |
- | insert_replace_stats_ms_avg   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_avg   | 1.707 1.707 1.707                                                                                                                                      |
- | insert_replace_stats_ms_min   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_min   | 1.707 1.707 1.707                                                                                                                                      |
- | insert_replace_stats_ms_max   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_max   | 1.707 1.707 1.707                                                                                                                                      |
- | insert_replace_stats_ms_pct95 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct95 | 1.707 1.707 1.707                                                                                                                                      |
- | insert_replace_stats_ms_pct99 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct99 | 1.707 1.707 1.707                                                                                                                                      |
- | search_stats_ms_avg           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_avg           | 0.112 0.112 0.112                                                                                                                                      |
- | search_stats_ms_min           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_min           | 0.083 0.083 0.083                                                                                                                                      |
- | search_stats_ms_max           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_max           | 0.175 0.175 0.175                                                                                                                                      |
- | search_stats_ms_pct95         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct95         | 0.120 0.120 0.120                                                                                                                                      |
- | search_stats_ms_pct99         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct99         | 0.120 0.120 0.120                                                                                                                                      |
- | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_min           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_min           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_max           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_max           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                            |
- | agent_connect                 | 0                                                                                                                                             |
+ | agent_connect                 | 0                                                                                                                                                      |
- | agent_tfo                     | 0                                                                                                                                             |
+ | agent_tfo                     | 0                                                                                                                                                      |
- | agent_retry                   | 0                                                                                                                                             |
+ | agent_retry                   | 0                                                                                                                                                      |
- | queries                       | %{NUMBER}                                                                                                                                             |
+ | queries                       | 6                                                                                                                                                      |
- | dist_queries                  | 0                                                                                                                                             |
+ | dist_queries                  | 0                                                                                                                                                      |
- | workers_total                 | %{NUMBER}                                                                                                                                             |
+ | workers_total                 | 4                                                                                                                                                      |
- | workers_active                | %{NUMBER}                                                                                                                                             |
+ | workers_active                | 4                                                                                                                                                      |
- | workers_clients               | %{NUMBER}                                                                                                                                             |
+ | workers_clients               | 2                                                                                                                                                      |
- | workers_clients_vip           | 0                                                                                                                                             |
+ | workers_clients_vip           | 0                                                                                                                                                      |
- | workers_clients_buddy         | %{NUMBER}                                                                                                                                             |
+ | workers_clients_buddy         | 1                                                                                                                                                      |
- | work_queue_length             | 6                                                                                                                                             |
+ | work_queue_length             | 6                                                                                                                                                      |
- | load                          | 0.00 0.00 0.00                                                                                                                                |
+ | load                          | 0.00 0.00 0.00                                                                                                                                         |
- | load_primary                  | 0.00 0.00 0.00                                                                                                                                |
+ | load_primary                  | 0.00 0.00 0.00                                                                                                                                         |
- | load_secondary                | 0.00 0.00 0.00                                                                                                                                |
+ | load_secondary                | 0.00 0.00 0.00                                                                                                                                         |
- | query_wall                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | query_wall                    | 0.000                                                                                                                                                  |
- | query_cpu                     | OFF                                                                                                                                           |
+ | query_cpu                     | OFF                                                                                                                                                    |
- | dist_wall                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wall                     | 0.000                                                                                                                                                  |
- | dist_local                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_local                    | 0.000                                                                                                                                                  |
- | dist_wait                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wait                     | 0.000                                                                                                                                                  |
- | query_reads                   | OFF                                                                                                                                           |
+ | query_reads                   | OFF                                                                                                                                                    |
- | query_readkb                  | OFF                                                                                                                                           |
+ | query_readkb                  | OFF                                                                                                                                                    |
- | query_readtime                | OFF                                                                                                                                           |
+ | query_readtime                | OFF                                                                                                                                                    |
- | avg_query_wall                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_query_wall                | 0.000                                                                                                                                                  |
- | avg_query_cpu                 | OFF                                                                                                                                           |
+ | avg_query_cpu                 | OFF                                                                                                                                                    |
- | avg_dist_wall                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wall                 | 0.000                                                                                                                                                  |
- | avg_dist_local                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_local                | 0.000                                                                                                                                                  |
- | avg_dist_wait                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wait                 | 0.000                                                                                                                                                  |
- | avg_query_reads               | OFF                                                                                                                                           |
+ | avg_query_reads               | OFF                                                                                                                                                    |
- | avg_query_readkb              | OFF                                                                                                                                           |
+ | avg_query_readkb              | OFF                                                                                                                                                    |
- | avg_query_readtime            | OFF                                                                                                                                           |
+ | avg_query_readtime            | OFF                                                                                                                                                    |
- | qcache_max_bytes              | 16777216                                                                                                                                      |
+ | qcache_max_bytes              | 16777216                                                                                                                                               |
- | qcache_thresh_msec            | 3000                                                                                                                                          |
+ | qcache_thresh_msec            | 3000                                                                                                                                                   |
- | qcache_ttl_sec                | 60                                                                                                                                            |
+ | qcache_ttl_sec                | 60                                                                                                                                                     |
- | qcache_cached_queries         | 0                                                                                                                                             |
+ | qcache_cached_queries         | 0                                                                                                                                                      |
- | qcache_used_bytes             | 0                                                                                                                                             |
+ | qcache_used_bytes             | 0                                                                                                                                                      |
- | qcache_hits                   | 0                                                                                                                                             |
+ | qcache_hits                   | 0                                                                                                                                                      |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

Copy link
Contributor

@manticoresearch manticoresearch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls fix the test:

+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{SEMVER} %{COMMITDATE} dev     |
| Columnar  | columnar %{SEMVER} %{COMMITDATE}  |
| Secondary | secondary %{SEMVER} %{COMMITDATE} |
| KNN       | knn %{SEMVER} %{COMMITDATE}       |
- | Buddy     | buddy v%{SEMVER}                     |
+ | Buddy     | buddy v3.17.0-g8fc1b8            |
+-----------+----------------------------------+

@sanikolaev sanikolaev removed their request for review February 1, 2025 03:18
Copy link

github-actions bot commented Feb 4, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 33
❌ Failed: 1
⏳ Duration: 503s
👉 Check Action Results for commit e7feaf4
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
- | Daemon    | %{     |
+ | Daemon    | 7.0.1 e7feaf415@25020402 dev     |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
- | Buddy     | buddy v%{SEMVER}                     |
+ | Buddy     | buddy v3.17.3-g71c5ad            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":5,"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":"Buddy","Version":"buddy v%{SEMVER}"}]}]
+ [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"7.0.1 e7feaf415@25020402 dev"},{"Component":"Columnar","Version":"columnar 2.3.1 0be00ac@25012210"},{"Component":"Secondary","Version":"secondary 2.3.1 0be00ac@25012210"},{"Component":"KNN","Version":"knn 2.3.1 0be00ac@25012210"},{"Component":"Buddy","Version":"buddy v3.17.3-g71c5ad"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
- {"Counter":"version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (buddy v%{SEMVER})"},
+ {"Counter":"version","Value":"7.0.1 e7feaf415@25020402 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.3-g71c5ad)"},
{"Counter":"mysql_version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | awk '!/row.*in set/'; echo
––– output –––
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Counter                       | Value                                                                                                                                         |
+ | Counter                       | Value                                                                                                                                                  |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
- | uptime                        | %{NUMBER}                                                                                                                                             |
+ | uptime                        | 1                                                                                                                                                      |
- | connections                   | %{NUMBER}                                                                                                                                            |
+ | connections                   | 25                                                                                                                                                     |
- | maxed_out                     | %{NUMBER}                                                                                                                                             |
+ | maxed_out                     | 0                                                                                                                                                      |
- | version                       | %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (buddy v%{SEMVER}) |
+ | version                       | 7.0.1 e7feaf415@25020402 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.3-g71c5ad) |
- | mysql_version                 | %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})                |
+ | mysql_version                 | 7.0.1 e7feaf415@25020402 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210)                         |
- | command_search                | %{NUMBER}                                                                                                                                             |
+ | command_search                | 5                                                                                                                                                      |
- | command_excerpt               | 0                                                                                                                                             |
+ | command_excerpt               | 0                                                                                                                                                      |
- | command_update                | 0                                                                                                                                             |
+ | command_update                | 0                                                                                                                                                      |
- | command_keywords              | 0                                                                                                                                             |
+ | command_keywords              | 0                                                                                                                                                      |
- | command_persist               | 0                                                                                                                                             |
+ | command_persist               | 0                                                                                                                                                      |
- | command_status                | %{NUMBER}                                                                                                                                             |
+ | command_status                | 4                                                                                                                                                      |
- | command_flushattrs            | 0                                                                                                                                             |
+ | command_flushattrs            | 0                                                                                                                                                      |
- | command_sphinxql              | 0                                                                                                                                             |
+ | command_sphinxql              | 0                                                                                                                                                      |
- | command_ping                  | 0                                                                                                                                             |
+ | command_ping                  | 0                                                                                                                                                      |
- | command_delete                | 0                                                                                                                                             |
+ | command_delete                | 0                                                                                                                                                      |
- | command_set                   | 0                                                                                                                                             |
+ | command_set                   | 0                                                                                                                                                      |
- | command_insert                | %{NUMBER}                                                                                                                                             |
+ | command_insert                | 1                                                                                                                                                      |
- | command_replace               | 0                                                                                                                                             |
+ | command_replace               | 0                                                                                                                                                      |
- | command_commit                | 0                                                                                                                                             |
+ | command_commit                | 0                                                                                                                                                      |
- | command_suggest               | 0                                                                                                                                             |
+ | command_suggest               | 0                                                                                                                                                      |
- | command_json                  | 0                                                                                                                                             |
+ | command_json                  | 0                                                                                                                                                      |
- | command_callpq                | 0                                                                                                                                             |
+ | command_callpq                | 0                                                                                                                                                      |
- | command_cluster               | 0                                                                                                                                             |
+ | command_cluster               | 0                                                                                                                                                      |
- | command_getfield              | 0                                                                                                                                             |
+ | command_getfield              | 0                                                                                                                                                      |
- | insert_replace_stats_ms_avg   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_avg   | 1.717 1.717 1.717                                                                                                                                      |
- | insert_replace_stats_ms_min   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_min   | 1.717 1.717 1.717                                                                                                                                      |
- | insert_replace_stats_ms_max   | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_max   | 1.717 1.717 1.717                                                                                                                                      |
- | insert_replace_stats_ms_pct95 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct95 | 1.717 1.717 1.717                                                                                                                                      |
- | insert_replace_stats_ms_pct99 | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | insert_replace_stats_ms_pct99 | 1.717 1.717 1.717                                                                                                                                      |
- | search_stats_ms_avg           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_avg           | 0.147 0.147 0.147                                                                                                                                      |
- | search_stats_ms_min           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_min           | 0.111 0.111 0.111                                                                                                                                      |
- | search_stats_ms_max           | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_max           | 0.183 0.183 0.183                                                                                                                                      |
- | search_stats_ms_pct95         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct95         | 0.157 0.157 0.157                                                                                                                                      |
- | search_stats_ms_pct99         | #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                             |
+ | search_stats_ms_pct99         | 0.157 0.157 0.157                                                                                                                                      |
- | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_min           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_min           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_max           | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_max           | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                            |
- | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                   |
+ | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                            |
- | agent_connect                 | 0                                                                                                                                             |
+ | agent_connect                 | 0                                                                                                                                                      |
- | agent_tfo                     | 0                                                                                                                                             |
+ | agent_tfo                     | 0                                                                                                                                                      |
- | agent_retry                   | 0                                                                                                                                             |
+ | agent_retry                   | 0                                                                                                                                                      |
- | queries                       | %{NUMBER}                                                                                                                                             |
+ | queries                       | 6                                                                                                                                                      |
- | dist_queries                  | 0                                                                                                                                             |
+ | dist_queries                  | 0                                                                                                                                                      |
- | workers_total                 | %{NUMBER}                                                                                                                                             |
+ | workers_total                 | 4                                                                                                                                                      |
- | workers_active                | %{NUMBER}                                                                                                                                             |
+ | workers_active                | 4                                                                                                                                                      |
- | workers_clients               | %{NUMBER}                                                                                                                                             |
+ | workers_clients               | 2                                                                                                                                                      |
- | workers_clients_vip           | 0                                                                                                                                             |
+ | workers_clients_vip           | 0                                                                                                                                                      |
- | workers_clients_buddy         | %{NUMBER}                                                                                                                                             |
+ | workers_clients_buddy         | 1                                                                                                                                                      |
- | work_queue_length             | 6                                                                                                                                             |
+ | work_queue_length             | 6                                                                                                                                                      |
- | load                          | 0.00 0.00 0.00                                                                                                                                |
+ | load                          | 0.00 0.00 0.00                                                                                                                                         |
- | load_primary                  | 0.00 0.00 0.00                                                                                                                                |
+ | load_primary                  | 0.00 0.00 0.00                                                                                                                                         |
- | load_secondary                | 0.00 0.00 0.00                                                                                                                                |
+ | load_secondary                | 0.00 0.00 0.00                                                                                                                                         |
- | query_wall                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | query_wall                    | 0.000                                                                                                                                                  |
- | query_cpu                     | OFF                                                                                                                                           |
+ | query_cpu                     | OFF                                                                                                                                                    |
- | dist_wall                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wall                     | 0.000                                                                                                                                                  |
- | dist_local                    | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_local                    | 0.000                                                                                                                                                  |
- | dist_wait                     | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | dist_wait                     | 0.000                                                                                                                                                  |
- | query_reads                   | OFF                                                                                                                                           |
+ | query_reads                   | OFF                                                                                                                                                    |
- | query_readkb                  | OFF                                                                                                                                           |
+ | query_readkb                  | OFF                                                                                                                                                    |
- | query_readtime                | OFF                                                                                                                                           |
+ | query_readtime                | OFF                                                                                                                                                    |
- | avg_query_wall                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_query_wall                | 0.000                                                                                                                                                  |
- | avg_query_cpu                 | OFF                                                                                                                                           |
+ | avg_query_cpu                 | OFF                                                                                                                                                    |
- | avg_dist_wall                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wall                 | 0.000                                                                                                                                                  |
- | avg_dist_local                | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_local                | 0.000                                                                                                                                                  |
- | avg_dist_wait                 | #!/[0-9]{1}.[0-9]{3}/!#                                                                                                                                         |
+ | avg_dist_wait                 | 0.000                                                                                                                                                  |
- | avg_query_reads               | OFF                                                                                                                                           |
+ | avg_query_reads               | OFF                                                                                                                                                    |
- | avg_query_readkb              | OFF                                                                                                                                           |
+ | avg_query_readkb              | OFF                                                                                                                                                    |
- | avg_query_readtime            | OFF                                                                                                                                           |
+ | avg_query_readtime            | OFF                                                                                                                                                    |
- | qcache_max_bytes              | 16777216                                                                                                                                      |
+ | qcache_max_bytes              | 16777216                                                                                                                                               |
- | qcache_thresh_msec            | 3000                                                                                                                                          |
+ | qcache_thresh_msec            | 3000                                                                                                                                                   |
- | qcache_ttl_sec                | 60                                                                                                                                            |
+ | qcache_ttl_sec                | 60                                                                                                                                                     |
- | qcache_cached_queries         | 0                                                                                                                                             |
+ | qcache_cached_queries         | 0                                                                                                                                                      |
- | qcache_used_bytes             | 0                                                                                                                                             |
+ | qcache_used_bytes             | 0                                                                                                                                                      |
- | qcache_hits                   | 0                                                                                                                                             |
+ | qcache_hits                   | 0                                                                                                                                                      |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

Copy link

github-actions bot commented Feb 5, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 34
❌ Failed: 1
⏳ Duration: 494s
👉 Check Action Results for commit 85c5607
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{VERSION}     |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
- | Buddy     | buddy %{VERSION}                     |
+ | Buddy     | buddy v3.17.3-g71c5ad            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":5,"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":"Buddy","Version":"buddy %{SEMVER}"}]}]
+ [{"total":5,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"7.0.1 85c56072a@25020502 dev"},{"Component":"Columnar","Version":"columnar 2.3.1 0be00ac@25012210"},{"Component":"Secondary","Version":"secondary 2.3.1 0be00ac@25012210"},{"Component":"KNN","Version":"knn 2.3.1 0be00ac@25012210"},{"Component":"Buddy","Version":"buddy v3.17.3-g71c5ad"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
- {"Counter":"version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (buddy %{SEMVER})"},
+ {"Counter":"version","Value":"7.0.1 85c56072a@25020502 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.3-g71c5ad)"},
{"Counter":"mysql_version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | grep "rows in set"
––– output –––
- %{NUMBER} rows in set
+ 75 rows in set (0.001 sec)
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

Copy link

github-actions bot commented Feb 5, 2025

clt

❌ CLT tests in test/clt-tests/buddy/
✅ OK: 4
❌ Failed: 1
⏳ Duration: 101s
👉 Check Action Results for commit a2e09d4
Failed tests:

test/clt-tests/buddy/test-fuzzy-search.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
0
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
debconf: delaying package configuration, since apt-utils is not installed
0
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=4 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
0
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.*\(min_infix_len='2'\).*/\1/"
––– output –––
min_infix_len='2'
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
+----------+
| count(*) |
+----------+
|  1000000 |
+----------+
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id   | username          | s    |
+------+-------------------+------+
|  196 | BRICE MULLIN      | a    |
|  307 | GRICELDA SKELTON  | a    |
|  363 | LAURICE SOLIZ     | a    |
|  478 | ERICH LLAMAS      | a    |
|  490 | LATRICE MANCILLA  | a    |
|  608 | MAURICE PRATHER   | a    |
|  659 | BRICE OLIVARES    | a    |
|  697 | PATRICE WOOD      | a    |
|  822 | JUNITA RICHARD    | a    |
|  835 | AUREA RICO        | a    |
|  854 | ROXANNE BRICE     | a    |
| 1122 | RICH MOLL         | a    |
| 1134 | JOELLA RICHARD    | a    |
| 1160 | MINDY HEINRICH    | a    |
| 1224 | YADIRA RICHARDSON | a    |
| 1379 | BRICE ALLMAN      | a    |
| 1574 | RICO VALENZUELA   | a    |
| 1602 | BEATRICE LOVE     | a    |
| 1822 | RICHELLE ROE      | a    |
| 2136 | CHIQUITA RICHTER  | a    |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+----------------------+------+
| id   | username             | s    |
+------+----------------------+------+
|  675 | CONCEPTION ABERNATHY | a    |
|  964 | BERNARDINA OSHEA     | a    |
| 1354 | VERNA VITALE         | a    |
| 1784 | BERNADETTE HALES     | a    |
| 1839 | BERNARDINA MCMILLAN  | a    |
| 1864 | ERNA ULLOA           | a    |
| 1948 | SAMIRA ABERNATHY     | a    |
| 2238 | JUDI BERNAL          | a    |
| 2446 | MERNA GAITHER        | a    |
| 3065 | BERNADINE HIBBARD    | a    |
| 3195 | BERNADETTE SHELTON   | a    |
| 3688 | VERNA GASTON         | a    |
| 3781 | BERNARDINE WILKINS   | a    |
| 4370 | ERNA VITALE          | a    |
| 4637 | TARSHA HERNANDEZ     | a    |
| 4662 | FERNANDO HOUCK       | a    |
| 5044 | CONSTANCE ABERNATHY  | a    |
| 5580 | LAVERNA GORMAN       | a    |
| 5582 | FERNANDE ISRAEL      | a    |
| 5798 | LAVERNA STORM        | a    |
+------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id   | username          | s    |
+------+-------------------+------+
|    8 | DAMIAN SOMERS     | a    |
|   16 | TAMI WHELAN       | a    |
|   19 | DARCY SANDBERG    | a    |
|   20 | RANEE BROUGHTON   | a    |
|   21 | STEPHEN ALLMAN    | a    |
|   30 | AMANDA KEY        | a    |
|   37 | ELFRIEDA HANKS    | a    |
|   41 | NANNIE WILLINGHAM | a    |
|   42 | YOULANDA TROUT    | a    |
|   44 | ANTHONY SMOOT     | a    |
|   47 | FRANCIE BUNDY     | a    |
|   51 | LATASHA POLAND    | a    |
|   53 | SHEMEKA DURAND    | a    |
|   54 | LATANYA ARNDT     | a    |
|   56 | JANELLE LASTER    | a    |
|   57 | NANNIE HANNON     | a    |
|   58 | GRANVILLE VALDEZ  | a    |
|   59 | DEDE SPANN        | a    |
|   60 | DANIEL MERRITT    | a    |
|   63 | SAUL HOWLAND      | a    |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+--------------------+------+
| id   | username           | s    |
+------+--------------------+------+
|  118 | ANTONIA VANWINKLE  | a    |
|  220 | ANTONIA MELGAR     | a    |
|  391 | KARYL TONEY        | a    |
|  761 | TONYA SHERRILL     | a    |
| 1527 | LEONE TONEY        | a    |
| 2132 | TONIA RAPP         | a    |
| 2195 | TONIE HOANG        | a    |
| 2333 | LATONIA VILLASENOR | a    |
| 2357 | TONIE BARNHILL     | a    |
| 2430 | TONIA BOSTICK      | a    |
| 2584 | TONI SPENCE        | a    |
| 2725 | ANTONIETTA CINTRON | a    |
| 2881 | ANTONINA HASKELL   | a    |
| 3318 | TONY DUPRE         | a    |
| 3582 | ANTONIETTA BAEZ    | a    |
| 3858 | TONEY SCHOEN       | a    |
| 4366 | ROCHEL TONEY       | a    |
| 4608 | ANTONIA DRISCOLL   | a    |
| 4657 | TONYA PARRIS       | a    |
| 4800 | TONY WEISS         | a    |
+------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id     | username          | s    |
+--------+-------------------+------+
| 999973 | KEITH SNOW        | a    |
| 999855 | DOROTHA WISEMAN   | a    |
| 999723 | SCOTT OLSON       | a    |
| 999264 | RUTHANN GREENE    | a    |
| 999250 | MINH LANDERS      | a    |
| 999127 | MALENA RUTHERFORD | a    |
| 999120 | RUTHANNE CARDOSO  | a    |
| 998893 | IRWIN SOUTHARD    | a    |
| 998691 | MITCHELL SEITZ    | a    |
| 998539 | ELSA SEITZ        | a    |
| 998526 | SCOTT CARRION     | a    |
| 997945 | RUTHE SCHENK      | a    |
| 997815 | MINH GOODWIN      | a    |
| 997558 | ARTIE SOUTH       | a    |
| 997189 | BETTY SOUTHERN    | a    |
| 997187 | SUSAN SCOTT       | a    |
| 997098 | OTHA FAJARDO      | a    |
| 997074 | SCOTT FLANDERS    | a    |
| 996804 | SCOTT ENOS        | a    |
| 996461 | EDRA HIGGINBOTHAM | a    |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id     | username          | s    |
+--------+-------------------+------+
| 999973 | KEITH SNOW        | a    |
| 999855 | DOROTHA WISEMAN   | a    |
| 999723 | SCOTT OLSON       | a    |
| 999264 | RUTHANN GREENE    | a    |
| 999250 | MINH LANDERS      | a    |
| 999127 | MALENA RUTHERFORD | a    |
| 999120 | RUTHANNE CARDOSO  | a    |
| 998893 | IRWIN SOUTHARD    | a    |
| 998691 | MITCHELL SEITZ    | a    |
| 998539 | ELSA SEITZ        | a    |
| 998526 | SCOTT CARRION     | a    |
| 997945 | RUTHE SCHENK      | a    |
| 997815 | MINH GOODWIN      | a    |
| 997558 | ARTIE SOUTH       | a    |
| 997189 | BETTY SOUTHERN    | a    |
| 997187 | SUSAN SCOTT       | a    |
| 997098 | OTHA FAJARDO      | a    |
| 997074 | SCOTT FLANDERS    | a    |
| 996804 | SCOTT ENOS        | a    |
| 996461 | EDRA HIGGINBOTHAM | a    |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id     | username          | s    |
+--------+-------------------+------+
| 999973 | KEITH SNOW        | a    |
| 999964 | CANDACE BOOTH     | a    |
| 999855 | DOROTHA WISEMAN   | a    |
| 999723 | SCOTT OLSON       | a    |
| 999264 | RUTHANN GREENE    | a    |
| 999197 | HEATH MCNAMARA    | a    |
| 999127 | MALENA RUTHERFORD | a    |
| 999120 | RUTHANNE CARDOSO  | a    |
| 999013 | HEATHER HAMMOCK   | a    |
| 998893 | IRWIN SOUTHARD    | a    |
| 998526 | SCOTT CARRION     | a    |
| 998000 | EDYTH CARLISLE    | a    |
| 997945 | RUTHE SCHENK      | a    |
| 997558 | ARTIE SOUTH       | a    |
| 997544 | HEATHER CLAUSEN   | a    |
| 997189 | BETTY SOUTHERN    | a    |
| 997187 | SUSAN SCOTT       | a    |
| 997098 | OTHA FAJARDO      | a    |
| 997074 | SCOTT FLANDERS    | a    |
| 996804 | SCOTT ENOS        | a    |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy="1";"
––– output –––
+--------+-------------------+------+
| id     | username          | s    |
+--------+-------------------+------+
| 999973 | KEITH SNOW        | a    |
| 999855 | DOROTHA WISEMAN   | a    |
| 999723 | SCOTT OLSON       | a    |
| 999264 | RUTHANN GREENE    | a    |
| 999250 | MINH LANDERS      | a    |
| 999127 | MALENA RUTHERFORD | a    |
| 999120 | RUTHANNE CARDOSO  | a    |
| 998893 | IRWIN SOUTHARD    | a    |
| 998691 | MITCHELL SEITZ    | a    |
| 998539 | ELSA SEITZ        | a    |
| 998526 | SCOTT CARRION     | a    |
| 997945 | RUTHE SCHENK      | a    |
| 997815 | MINH GOODWIN      | a    |
| 997558 | ARTIE SOUTH       | a    |
| 997189 | BETTY SOUTHERN    | a    |
| 997187 | SUSAN SCOTT       | a    |
| 997098 | OTHA FAJARDO      | a    |
| 997074 | SCOTT FLANDERS    | a    |
| 996804 | SCOTT ENOS        | a    |
| 996461 | EDRA HIGGINBOTHAM | a    |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+------------------------+------+
| id     | username               | s    |
+--------+------------------------+------+
| 999961 | JONELL ENRIGHT         | a    |
| 999932 | JONELL NIX             | a    |
| 999926 | JONAH BURNSIDE         | a    |
| 999922 | LAVONNA JONAS          | a    |
| 999860 | JOHNETTA DO            | a    |
| 999552 | JOHNNY CARNES          | a    |
| 999548 | JOHNATHAN PEPPER       | a    |
| 999509 | JOHNATHAN STUBBLEFIELD | a    |
| 999171 | JOHNNY ABRAMS          | a    |
| 999033 | AGNUS STJOHN           | a    |
| 998835 | SCARLETT JONAS         | a    |
| 998798 | JOHNATHON READ         | a    |
| 998467 | JOHNSON JEAN           | a    |
| 998393 | JOHN BACH              | a    |
| 998306 | JOHNNY TAFOYA          | a    |
| 998304 | JONG SAUER             | a    |
| 998303 | JONATHON DUPRE         | a    |
| 998278 | JOHNNIE LOR            | a    |
| 998181 | JONA ELROD             | a    |
| 998154 | JONG YORK              | a    |
+--------+------------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+-------+--------------------+------+
| id    | username           | s    |
+-------+--------------------+------+
| 10028 | ANJANETTE PORTILLO | a    |
| 10056 | JANETTE LYNCH      | a    |
| 10629 | LANETTE SWAIN      | a    |
| 10874 | JANESSA MONTEZ     | a    |
| 10977 | RUTHANN LANEY      | a    |
| 11038 | DESIRE LANE        | a    |
| 11056 | LANELLE WATTS      | a    |
| 11397 | MELITA LANE        | a    |
| 11415 | MARYJANE HOLTZ     | a    |
| 11569 | JANETH SELBY       | a    |
| 11758 | JANETTE GANTT      | a    |
| 11834 | JANELLE DRIGGERS   | a    |
| 12100 | JAE COBLE          | a    |
| 12171 | JAE MEARS          | a    |
| 12185 | JANESSA BALTAZAR   | a    |
| 12237 | JANENE APODACA     | a    |
| 12490 | LANELLE ARNDT      | a    |
| 12536 | JANENE WALDRON     | a    |
| 12540 | ANJANETTE STAGGS   | a    |
| 12642 | HERSHEL LANEY      | a    |
+-------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+------+---------------------+------+
| id   | username            | s    |
+------+---------------------+------+
| 1354 | VERNA VITALE        | a    |
| 1784 | BERNADETTE HALES    | a    |
| 1839 | BERNARDINA MCMILLAN | a    |
| 1864 | ERNA ULLOA          | a    |
| 1948 | SAMIRA ABERNATHY    | a    |
+------+---------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+------------------+------+
| id   | username         | s    |
+------+------------------+------+
|  188 | LARA KIRK        | a    |
|  207 | CLARA MORRIS     | a    |
|  351 | KLARA DONALDSON  | a    |
|  990 | ELAINE SARABIA   | a    |
| 1409 | LARA FREDERICK   | a    |
| 1661 | SARA GARNER      | a    |
| 1831 | SARAI ESPINAL    | a    |
| 2074 | VALENTIN SARABIA | a    |
| 2930 | LARA CINTRON     | a    |
| 3045 | KLARA ANDRES     | a    |
| 3373 | KLARA NORTON     | a    |
| 3741 | CRUZ SARABIA     | a    |
| 3780 | RUSSEL LARA      | a    |
| 4700 | HEE SARABIA      | a    |
| 4933 | KLARA GOODING    | a    |
| 5830 | SARAI LINDLEY    | a    |
| 5865 | SARAN KNAPP      | a    |
| 5918 | SARA WAITE       | a    |
| 6635 | CLARA BEALE      | a    |
| 6836 | CLARA BAZAN      | a    |
+------+------------------+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| joe   |
| john  |
| jose  |
| joy   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnie  |
| johnson |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
+-----------+
| albert    |
| alexander |
| allen     |
| dale      |
| dallas    |
| donald    |
| gale      |
| kendall   |
| marshall  |
| walter    |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| ami     |
| britni  |
| brittni |
| cami    |
| choi    |
| darci   |
| eleni   |
| jami    |
| jani    |
| jeni    |
| joi     |
| kaci    |
| kami    |
| kimi    |
| laci    |
| lani    |
| luci    |
| mancini |
| marci   |
| martini |
| melani  |
| muoi    |
| nanci   |
| neomi   |
| noemi   |
| nohemi  |
| ricci   |
| shani   |
| staci   |
| tammi   |
| toi     |
| tomi    |
| traci   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| chang |
| chi   |
| chong |
| chung |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| page    |
| paige   |
| palma   |
| palmer  |
| paris   |
| parker  |
| pat     |
| patrick |
| paul    |
| paz     |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+------------+
| grace      |
| gracia     |
| grady      |
| graham     |
| grant      |
| gregg      |
| gregory    |
| griffin    |
| grover     |
| montenegro |
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
- | query     |
- +-----------+
- | some      |
- | something |
- +-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
- | query     |
- +-----------+
- | some      |
- | something |
- +-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
ERROR 1064 (42000) at line 1: The 'fuzzy' option requires a full-text query
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
+----------+
| query    |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
+----------+
| query    |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; DEBUG SLEEP 2; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
+---------+--------+
| command | result |
+---------+--------+
| sleep   | #!/[0-9]{1}.[0-9]{3}/!#  |
+---------+--------+
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
+------+--------+
| id   | f      |
+------+--------+
|    1 | abcdef |
+------+--------+
+----------------+--------+
| Variable_name  | Value  |
+----------------+--------+
| total          | 1      |
| total_found    | 1      |
| total_relation | eq     |
| time           | #!/[0-9]{1}.[0-9]{3}/!#  |
| keyword[0]     | abcdef |
| docs[0]        | 1      |
| hits[0]        | 1      |
+----------------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
+------+-----------+
| id   | f         |
+------+-----------+
|    1 | abcdef    |
|    2 | abcd efgh |
+------+-----------+
+----------------+-------+
| Variable_name  | Value |
+----------------+-------+
| total          | 2     |
| total_found    | 2     |
| total_relation | eq    |
| time           | #!/[0-9]{1}.[0-9]{3}/!# |
+----------------+-------+
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
/* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 1 */ SELECT * FROM t WHERE MATCH('abcdef');
/* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 2 */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1;
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
+----------------+-------------+
| Variable_name  | Value       |
+----------------+-------------+
| total          | 0           |
| total_found    | 0           |
| total_relation | eq          |
| time           | #!/[0-9]{1}.[0-9]{3}/!#       |
| keyword[0]     | nonexistent |
| docs[0]        | 0           |
| hits[0]        | 0           |
+----------------+-------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id   | f         |
+------+-----------+
|    1 | abcdef    |
|    2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
+-------+
| query |
+-------+
| 340   |
+-------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
+-------+
| query |
+-------+
| 340   |
+-------+
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf
––– output –––
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv
––– output –––
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain
––– output –––
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1
––– output –––
––– input –––
rm -f /tmp/searchd.log; searchd --stopwait > /dev/null; searchd -c /tmp/manticore_idx.conf; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/tmp/manticore_idx.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on all interfaces for mysql, port=9306
listening on all interfaces for sphinx and http(s), port=9312
listening on all interfaces for sphinx and http(s), port=9308
precaching table 'idx_plain'
precached 1 tables in #!/[0-9]{1,2}.[0-9]+/!# sec
Buddy started!
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
+-----------+-------+
| Table     | Type  |
+-----------+-------+
| idx_plain | local |
+-----------+-------+
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
+---------------+-------------------+
| Variable_name | Value             |
+---------------+-------------------+
| settings      | min_infix_len = 2 |
+---------------+-------------------+
––– 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
Version: knn %{VERSION}
*************************** 5. row ***************************
Component: Buddy
Version: buddy %{VERSION}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id   | f         |
+------+-----------+
|    1 | abcdef    |
|    2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id   | f         |
+------+-----------+
|    1 | abcdef    |
|    2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
+--------+
| query  |
+--------+
| abcd   |
| abcdef |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
+--------+
| query  |
+--------+
| random |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
+------+--------+
| id   | f      |
+------+--------+
|    1 | abcdef |
+------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
+------+-----------+
| id   | f         |
+------+-----------+
|    2 | abcd efgh |
+------+-----------+

Copy link

github-actions bot commented Feb 5, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 34
❌ Failed: 1
⏳ Duration: 494s
👉 Check Action Results for commit a2e09d4
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{VERSION}     |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
- | Buddy     | buddy %{VERSION}                  |
+ | Buddy     | buddy v3.17.3-g71c5ad            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
[{"total":5,"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":"Buddy","Version":"buddy %{VERSION}"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
- {"Counter":"version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (buddy %{SEMVER})"},
+ {"Counter":"version","Value":"7.0.1 a2e09d411@25020504 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.3-g71c5ad)"},
{"Counter":"mysql_version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | grep "rows in set"
––– output –––
- %{NUMBER} rows in set
+ 75 rows in set (0.001 sec)
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

Copy link

github-actions bot commented Feb 5, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 34
❌ Failed: 1
⏳ Duration: 504s
👉 Check Action Results for commit 5239bf8
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; 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})
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-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
| Daemon    | %{VERSION}     |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
| Buddy     | buddy %{VERSION}            |
+-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | awk '!/row.*in set/'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('example')" | awk '!/row.*in set/'; echo
––– output –––
+----+---------+
| id | value   |
+----+---------+
| 1  | example |
+----+---------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
[{"total":5,"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":"Buddy","Version":"buddy %{VERSION}"}]}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql" -d "select * from t"; echo
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":1,"_score":1,"_source":{"value":"example"}},{"_id":2,"_score":1,"_source":{"value":"test"}}]}}
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
{"id":1,"value":"example"},
{"id":2,"value":"test"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
{"Table":"t","Type":"rt"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('nonexistent')"; echo
––– output –––
[{
"columns":[{"id":{"type":"long long"}},{"value":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed '/row.*in set/d' | sed 's/ (.*sec)//'; echo
––– output –––
+-------+------+
| Table | Type |
+-------+------+
| t     | rt   |
+-------+------+
––– input –––
curl -s "http://localhost:9308/cli?describe%20t" | awk '!/row.*in set/'; echo
––– output –––
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| value | text   | indexed stored |
+-------+--------+----------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t"; echo
––– output –––
[{
"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],
"data":[
{"Field":"id","Type":"bigint","Properties":""},
{"Field":"value","Type":"text","Properties":"indexed stored"}
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20t" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show tables"; echo
––– output –––
[{
"columns":[{"Table":{"type":"string"}},{"Type":{"type":"string"}}],
"data":[
],
"total":%{NUMBER},
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20tables" | sed 's/ (.*sec)//'; echo
––– output –––
Empty set
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SHOW STATUS"; echo
––– output –––
[{
"columns":[{"Counter":{"type":"string"}},{"Value":{"type":"string"}}],
"data":[
{"Counter":"uptime","Value":"%{NUMBER}"},
{"Counter":"connections","Value":"%{NUMBER}"},
{"Counter":"maxed_out","Value":"%{NUMBER}"},
{"Counter":"version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION}) (buddy %{VERSION})"},
{"Counter":"mysql_version","Value":"%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})"},
{"Counter":"command_search","Value":"%{NUMBER}"},
{"Counter":"command_excerpt","Value":"%{NUMBER}"},
{"Counter":"command_update","Value":"%{NUMBER}"},
{"Counter":"command_keywords","Value":"%{NUMBER}"},
{"Counter":"command_persist","Value":"%{NUMBER}"},
{"Counter":"command_status","Value":"%{NUMBER}"},
{"Counter":"command_flushattrs","Value":"%{NUMBER}"},
{"Counter":"command_sphinxql","Value":"%{NUMBER}"},
{"Counter":"command_ping","Value":"%{NUMBER}"},
{"Counter":"command_delete","Value":"%{NUMBER}"},
{"Counter":"command_set","Value":"%{NUMBER}"},
{"Counter":"command_insert","Value":"%{NUMBER}"},
{"Counter":"command_replace","Value":"%{NUMBER}"},
{"Counter":"command_commit","Value":"%{NUMBER}"},
{"Counter":"command_suggest","Value":"%{NUMBER}"},
{"Counter":"command_json","Value":"%{NUMBER}"},
{"Counter":"command_callpq","Value":"%{NUMBER}"},
{"Counter":"command_cluster","Value":"%{NUMBER}"},
{"Counter":"command_getfield","Value":"%{NUMBER}"},
{"Counter":"insert_replace_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"insert_replace_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_avg","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_min","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_max","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct95","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"search_stats_ms_pct99","Value":"#!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!# #!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"update_stats_ms_avg","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_min","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_max","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct95","Value":"N/A N/A N/A"},
{"Counter":"update_stats_ms_pct99","Value":"N/A N/A N/A"},
{"Counter":"agent_connect","Value":"%{NUMBER}"},
{"Counter":"agent_tfo","Value":"%{NUMBER}"},
{"Counter":"agent_retry","Value":"%{NUMBER}"},
{"Counter":"queries","Value":"%{NUMBER}"},
{"Counter":"dist_queries","Value":"%{NUMBER}"},
{"Counter":"workers_total","Value":"%{NUMBER}"},
{"Counter":"workers_active","Value":"%{NUMBER}"},
{"Counter":"workers_clients","Value":"%{NUMBER}"},
{"Counter":"workers_clients_vip","Value":"%{NUMBER}"},
{"Counter":"workers_clients_buddy","Value":"%{NUMBER}"},
{"Counter":"work_queue_length","Value":"6"},
{"Counter":"load","Value":"0.00 0.00 0.00"},
{"Counter":"load_primary","Value":"0.00 0.00 0.00"},
{"Counter":"load_secondary","Value":"0.00 0.00 0.00"},
{"Counter":"query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_cpu","Value":"OFF"},
{"Counter":"dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"query_reads","Value":"OFF"},
{"Counter":"query_readkb","Value":"OFF"},
{"Counter":"query_readtime","Value":"OFF"},
{"Counter":"avg_query_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_cpu","Value":"OFF"},
{"Counter":"avg_dist_wall","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_local","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_dist_wait","Value":"#!/[0-9]{1}.[0-9]{3}/!#"},
{"Counter":"avg_query_reads","Value":"OFF"},
{"Counter":"avg_query_readkb","Value":"OFF"},
{"Counter":"avg_query_readtime","Value":"OFF"},
{"Counter":"qcache_max_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_thresh_msec","Value":"%{NUMBER}"},
{"Counter":"qcache_ttl_sec","Value":"%{NUMBER}"},
{"Counter":"qcache_cached_queries","Value":"%{NUMBER}"},
{"Counter":"qcache_used_bytes","Value":"%{NUMBER}"},
{"Counter":"qcache_hits","Value":"0"}
],
"total":75,
"error":"",
"warning":""
}]
––– input –––
curl -s "http://localhost:9308/cli?show%20status" | awk -F "rows in set" '{print $1}'
––– output –––
- %{NUMBER}
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | Counter                       | Value                                                                                                                                                  |
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | uptime                        | 1                                                                                                                                                      |
+ | connections                   | 25                                                                                                                                                     |
+ | maxed_out                     | 0                                                                                                                                                      |
+ | version                       | 7.0.1 5239bf8bc@25020505 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210) (buddy v3.17.3-g71c5ad) |
+ | mysql_version                 | 7.0.1 5239bf8bc@25020505 dev (columnar 2.3.1 0be00ac@25012210) (secondary 2.3.1 0be00ac@25012210) (knn 2.3.1 0be00ac@25012210)                         |
+ | command_search                | 5                                                                                                                                                      |
+ | command_excerpt               | 0                                                                                                                                                      |
+ | command_update                | 0                                                                                                                                                      |
+ | command_keywords              | 0                                                                                                                                                      |
+ | command_persist               | 0                                                                                                                                                      |
+ | command_status                | 4                                                                                                                                                      |
+ | command_flushattrs            | 0                                                                                                                                                      |
+ | command_sphinxql              | 0                                                                                                                                                      |
+ | command_ping                  | 0                                                                                                                                                      |
+ | command_delete                | 0                                                                                                                                                      |
+ | command_set                   | 0                                                                                                                                                      |
+ | command_insert                | 1                                                                                                                                                      |
+ | command_replace               | 0                                                                                                                                                      |
+ | command_commit                | 0                                                                                                                                                      |
+ | command_suggest               | 0                                                                                                                                                      |
+ | command_json                  | 0                                                                                                                                                      |
+ | command_callpq                | 0                                                                                                                                                      |
+ | command_cluster               | 0                                                                                                                                                      |
+ | command_getfield              | 0                                                                                                                                                      |
+ | insert_replace_stats_ms_avg   | 1.676 1.676 1.676                                                                                                                                      |
+ | insert_replace_stats_ms_min   | 1.676 1.676 1.676                                                                                                                                      |
+ | insert_replace_stats_ms_max   | 1.676 1.676 1.676                                                                                                                                      |
+ | insert_replace_stats_ms_pct95 | 1.676 1.676 1.676                                                                                                                                      |
+ | insert_replace_stats_ms_pct99 | 1.676 1.676 1.676                                                                                                                                      |
+ | search_stats_ms_avg           | 0.143 0.143 0.143                                                                                                                                      |
+ | search_stats_ms_min           | 0.127 0.127 0.127                                                                                                                                      |
+ | search_stats_ms_max           | 0.165 0.165 0.165                                                                                                                                      |
+ | search_stats_ms_pct95         | 0.148 0.148 0.148                                                                                                                                      |
+ | search_stats_ms_pct99         | 0.148 0.148 0.148                                                                                                                                      |
+ | update_stats_ms_avg           | N/A N/A N/A                                                                                                                                            |
+ | update_stats_ms_min           | N/A N/A N/A                                                                                                                                            |
+ | update_stats_ms_max           | N/A N/A N/A                                                                                                                                            |
+ | update_stats_ms_pct95         | N/A N/A N/A                                                                                                                                            |
+ | update_stats_ms_pct99         | N/A N/A N/A                                                                                                                                            |
+ | agent_connect                 | 0                                                                                                                                                      |
+ | agent_tfo                     | 0                                                                                                                                                      |
+ | agent_retry                   | 0                                                                                                                                                      |
+ | queries                       | 6                                                                                                                                                      |
+ | dist_queries                  | 0                                                                                                                                                      |
+ | workers_total                 | 4                                                                                                                                                      |
+ | workers_active                | 4                                                                                                                                                      |
+ | workers_clients               | 2                                                                                                                                                      |
+ | workers_clients_vip           | 0                                                                                                                                                      |
+ | workers_clients_buddy         | 1                                                                                                                                                      |
+ | work_queue_length             | 6                                                                                                                                                      |
+ | load                          | 0.00 0.00 0.00                                                                                                                                         |
+ | load_primary                  | 0.00 0.00 0.00                                                                                                                                         |
+ | load_secondary                | 0.00 0.00 0.00                                                                                                                                         |
+ | query_wall                    | 0.000                                                                                                                                                  |
+ | query_cpu                     | OFF                                                                                                                                                    |
+ | dist_wall                     | 0.000                                                                                                                                                  |
+ | dist_local                    | 0.000                                                                                                                                                  |
+ | dist_wait                     | 0.000                                                                                                                                                  |
+ | query_reads                   | OFF                                                                                                                                                    |
+ | query_readkb                  | OFF                                                                                                                                                    |
+ | query_readtime                | OFF                                                                                                                                                    |
+ | avg_query_wall                | 0.000                                                                                                                                                  |
+ | avg_query_cpu                 | OFF                                                                                                                                                    |
+ | avg_dist_wall                 | 0.000                                                                                                                                                  |
+ | avg_dist_local                | 0.000                                                                                                                                                  |
+ | avg_dist_wait                 | 0.000                                                                                                                                                  |
+ | avg_query_reads               | OFF                                                                                                                                                    |
+ | avg_query_readkb              | OFF                                                                                                                                                    |
+ | avg_query_readtime            | OFF                                                                                                                                                    |
+ | qcache_max_bytes              | 16777216                                                                                                                                               |
+ | qcache_thresh_msec            | 3000                                                                                                                                                   |
+ | qcache_ttl_sec                | 60                                                                                                                                                     |
+ | qcache_cached_queries         | 0                                                                                                                                                      |
+ | qcache_used_bytes             | 0                                                                                                                                                      |
+ | qcache_hits                   | 0                                                                                                                                                      |
+ +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
+ 75
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE big_table (id INT, value TEXT);"
––– output –––
––– input –––
for i in $(seq 1 1000000); do echo "INSERT INTO big_table VALUES ($i, 'value_$i');"; done | mysql -h0 -P9306
––– output –––
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20big_table%20limit%2010" | awk '!/row.*in set/'; echo
––– output –––
+--------+--------------+
| id     | value        |
+--------+--------------+
| 939142 | value_939142 |
| 418023 | value_418023 |
| 418022 | value_418022 |
| 939140 | value_939140 |
| 418021 | value_418021 |
| 939141 | value_939141 |
| 418020 | value_418020 |
| 939138 | value_939138 |
| 939139 | value_939139 |
| 418019 | value_418019 |
+--------+--------------+
––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20total%20from%20big_table" | awk '!/row.*in set/'; echo
––– output –––
+---------+
| total   |
+---------+
| 1000000 |
+---------+
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20big_table" | awk '!/Query OK/ && !/rows affected/'; echo
––– output –––
––– input –––
curl -X POST "http://localhost:9308/sql" -d "EXPLAIN FORMAT=json SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
{"error":"P01: syntax error, unexpected '=' near '=json SELECT * FROM t WHERE MATCH('example')'"}

––– input –––
curl -s "http://localhost:9308/cli?select%20count(*)%20as%20cnt,value_attr%20from%20t%20group%20by%20value_attr" | awk '!/row.*in set/'; echo
––– output –––
+-----+------------+
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this test is to ensure that BUDDY queries work well and render tables correctly. Currently, we only check MANTICORE queries. We should stick with one query type for Manticore, such as a simple select * from, and test different queries that will process with BUDDY on the /cli endpoint. Examples include show version, show queries, and select * ... fuzzy=1.

Also I think we can remove the "-tests" prefix since we already know that these are tests.

"error":"",
"warning":""
}]
––– input –––
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here we should add tests that run through the Buddy, currently I cannot see any, all those queries are processed by the daemon

}
]
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t WHERE MATCH('exa*')" | jq .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's think about adding buddy queries to each test we do, because currently we validate only plain requests for daemon, but most interest is about Buddy.

@sanikolaev
Copy link
Collaborator

@PavelShilin89 is this actual? I see this is in my TODO. What's expected from me here?

Copy link

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 9s
👉 Check Action Results for commit b9bf9e3
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 9s
👉 Check Action Results for commit c4ee754
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

github-actions bot commented Apr 1, 2025

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 9s
👉 Check Action Results for commit f3ef46a
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

github-actions bot commented Apr 2, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 43
❌ Failed: 1
⏳ Duration: 405s
👉 Check Action Results for commit f3ef46a
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
~ | Daemon    | %{VERSION}0.0.0 f3ef46a4d@25040123         |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
~ | Buddy     | buddy %{VERSION}  v3.27.0-1-gda59a7          |
+-----------+----------------------------------+

Copy link

github-actions bot commented Apr 3, 2025

Linux debug test results

1 028 tests   976 ✅  41m 49s ⏱️
    1 suites   52 💤
    1 files      0 ❌

Results for commit 74dca8f.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 3, 2025

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 9s
👉 Check Action Results for commit f05d5cb
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

github-actions bot commented Apr 3, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 43
❌ Failed: 1
⏳ Duration: 406s
👉 Check Action Results for commit f05d5cb
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
~ | Daemon    | %{VERSION}0.0.0 f05d5cb47@25040313         |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
~ | Buddy     | buddy %{VERSION}  v3.27.0-1-gda59a7          |
+-----------+----------------------------------+

Copy link

github-actions bot commented Apr 4, 2025

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 10s
👉 Check Action Results for commit ea7075d
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

github-actions bot commented Apr 4, 2025

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 43
❌ Failed: 1
⏳ Duration: 401s
👉 Check Action Results for commit ea7075d
Failed tests:

test/clt-tests/core/show-version-http.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
+-----------+----------------------------------+
| Component | Version                          |
+-----------+----------------------------------+
~ | Daemon    | %{VERSION}0.0.0 ea7075de0@25040421         |
| Columnar  | columnar %{VERSION}  |
| Secondary | secondary %{VERSION} |
| KNN       | knn %{VERSION}       |
~ | Buddy     | buddy %{VERSION}  v3.27.0-1-gda59a7          |
+-----------+----------------------------------+

Copy link

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 9s
👉 Check Action Results for commit bd74524
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/
✅ OK: 2
❌ Failed: 1
⏳ Duration: 98s
👉 Check Action Results for commit bd74524
Failed tests:

test/clt-tests/sharding/test-drop-sharded-table.rec
––– input –––
(dockerd > /var/log/dockerd.log 2>&1 &) > /dev/null
––– output –––
OK
––– input –––
if timeout 30 grep -qm1 'API listen on /var/run/docker.sock' <(tail -n 0 -f /var/log/dockerd.log); then echo 'Done'; else echo 'Timeout failed'; fi
––– output –––
- Done
+ Timeout failed
––– input –––
docker ps
––– output –––
- CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
+ bash: line 9: docker: command not found
––– input –––
docker network create manticore_network > /dev/null; echo $?
––– output –––
- 0
+ bash: line 11: docker: command not found
+ 127
––– input –––
docker run -d --name manticore_remote --network manticore_network --platform linux/amd64 manticoresearch/manticore:dev > /dev/null 2>&1; echo $?
––– output –––
- 0
+ 127
––– input –––
if timeout 30 sh -c "docker logs -f manticore_remote 2>&1 | grep -qm1 'accepting connections'"; then echo 'accepting connections'; else echo 'Timeout exceeded'; fi
––– output –––
- accepting connections
+ Timeout exceeded
––– input –––
docker run -d --name manticore_dist --network manticore_network --platform linux/amd64 manticoresearch/manticore:latest > /dev/null 2>&1; echo $?
––– output –––
- 0
+ 127
––– input –––
if timeout 30 sh -c "docker logs -f manticore_dist 2>&1 | grep -qm1 'accepting connections'"; then echo 'accepting connections'; else echo 'Timeout exceeded'; fi
––– output –––
- accepting connections
+ Timeout exceeded
––– input –––
docker exec manticore_remote mysql -e "CREATE TABLE t (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'); INSERT INTO t (id, model, storage_capacity, color, release_year, price, discounted_price, sold, date_added, product_codes, values, additional_info, vector) VALUES (1, 'iPhone 13 Pro', 256, 'silver', 2021, 1099.99, 989.99, 'TRUE', '2021-06-05 10:32:22', (1, 2, 3), (523456764345678976, 98765409877866654098, 1109876543450987650987), '{\"features\": [\"ProMotion display\", \"A15 Bionic chip\", \"Ceramic Shield front cover\"]}', (0.773448, 0.312478, 0.137971, 0.459821)), (2, 'iPhone 13', 128, 'blue', 2021, 799.99, 719.99, 'FALSE', '2021-07-10 15:25:32', (4, 5, 6), (623456764345678976, 98765409877866654099, 1209876543450987650987), '{\"features\": [\"A15 Bionic chip\", \"Ceramic Shield front cover\", \"Dual-camera system\"]}', (-0.028894, 0.868278, 0.211892, 0.024594)), (3, 'Samsung Galaxy S21', 256, 'black', 2021, 999.99, 899.99, 'TRUE', '2021-08-15 12:45:00', (7, 8, 9), (723456764345678976, 98765409877866654100, 1309876543450987650987), '{\"features\": [\"120Hz display\", \"Exynos 2100\", \"Gorilla Glass Victus\"]}', (0.561478, 0.412578, 0.287971, 0.559821));"
––– output –––
+ bash: line 21: docker: command not found
––– input –––
docker exec manticore_dist mysql -e "CREATE TABLE dist_table type='distributed' agent='manticore_remote:9312:t';"
––– output –––
+ bash: line 23: docker: command not found
––– input –––
docker exec manticore_dist mysql -e "DESC dist_table"
––– output –––
- +-------------------------+----------+
+ bash: line 25: docker: command not found
- | Agent                   | Type     |
- +-------------------------+----------+
- | manticore_remote:9312:t | remote_1 |
- +-------------------------+----------+
––– input –––
docker exec manticore_dist mysql -e "select * from dist_table where id=2;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ bash: line 27: docker: command not found
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values                                 | additional_info                                                                    | vector                               |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
- |    2 | iPhone 13 |              128 | blue  |         2021 | 799.989990 |       719.989990 |    0 |          0 | 4,5,6         | 623456764345678976,9223372036854775807 | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | -0.028894,0.868278,0.211892,0.024594 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+

Copy link

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 43
❌ Failed: 1
⏳ Duration: 409s
👉 Check Action Results for commit bd74524
Failed tests:

test/clt-tests/core/show-version-http.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 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
- | Daemon    | %{VERSION}     |
+ | Daemon    | 0.0.0 bd745242d@25041308         |
- | Buddy     | buddy %{VERSION}            |
+ | Buddy     | buddy v3.27.0-4-ge65059          |

Copy link

clt

❌ CLT tests in test/clt-tests/http-interface-tests/
✅ OK: 0
❌ Failed: 1
⏳ Duration: 9s
👉 Check Action Results for commit 3b7ce96
Failed tests:

test/clt-tests/http-interface-tests/*.rec

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/
✅ OK: 1
❌ Failed: 2
⏳ Duration: 98s
👉 Check Action Results for commit 3b7ce96
Failed tests:

test/clt-tests/sharding/test-drop-sharded-table.rec
––– input –––
(dockerd > /var/log/dockerd.log 2>&1 &) > /dev/null
––– output –––
OK
––– input –––
if timeout 30 grep -qm1 'API listen on /var/run/docker.sock' <(tail -n 0 -f /var/log/dockerd.log); then echo 'Done'; else echo 'Timeout failed'; fi
––– output –––
- Done
+ Timeout failed
––– input –––
docker ps
––– output –––
- CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
+ bash: line 9: docker: command not found
––– input –––
docker network create manticore_network > /dev/null; echo $?
––– output –––
- 0
+ bash: line 11: docker: command not found
+ 127
––– input –––
docker run -d --name manticore_remote --network manticore_network --platform linux/amd64 manticoresearch/manticore:dev > /dev/null 2>&1; echo $?
––– output –––
- 0
+ 127
––– input –––
if timeout 30 sh -c "docker logs -f manticore_remote 2>&1 | grep -qm1 'accepting connections'"; then echo 'accepting connections'; else echo 'Timeout exceeded'; fi
––– output –––
- accepting connections
+ Timeout exceeded
––– input –––
docker run -d --name manticore_dist --network manticore_network --platform linux/amd64 manticoresearch/manticore:latest > /dev/null 2>&1; echo $?
––– output –––
- 0
+ 127
––– input –––
if timeout 30 sh -c "docker logs -f manticore_dist 2>&1 | grep -qm1 'accepting connections'"; then echo 'accepting connections'; else echo 'Timeout exceeded'; fi
––– output –––
- accepting connections
+ Timeout exceeded
––– input –––
docker exec manticore_remote mysql -e "CREATE TABLE t (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'); INSERT INTO t (id, model, storage_capacity, color, release_year, price, discounted_price, sold, date_added, product_codes, values, additional_info, vector) VALUES (1, 'iPhone 13 Pro', 256, 'silver', 2021, 1099.99, 989.99, 'TRUE', '2021-06-05 10:32:22', (1, 2, 3), (523456764345678976, 98765409877866654098, 1109876543450987650987), '{\"features\": [\"ProMotion display\", \"A15 Bionic chip\", \"Ceramic Shield front cover\"]}', (0.773448, 0.312478, 0.137971, 0.459821)), (2, 'iPhone 13', 128, 'blue', 2021, 799.99, 719.99, 'FALSE', '2021-07-10 15:25:32', (4, 5, 6), (623456764345678976, 98765409877866654099, 1209876543450987650987), '{\"features\": [\"A15 Bionic chip\", \"Ceramic Shield front cover\", \"Dual-camera system\"]}', (-0.028894, 0.868278, 0.211892, 0.024594)), (3, 'Samsung Galaxy S21', 256, 'black', 2021, 999.99, 899.99, 'TRUE', '2021-08-15 12:45:00', (7, 8, 9), (723456764345678976, 98765409877866654100, 1309876543450987650987), '{\"features\": [\"120Hz display\", \"Exynos 2100\", \"Gorilla Glass Victus\"]}', (0.561478, 0.412578, 0.287971, 0.559821));"
––– output –––
+ bash: line 21: docker: command not found
––– input –––
docker exec manticore_dist mysql -e "CREATE TABLE dist_table type='distributed' agent='manticore_remote:9312:t';"
––– output –––
+ bash: line 23: docker: command not found
––– input –––
docker exec manticore_dist mysql -e "DESC dist_table"
––– output –––
- +-------------------------+----------+
+ bash: line 25: docker: command not found
- | Agent                   | Type     |
- +-------------------------+----------+
- | manticore_remote:9312:t | remote_1 |
- +-------------------------+----------+
––– input –––
docker exec manticore_dist mysql -e "select * from dist_table where id=2;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ bash: line 27: docker: command not found
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values                                 | additional_info                                                                    | vector                               |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
- |    2 | iPhone 13 |              128 | blue  |         2021 | 799.989990 |       719.989990 |    0 |          0 | 4,5,6         | 623456764345678976,9223372036854775807 | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | -0.028894,0.868278,0.211892,0.024594 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
test/clt-tests/sharding/test-drop-sharded-clustering-table.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 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 –––
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 –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 45
❌ Failed: 1
⏳ Duration: 409s
👉 Check Action Results for commit 3b7ce96
Failed tests:

test/clt-tests/core/show-version-http.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 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
- | Daemon    | %{VERSION}     |
+ | Daemon    | 0.0.0 3b7ce9610@25052005         |

Copy link

clt

❌ CLT tests in test/clt-tests/http-interface/
✅ OK: 2
❌ Failed: 4
⏳ Duration: 21s
👉 Check Action Results for commit d2ae360
Failed tests:

test/clt-tests/http-interface/multi-query.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 'Accepting connections!'; else echo 'Timeout or failed!'; 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 "SELECT * FROM t; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- },
+       },
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t; show meta"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t; show meta"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT value_attr, COUNT(*) FROM t GROUP BY value_attr; SHOW META" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t where match('example'); select * from t where match('test')" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t where match('example'); select * from t where match('test')" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli" -d "SELECT * FROM t; SHOW META" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT value_attr, COUNT(*) FROM t GROUP BY value_attr; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "count(*)": {
+         "count(*)": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "value_attr": "example",
+         "value_attr": "example",
- "count(*)": 1
+         "count(*)": 1
- },
+       },
- {
+       {
- "value_attr": "test",
+         "value_attr": "test",
- "count(*)": 1
+         "count(*)": 1
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT value_attr, COUNT(*) FROM t GROUP BY value_attr; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "count(*)": {
+         "count(*)": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "value_attr": "example",
+         "value_attr": "example",
- "count(*)": 1
+         "count(*)": 1
- },
+       },
- {
+       {
- "value_attr": "test",
+         "value_attr": "test",
- "count(*)": 1
+         "count(*)": 1
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM t WHERE MATCH('example'); SELECT * FROM t WHERE MATCH('test'); SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- },
+       },
- {
+       {
- "Variable_name": "keyword[0]",
+         "Variable_name": "keyword[0]",
- "Value": "test"
+         "Value": "test"
- },
+       },
- {
+       {
- "Variable_name": "docs[0]",
+         "Variable_name": "docs[0]",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "hits[0]",
+         "Variable_name": "hits[0]",
- "Value": "1"
+         "Value": "1"
- }
+       }
- ],
+     ],
- "total": 7,
+     "total": 7,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t WHERE MATCH('example'); SELECT * FROM t WHERE MATCH('test'); SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- },
+       },
- {
+       {
- "Variable_name": "keyword[0]",
+         "Variable_name": "keyword[0]",
- "Value": "test"
+         "Value": "test"
- },
+       },
- {
+       {
- "Variable_name": "docs[0]",
+         "Variable_name": "docs[0]",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "hits[0]",
+         "Variable_name": "hits[0]",
- "Value": "1"
+         "Value": "1"
- }
+       }
- ],
+     ],
- "total": 7,
+     "total": 7,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM t ORDER BY id DESC LIMIT 1; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t ORDER BY id DESC LIMIT 1; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT AVG(id) FROM t; SELECT COUNT(*) FROM t; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "avg(id)": {
+         "avg(id)": {
- "type": "double"
+           "type": "double"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "avg(id)": 1.5
+         "avg(id)": 1.5
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "count(*)": {
+         "count(*)": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "count(*)": 2
+         "count(*)": 2
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "gte"
+         "Value": "gte"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT AVG(id) FROM t; SELECT COUNT(*) FROM t; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "avg(id)": {
+         "avg(id)": {
- "type": "double"
+           "type": "double"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "avg(id)": 1.5
+         "avg(id)": 1.5
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "count(*)": {
+         "count(*)": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "count(*)": 2
+         "count(*)": 2
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "1"
+         "Value": "1"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "gte"
+         "Value": "gte"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE empty_table (id INT, value TEXT);"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM empty_table; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [],
+     "data": [],
- "total": 0,
+     "total": 0,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "0"
+         "Value": "0"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "0"
+         "Value": "0"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM empty_table; SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [],
+     "data": [],
- "total": 0,
+     "total": 0,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "0"
+         "Value": "0"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "0"
+         "Value": "0"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM t; SHOW META; SELECT COUNT(*) FROM t; SELECT AVG(id) FROM t; SELECT * FROM t WHERE MATCH('example'); SELECT * FROM t WHERE MATCH('test')" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- },
+       },
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "2"
+         "Value": "2"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "#!/[0-9]{1}.[0-9]{3}/!#"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "count(*)": {
+         "count(*)": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "count(*)": 2
+         "count(*)": 2
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "avg(id)": {
+         "avg(id)": {
- "type": "double"
+           "type": "double"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "avg(id)": 1.5
+         "avg(id)": 1.5
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- },
+   },
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql" -d "SELECT * FROM t; SELECT * FROM t WHERE MATCH('example')"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql" -d "FACET value_attr; FACET id"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from t; select * from nonexistent_table" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "select * from nonexistent_table; select * from t;" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "select * from t; select * from nonexistent_table" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM nonexistent_table; SELECT * FROM t" | awk '!/row.*in set/'; echo
––– output –––
OK
test/clt-tests/http-interface/error-handling.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 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT) min_prefix_len = '3'; INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d ""; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELEKT * FROM t"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM nonexistent_table"; echo
––– output –––
OK
––– input –––
curl -X POST "http://localhost:9308/sql" -d "SELECT * FROM t; SHOW META"; echo
––– output –––
- {"error":"only SELECT queries are supported"}
+   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
+                                  Dload  Upload   Total   Spent    Left  Speed
+ 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    71  100    45  100    26  53507  30915 --:--:-- --:--:-- --:--:-- 71000
+ {"error":"only SELECT queries are supported"}
––– input –––
curl -s "http://localhost:9308/cli_json" -d "DESCRIBE t; SELECT * FROM t" | awk '!/row.*in set/'; echo
––– output –––
OK
––– input –––
# Cервер не обрабатывает ошибки внутри MATCH(), а просто молча возвращает пустые результаты.
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM t WHERE MATCH('@value \!@#$%')"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM t ORDER BY unknown_column"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "SELECT * FROM t LIMIT -5"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli_json" -d "UPDATE t SET value='new_value' WHERE id=1"; echo
––– output –––
OK
test/clt-tests/http-interface/cli-endpoint.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd > /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, vector FLOAT_VECTOR) min_infix_len = '3' min_prefix_len = '3'; INSERT INTO t VALUES (1, 'example', 'example', '(0.1, 0.2, 0.3)'), (2, 'test', 'test', '(0.4, 0.5, 0.6)');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | grep -v 'rows in set'
––– output –––
- | Buddy     | buddy %{VERSION}          |
+ | Buddy     | buddy v3.28.2-gf55149            |
––– input –––
curl -s "http://localhost:9308/cli?select%20*%20from%20t%20where%20match('exmaple')%20option%20fuzzy=1" | awk '!/row.*in set/'
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20buddy%20plugins" | awk -F'|' 'NF >= 5 && $0 !~ /row.*in set/ && $0 !~ /^[+]/ { gsub(/^ +| +$/, "", $2); gsub(/^ +| +$/, "", $3); gsub(/^ +| +$/, "", $4); gsub(/^ +| +$/, "", $5); gsub(/^ +| +$/, "", $6); print "Package: " $2 "\nPlugin: " $3 "\nVersion: " $4 "\nType: " $5 "\nInfo: " $6 "\n" }'
––– output –––
+ Package: manticoresoftware/buddy-plugin-truncate
+ Plugin: truncate
+ Version: 3.28.2-gf55149
+ Type: core
+ Info: Handles TRUNCATE statements on distributed tables
––– input –––
curl -s "http://localhost:9308/cli?create%20table%20t_copy%20like%20t" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?insert%20into%20auto_created%20(id,%20value)%20values%20(10,%20'abc')" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?alter%20table%20t%20add%20column%20extra_field%20int" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?alter%20table%20t%20rename%20to%20t_renamed" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?replace%20into%20t_renamed%20(id,%20value)%20values%20(1,%20'replaced_value')" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?drop%20table%20if%20exists%20auto_created" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?create%20cluster%20my_cluster%20if%20not%20exists" | grep -q 'Query OK' && echo ok
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20meta" | awk -F'|' 'NF >= 3 && $0 !~ /row.*in set/ && $0 !~ /^[+]/ { gsub(/^ +| +$/, "", $2); gsub(/^ +| +$/, "", $3); print "Variable_name: " $2 "\nValue: " $3 "\n" }'
––– output –––
OK
test/clt-tests/http-interface/sql-mode-raw-endpoint.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 'Accepting connections!'; else echo 'Timeout or failed!'; 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 "SHOW VERSION" | jq .
––– output –––
- {
+   {
- "total": %{NUMBER},
+     "total": 5,
- "error": "",
+     "error": "",
- "warning": "",
+     "warning": "",
- "columns": [
+     "columns": [
- {
+       {
- "Component": {
+         "Component": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Version": {
+         "Version": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Component": "Daemon",
+         "Component": "Daemon",
- "Version": "%{VERSION}"
+         "Version": "0.0.0 d2ae36013@25052006"
- },
+       },
- {
+       {
- "Component": "Columnar",
+         "Component": "Columnar",
- "Version": "columnar %{VERSION}"
+         "Version": "columnar 4.2.1 aeac3b3@25032818"
- },
+       },
- {
+       {
- "Component": "Secondary",
+         "Component": "Secondary",
- "Version": "secondary %{VERSION}"
+         "Version": "secondary 4.2.1 aeac3b3@25032818"
- },
+       },
- {
+       {
- "Component": "KNN",
+         "Component": "KNN",
- "Version": "knn %{VERSION}"
+         "Version": "knn 4.2.1 aeac3b3@25032818"
- },
+       },
- {
+       {
- "Component": "Buddy",
+         "Component": "Buddy",
- "Version": "buddy v%{VERSION}"
+         "Version": "buddy v3.28.2-gf55149"
- }
+       }
- ]
+     ]
- }
+   }
––– 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 CREATE TABLE t" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Table": {
+         "Table": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Create Table": {
+         "Create Table": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Table": "t",
+         "Table": "t",
- "Create Table": "CREATE TABLE t (\nid bigint,\nvalue text,\nvalue_attr string attribute\n) min_prefix_len='3' min_infix_len='3'"
+         "Create Table": "CREATE TABLE t (\nid bigint,\nvalue text,\nvalue_attr string attribute\n) min_prefix_len='3' min_infix_len='3'"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- },
+       },
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SHOW TABLES" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Table": {
+         "Table": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Type": {
+         "Type": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Table": "t",
+         "Table": "t",
- "Type": "rt"
+         "Type": "rt"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "DESCRIBE t" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Field": {
+         "Field": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Type": {
+         "Type": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Properties": {
+         "Properties": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Field": "id",
+         "Field": "id",
- "Type": "bigint",
+         "Type": "bigint",
- "Properties": ""
+         "Properties": ""
- },
+       },
- {
+       {
- "Field": "value",
+         "Field": "value",
- "Type": "text",
+         "Type": "text",
- "Properties": "indexed stored"
+         "Properties": "indexed stored"
- },
+       },
- {
+       {
- "Field": "value_attr",
+         "Field": "value_attr",
- "Type": "string",
+         "Type": "string",
- "Properties": ""
+         "Properties": ""
- }
+       }
- ],
+     ],
- "total": 3,
+     "total": 3,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t WHERE MATCH('example')" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SHOW META" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "Variable_name": {
+         "Variable_name": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "Value": {
+         "Value": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "Variable_name": "total",
+         "Variable_name": "total",
- "Value": "0"
+         "Value": "0"
- },
+       },
- {
+       {
- "Variable_name": "total_found",
+         "Variable_name": "total_found",
- "Value": "0"
+         "Value": "0"
- },
+       },
- {
+       {
- "Variable_name": "total_relation",
+         "Variable_name": "total_relation",
- "Value": "eq"
+         "Value": "eq"
- },
+       },
- {
+       {
- "Variable_name": "time",
+         "Variable_name": "time",
- "Value": "0.000"
+         "Value": "0.000"
- }
+       }
- ],
+     ],
- "total": 4,
+     "total": 4,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t WHERE MATCH('example') OPTION ranker=bm25" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t WHERE MATCH('exa*')" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t ORDER BY id DESC LIMIT 1" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t ORDER BY id ASC LIMIT 1" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 1,
+         "id": 1,
- "value": "example",
+         "value": "example",
- "value_attr": "example"
+         "value_attr": "example"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM t LIMIT 1 OFFSET 1" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value": {
+         "value": {
- "type": "string"
+           "type": "string"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "id": 2,
+         "id": 2,
- "value": "test",
+         "value": "test",
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 1,
+     "total": 1,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT COUNT(*) AS cnt, id FROM t GROUP BY id" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "cnt": {
+         "cnt": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "id": {
+         "id": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "cnt": 1,
+         "cnt": 1,
- "id": 1
+         "id": 1
- },
+       },
- {
+       {
- "cnt": 1,
+         "cnt": 1,
- "id": 2
+         "id": 2
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT COUNT(*) AS cnt, value_attr FROM t GROUP BY value_attr" | jq .
––– output –––
- {
+   {
- "columns": [
+     "columns": [
- {
+       {
- "cnt": {
+         "cnt": {
- "type": "long long"
+           "type": "long long"
- }
+         }
- },
+       },
- {
+       {
- "value_attr": {
+         "value_attr": {
- "type": "string"
+           "type": "string"
- }
+         }
- }
+       }
- ],
+     ],
- "data": [
+     "data": [
- {
+       {
- "cnt": 1,
+         "cnt": 1,
- "value_attr": "example"
+         "value_attr": "example"
- },
+       },
- {
+       {
- "cnt": 1,
+         "cnt": 1,
- "value_attr": "test"
+         "value_attr": "test"
- }
+       }
- ],
+     ],
- "total": 2,
+     "total": 2,
- "error": "",
+     "error": "",
- "warning": ""
+     "warning": ""
- }
+   }
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "SELECT * FROM nonexistent_table" | jq .
––– output –––
- "error": "unknown local table(s) 'nonexistent_table' in search request"
+   "error": "unknown local table(s) 'nonexistent_table' in search request"

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/
✅ OK: 1
❌ Failed: 2
⏳ Duration: 103s
👉 Check Action Results for commit d2ae360
Failed tests:

test/clt-tests/sharding/test-drop-sharded-table.rec
––– input –––
(dockerd > /var/log/dockerd.log 2>&1 &) > /dev/null
––– output –––
OK
––– input –––
if timeout 30 grep -qm1 'API listen on /var/run/docker.sock' <(tail -n 0 -f /var/log/dockerd.log); then echo 'Done'; else echo 'Timeout failed'; fi
––– output –––
- Done
+ Timeout failed
––– input –––
docker ps
––– output –––
- CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
+ bash: line 9: docker: command not found
––– input –––
docker network create manticore_network > /dev/null; echo $?
––– output –––
- 0
+ bash: line 11: docker: command not found
+ 127
––– input –––
docker run -d --name manticore_remote --network manticore_network --platform linux/amd64 manticoresearch/manticore:dev > /dev/null 2>&1; echo $?
––– output –––
- 0
+ 127
––– input –––
if timeout 30 sh -c "docker logs -f manticore_remote 2>&1 | grep -qm1 'accepting connections'"; then echo 'accepting connections'; else echo 'Timeout exceeded'; fi
––– output –––
- accepting connections
+ Timeout exceeded
––– input –––
docker run -d --name manticore_dist --network manticore_network --platform linux/amd64 manticoresearch/manticore:latest > /dev/null 2>&1; echo $?
––– output –––
- 0
+ 127
––– input –––
if timeout 30 sh -c "docker logs -f manticore_dist 2>&1 | grep -qm1 'accepting connections'"; then echo 'accepting connections'; else echo 'Timeout exceeded'; fi
––– output –––
- accepting connections
+ Timeout exceeded
––– input –––
docker exec manticore_remote mysql -e "CREATE TABLE t (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'); INSERT INTO t (id, model, storage_capacity, color, release_year, price, discounted_price, sold, date_added, product_codes, values, additional_info, vector) VALUES (1, 'iPhone 13 Pro', 256, 'silver', 2021, 1099.99, 989.99, 'TRUE', '2021-06-05 10:32:22', (1, 2, 3), (523456764345678976, 98765409877866654098, 1109876543450987650987), '{\"features\": [\"ProMotion display\", \"A15 Bionic chip\", \"Ceramic Shield front cover\"]}', (0.773448, 0.312478, 0.137971, 0.459821)), (2, 'iPhone 13', 128, 'blue', 2021, 799.99, 719.99, 'FALSE', '2021-07-10 15:25:32', (4, 5, 6), (623456764345678976, 98765409877866654099, 1209876543450987650987), '{\"features\": [\"A15 Bionic chip\", \"Ceramic Shield front cover\", \"Dual-camera system\"]}', (-0.028894, 0.868278, 0.211892, 0.024594)), (3, 'Samsung Galaxy S21', 256, 'black', 2021, 999.99, 899.99, 'TRUE', '2021-08-15 12:45:00', (7, 8, 9), (723456764345678976, 98765409877866654100, 1309876543450987650987), '{\"features\": [\"120Hz display\", \"Exynos 2100\", \"Gorilla Glass Victus\"]}', (0.561478, 0.412578, 0.287971, 0.559821));"
––– output –––
+ bash: line 21: docker: command not found
––– input –––
docker exec manticore_dist mysql -e "CREATE TABLE dist_table type='distributed' agent='manticore_remote:9312:t';"
––– output –––
+ bash: line 23: docker: command not found
––– input –––
docker exec manticore_dist mysql -e "DESC dist_table"
––– output –––
- +-------------------------+----------+
+ bash: line 25: docker: command not found
- | Agent                   | Type     |
- +-------------------------+----------+
- | manticore_remote:9312:t | remote_1 |
- +-------------------------+----------+
––– input –––
docker exec manticore_dist mysql -e "select * from dist_table where id=2;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
+ bash: line 27: docker: command not found
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values                                 | additional_info                                                                    | vector                               |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
- |    2 | iPhone 13 |              128 | blue  |         2021 | 799.989990 |       719.989990 |    0 |          0 | 4,5,6         | 623456764345678976,9223372036854775807 | {"features":["A15 Bionic chip","Ceramic Shield front cover","Dual-camera system"]} | -0.028894,0.868278,0.211892,0.024594 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+----------------------------------------+------------------------------------------------------------------------------------+--------------------------------------+
test/clt-tests/sharding/test-drop-sharded-clustering-table.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 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 –––
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 –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
- Type: distributed
+  Type: distributed
- Type: distributed
+  Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/core/ test/clt-tests/expected-errors/
✅ OK: 44
❌ Failed: 2
⏳ Duration: 423s
👉 Check Action Results for commit d2ae360
Failed tests:

test/clt-tests/core/show-version-http.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 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
- | Daemon    | %{VERSION}     |
+ | Daemon    | 0.0.0 d2ae36013@25052006         |
test/clt-tests/core/test-writing-binlog-during-parallel-queries.rec
––– input –––
set -b +m; sed -i '/data_dir = \/var\/lib\/manticore/a\    binlog_common = 1\n' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
for i in {1..10}; do rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null; 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; mysql -P9306 -h0 -e "drop table if exists t1"; mysql -P9306 -h0 -e "drop table if exists t2"; for n in 1 2; do mysql -P9306 -h0 -e "create table t${n}"; done; sleep 1; for n in 1 2; do mysql -P9306 -h0 -e "insert into t${n} values(0)" &>/dev/null; done; wait 5>/dev/null 2>&1; echo $?; mysql -P9306 -h0 -e "show tables; select * from t1; select * from t2;"; mysql -P9306 -h0 -e "flush logs"; done
––– output –––
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+
- | id                  |
+ | id               |
- +---------------------+
+ +------------------+
- +---------------------+
+ +------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants