You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-17 01:02:23 +03:00
Fixed the msg length in listdirectory again.
This commit is contained in:
@@ -79,13 +79,13 @@ bool ListDirectoryTask::run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// be careful modifying the listdir return types...
|
// be careful modifying the listdir return types...
|
||||||
uint payloadLen = sizeof(listdir_resp_entry) * listing.size();
|
uint payloadLen = sizeof(listdir_resp) + (sizeof(listdir_resp_entry) * listing.size());
|
||||||
for (uint i = 0; i < listing.size(); i++)
|
for (uint i = 0; i < listing.size(); i++)
|
||||||
payloadLen += listing[i].size();
|
payloadLen += listing[i].size();
|
||||||
|
|
||||||
sm_msg_resp *resp = (sm_msg_resp *) buf;
|
sm_msg_resp *resp = (sm_msg_resp *) buf;
|
||||||
resp->type = SM_MSG_START;
|
resp->type = SM_MSG_START;
|
||||||
resp->payloadLen = payloadLen + sizeof(listdir_resp);
|
resp->payloadLen = payloadLen + 4; // the +4 is for the length of the return code
|
||||||
resp->returnCode = 0;
|
resp->returnCode = 0;
|
||||||
listdir_resp *r = (listdir_resp *) resp->payload;
|
listdir_resp *r = (listdir_resp *) resp->payload;
|
||||||
r->elements = listing.size();
|
r->elements = listing.size();
|
||||||
|
|||||||
Reference in New Issue
Block a user