Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
This commit is contained in:
@ -20,238 +20,238 @@
|
||||
|
||||
using std::string;
|
||||
|
||||
const char* test1_json
|
||||
= "{"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/servers/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"server1\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"Read-Connection-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3000,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Master, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3000,"
|
||||
" \"master_id\": -1,"
|
||||
" \"replication_depth\": 0,"
|
||||
" \"slaves\": ["
|
||||
" 3001,"
|
||||
" 3002,"
|
||||
" 3003"
|
||||
" ],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server2\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3001,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3001,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server3\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3002,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3002,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server4\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3003,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3003,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" }"
|
||||
" ]"
|
||||
"}";
|
||||
const char* test1_json =
|
||||
"{"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/servers/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"server1\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"Read-Connection-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3000,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Master, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3000,"
|
||||
" \"master_id\": -1,"
|
||||
" \"replication_depth\": 0,"
|
||||
" \"slaves\": ["
|
||||
" 3001,"
|
||||
" 3002,"
|
||||
" 3003"
|
||||
" ],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server2\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3001,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3001,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server3\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3002,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3002,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"server4\","
|
||||
" \"type\": \"servers\","
|
||||
" \"relationships\": {"
|
||||
" \"services\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/services/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"SchemaRouter-Router\","
|
||||
" \"type\": \"services\""
|
||||
" },"
|
||||
" {"
|
||||
" \"id\": \"RW-Split-Hint-Router\","
|
||||
" \"type\": \"services\""
|
||||
" }"
|
||||
" ]"
|
||||
" },"
|
||||
" \"monitors\": {"
|
||||
" \"links\": {"
|
||||
" \"self\": \"http://localhost:8989/v1/monitors/\""
|
||||
" },"
|
||||
" \"data\": ["
|
||||
" {"
|
||||
" \"id\": \"MySQL-Monitor\","
|
||||
" \"type\": \"monitors\""
|
||||
" }"
|
||||
" ]"
|
||||
" }"
|
||||
" },"
|
||||
" \"attributes\": {"
|
||||
" \"parameters\": {"
|
||||
" \"address\": \"127.0.0.1\","
|
||||
" \"port\": 3003,"
|
||||
" \"protocol\": \"MySQLBackend\""
|
||||
" },"
|
||||
" \"status\": \"Slave, Running\","
|
||||
" \"version_string\": \"10.1.19-MariaDB-1~jessie\","
|
||||
" \"node_id\": 3003,"
|
||||
" \"master_id\": 3000,"
|
||||
" \"replication_depth\": 1,"
|
||||
" \"slaves\": [],"
|
||||
" \"statistics\": {"
|
||||
" \"connections\": 0,"
|
||||
" \"total_connections\": 0,"
|
||||
" \"active_operations\": 0"
|
||||
" }"
|
||||
" }"
|
||||
" }"
|
||||
" ]"
|
||||
"}";
|
||||
|
||||
int test1()
|
||||
{
|
||||
|
Reference in New Issue
Block a user