mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-07 05:42:57 +00:00
* feat: introduce read preference * feat: introduce `RegionQueryHandlerFactory` * feat: extract ReadPreference from http header * test: add more tests * chore: apply suggestions from CR * chore: apply suggestions from CR
29 lines
614 B
Plaintext
29 lines
614 B
Plaintext
-- SQLNESS PROTOCOL MYSQL
|
|
SELECT read_preference();
|
|
|
|
+-------------------+
|
|
| read_preference() |
|
|
+-------------------+
|
|
| LEADER |
|
|
+-------------------+
|
|
|
|
-- SQLNESS PROTOCOL MYSQL
|
|
SET read_preference = 'hi';
|
|
|
|
Failed to execute query, err: MySqlError { ERROR 1235 (42000): (Unsupported): Not supported: Invalid read preference expr hi in set variable statement }
|
|
|
|
-- SQLNESS PROTOCOL MYSQL
|
|
SET read_preference = 'leader';
|
|
|
|
affected_rows: 0
|
|
|
|
-- SQLNESS PROTOCOL MYSQL
|
|
SELECT read_preference();
|
|
|
|
+-------------------+
|
|
| read_preference() |
|
|
+-------------------+
|
|
| LEADER |
|
|
+-------------------+
|
|
|