void processRequest(ExLobRequest *request) { Ex_Lob_Error err = LOB_OPER_OK; Int64 descNum; Int64 dataOffset; Int64 operLen; ExLobDescHeader descHeader; ExLob *lobPtr; ExLobDesc desc; ExLobDesc *descPtr; Lng32 clierr; Lng32 handleOutLen; Int64 size; err = lobGlobals->getLobPtr(request->getDescFileName(), lobPtr); if (err != LOB_OPER_OK) { request->setError(LOB_INIT_ERROR); return ; } if (!lobGlobals->isCliInitialized()) { Lng32 clierr = SQL_EXEC_LOBcliInterface(0, 0, 0, 0, 0, 0, LOB_CLI_INIT, LOB_CLI_ExecImmed, 0, 0, 0, 0, 0, 0,FALSE); if (clierr < 0) { request->setError(LOB_INIT_ERROR); return ; } lobGlobals->setCliInitialized(); } switch(request->getType()) { case Lob_Req_Get_Desc: err = lobPtr->getDesc(request); break; default: err = LOB_REQUEST_UNDEFINED_ERROR; printf("bad request = %d\n", request->getType()); break; }; request->setError(err); return; }
void processRequest(ExLobRequest *request) { Ex_Lob_Error err = LOB_OPER_OK; Int64 descNum; Int64 dataOffset; Int64 operLen; ExLobDescHeader descHeader; ExLob *lobPtr; ExLobDesc desc; ExLobDesc *descPtr; Lng32 clierr;\ Lng32 handleOutLen; Int64 size; err = lobGlobals->getLobPtr(request->getDescFileName(), lobPtr); if (err != LOB_OPER_OK) { request->setError(LOB_INIT_ERROR); return ; } if (!lobGlobals->isCliInitialized()) { Lng32 clierr = SQL_EXEC_LOBcliInterface(0, 0, 0, 0, 0, 0, LOB_CLI_INIT, LOB_CLI_ExecImmed, 0, 0, 0, 0, 0, 0); if (clierr < 0) { request->setError(LOB_INIT_ERROR); return ; } lobGlobals->setCliInitialized(); } switch(request->getType()) { case Lob_Req_Allocate_Desc: /* sss no need for this since it's done in master err = lobPtr->allocateDesc(request->getDesc().getSize(), descNum, dataOffset); request->setDescNumOut(descNum); request->setDataOffset(dataOffset); */ err = lobPtr->insertDesc(request); break; case Lob_Req_Append: err = lobPtr->append(request); break; case Lob_Req_Select_Cursor: err = lobPtr->selectCursorDesc(request); break; case Lob_Req_Fetch_Cursor: err = lobPtr->fetchCursorDesc(request); if (request->getCliError() == 100) { lobPtr->closeCursorDesc(request); } break; case Lob_Req_Update: err = lobPtr->update(request); break; case Lob_Req_Get_Desc: err = lobPtr->getDesc(request); break; case Lob_Req_Put_Desc: err = lobPtr->putDesc(request->getDesc(), request->getDescNumIn()); break; case Lob_Req_Del_Desc: err = lobPtr->delDesc(request); break; case Lob_Req_Purge_Desc: /* no op ..it is dropped in mastererr = lobPtr->purgeLob(); if (err == LOB_OPER_OK) { err = lobGlobals->delLobPtr(request->getDescFileName()); } */ break; case Lob_Req_Print: lobPtr->print(); break; default: err = LOB_REQUEST_UNDEFINED_ERROR; printf("bad request = %d\n", request->getType()); break; }; request->setError(err); request->log(); return; }