use conditstr instead stringset, add pop exception
parent
989650e90b
commit
09a47596f3
|
@ -28,8 +28,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
stringset(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
||||||
|
|
||||||
if(RC_SUCC != lClick(pstSavm, (void *)&uTime))
|
if(RC_SUCC != lClick(pstSavm, (void *)&uTime))
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,8 +28,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
stringset(pstSavm, stUser, user_no, "20180224"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_no, "20180224"); // 查询条件赋值
|
||||||
|
|
||||||
if(RC_SUCC != lCount(pstSavm, (void *)&lRow))
|
if(RC_SUCC != lCount(pstSavm, (void *)&lRow))
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,8 +27,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
stringset(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
||||||
|
|
||||||
if(RC_SUCC != lDelete(pstSavm))
|
if(RC_SUCC != lDelete(pstSavm))
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
|
|
||||||
decorate(pstSavm, dbUser, user_nm, MATCH_MIN);
|
decorate(pstSavm, dbUser, user_nm, MATCH_MIN);
|
||||||
decorate(pstSavm, dbUser, user_phone, MATCH_MAX);
|
decorate(pstSavm, dbUser, user_phone, MATCH_MAX);
|
||||||
|
|
|
@ -28,7 +28,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
|
|
||||||
decorate(pstSavm, dbUser, user_nm, GROUP_BY | ORDER_ASC);
|
decorate(pstSavm, dbUser, user_nm, GROUP_BY | ORDER_ASC);
|
||||||
decorate(pstSavm, dbUser, user_phone, GROUP_BY | ORDER_DESC);
|
decorate(pstSavm, dbUser, user_phone, GROUP_BY | ORDER_DESC);
|
||||||
|
|
|
@ -28,8 +28,8 @@ long lSelectUserInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
stringset(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
||||||
|
|
||||||
for(i = 0; i < 2000000; i ++)
|
for(i = 0; i < 2000000; i ++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,8 +28,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
conditinit(pstSavm, stUser, TBL_USER_INFO); // 绑定变量
|
||||||
stringset(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_type, "1"); // 查询条件赋值
|
||||||
stringset(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
conditstr(pstSavm, stUser, user_no, "20180223"); // 查询条件赋值
|
||||||
|
|
||||||
if(RC_SUCC != lQuery(pstSavm, &lRow, (void **)&pstUser))
|
if(RC_SUCC != lQuery(pstSavm, &lRow, (void **)&pstUser))
|
||||||
{
|
{
|
||||||
|
|
10
src/queue.c
10
src/queue.c
|
@ -82,7 +82,7 @@ long _lPush(SATvm *pstSavm, void *pvAddr)
|
||||||
*************************************************************************************************/
|
*************************************************************************************************/
|
||||||
long _lPop(SATvm *pstSavm, void *pvAddr, void *pvOut, Timesp *tm)
|
long _lPop(SATvm *pstSavm, void *pvAddr, void *pvOut, Timesp *tm)
|
||||||
{
|
{
|
||||||
int nPos;
|
int nPos, i = 0;
|
||||||
SHTruck *ps = NULL;
|
SHTruck *ps = NULL;
|
||||||
extern int errno;
|
extern int errno;
|
||||||
TblDef *pv = (TblDef *)pvAddr;
|
TblDef *pv = (TblDef *)pvAddr;
|
||||||
|
@ -126,7 +126,15 @@ retry:
|
||||||
|
|
||||||
ps = (PSHTruck)pGetNode(pvAddr, pv->m_lData + pv->m_lTruck * nPos);
|
ps = (PSHTruck)pGetNode(pvAddr, pv->m_lData + pv->m_lTruck * nPos);
|
||||||
if(IS_TRUCK_NULL(ps))
|
if(IS_TRUCK_NULL(ps))
|
||||||
|
{
|
||||||
|
if((++ i) > pv->m_lMaxRow)
|
||||||
|
{
|
||||||
|
pstSavm->m_lErrno = SVR_EXCEPTION;
|
||||||
|
return RC_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
goto retry;
|
goto retry;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(pvOut, ps->m_pvData, pv->m_lReSize);
|
memcpy(pvOut, ps->m_pvData, pv->m_lReSize);
|
||||||
SET_DATA_TRUCK(ps, DATA_TRUCK_NULL);
|
SET_DATA_TRUCK(ps, DATA_TRUCK_NULL);
|
||||||
|
|
Loading…
Reference in New Issue