Merge pull request #5105 from taosdata/fix/TD-2402-v2
[TD-2402]<fix>: set rows <- 1 constantly when update http sql return success
This commit is contained in:
commit
fc429e1271
|
@ -35,7 +35,7 @@ void restBuildSqlAffectRowsJson(HttpContext *pContext, HttpSqlCmd *cmd, int32_t
|
||||||
// data row array end
|
// data row array end
|
||||||
httpJsonToken(jsonBuf, JsonArrEnd);
|
httpJsonToken(jsonBuf, JsonArrEnd);
|
||||||
|
|
||||||
cmd->numOfRows = affect_rows;
|
cmd->numOfRows = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void restStartSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result) {
|
void restStartSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result) {
|
||||||
|
|
|
@ -94,7 +94,7 @@ endi
|
||||||
|
|
||||||
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d1' 127.0.0.1:7111/rest/sql
|
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d1' 127.0.0.1:7111/rest/sql
|
||||||
print 12-> $system_content
|
print 12-> $system_content
|
||||||
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":0}@ then
|
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":1}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ endi
|
||||||
|
|
||||||
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d ' create table d1.t1 (ts timestamp, speed int)' 127.0.0.1:7111/rest/sql
|
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d ' create table d1.t1 (ts timestamp, speed int)' 127.0.0.1:7111/rest/sql
|
||||||
print 22-> $system_content
|
print 22-> $system_content
|
||||||
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":0}@ then
|
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":1}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -214,13 +214,13 @@ endi
|
||||||
|
|
||||||
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d2' 127.0.0.1:7111/rest/sql
|
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d2' 127.0.0.1:7111/rest/sql
|
||||||
print 28-> $system_content
|
print 28-> $system_content
|
||||||
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":0}@ then
|
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":1}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d ' create table d2.t1 (ts timestamp, speed int)' 127.0.0.1:7111/rest/sql
|
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d ' create table d2.t1 (ts timestamp, speed int)' 127.0.0.1:7111/rest/sql
|
||||||
print 29-> $system_content
|
print 29-> $system_content
|
||||||
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":0}@ then
|
if $system_content != @{"status":"succ","head":["affected_rows"],"data":[[0]],"rows":1}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue