Open donhardman opened 1 month ago
It's important in this task to test various types of queries that get routed to Buddy:
multi-query sql over mysql (select ...; show meta
, use DELIMITER
), e.g.:
mysql> DELIMITER |
mysql> select * from t; show meta;|
+------+------------------------+
| id | f |
+------+------------------------+
| 1 | efficiency improvement |
+------+------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| total | 1 |
| total_found | 1 |
| total_relation | eq |
| time | 0.000 |
+----------------+-------+
4 rows in set (0.00 sec)
/sql
, /sql?mode=raw
, /cli
http://localhost:9308/cli_json?select%20*%20from%20t;show%20meta
)It's important in this task to test various types of queries that get routed to Buddy:
Dupe of https://github.com/manticoresoftware/manticoresearch-buddy/issues/369#issuecomment-2430993567 . May have been already done by the moment we get to this task.
Proposal:
It seems that it's a good idea to cover Buddy protocol with CLT tests. To do so, we can simply send various queries to different endpoints that will be routed to Buddy and check in the log with
--debugv
mode that we haverequest data:
there and it has the proper structure as follows in our declaration of protocol: https://github.com/manticoresoftware/manticoresearch-buddy?tab=readme-ov-file#communication-protocol-v2For example, when we send a query to
/sql
or/sql?mode=raw
, we should expect to receive an 'Unknown SQL request' message from the daemon to Buddy, along with a properly parsedbody
.Related issue: https://github.com/manticoresoftware/manticoresearch/issues/2603
Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.