微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

xsql---Buffer too small for record data



The situation here is the inability of Rsql server to serializethe query’s response. The cause of the failure is that the size of the bufferRsql uses for the serialization procedure is just not large enough to fit allthe data. In their query,Fiberhome requires all instances ofclass OltGlobalCfg. They have just one instance of this class (a kind ofsystem configuration structure) Analyzing the class we found that it’s huge.Moreover it has  a complicated structure. The largestfield onuApMacInfo is an array of structures. This structure of the classrequires even more buffer size,so Rsql Failed to serialize the whole instanceof the class,but was able to return a partial request. 

 

To resolve this,our recommendation is to increase the buffersize. The size can be specified as one of sqlServer constructor parameters. Thedefault value is 64K,but we recommend specifying at least 256K. Here is theirRsql initialization procedure (from db_common/src/sqlintf.cpp):

int start_sqlsvr(int isMst)

{

               int iPort = SERVER_PORT + (isMst?0:1000);

               

               server = new sqlServer(&engine,iPort);

               server->start();

               return 0;

}

Please add another parameter to the constructor call,like thefollowing:

And,of course,re-build their application.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐