create table t1 (a int primary key auto_increment, b varchar(100));
2
select http_post("http://localhost:PORT/0.1/sql", 'select * from t1;');;
3
http_post("http://localhost:PORT/0.1/sql", 'select * from t1;')
2
4
{
3
5
"query" : "select * from t1;",
4
6
"result_set" : [
6
8
],
7
9
"sqlstate" : "00000"
8
10
}
11
9
12
insert into t1 (b) values ("from MySQL protocol");
13
select http_post('http://localhost:PORT/0.1/sql', 'select * from t1;');;
14
http_post('http://localhost:PORT/0.1/sql', 'select * from t1;')
10
15
{
11
16
"query" : "select * from t1;",
12
17
"result_set" : [
15
20
],
16
21
"sqlstate" : "00000"
17
22
}
23
24
select http_post('http://localhost:PORT/0.1/sql', 'insert into t1 (b) values (\'from http\');');;
25
http_post('http://localhost:PORT/0.1/sql', 'insert into t1 (b) values (\'from http\');')
18
26
{
19
"error_code" : 1064,
20
"error_message" : "You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'from http' at line 1",
21
"query" : "insert into t1 (b) values (\"from http\";",
27
"query" : "insert into t1 (b) values ('from http');",