fix errno
parent
9af0bea6fb
commit
7e155af62c
|
@ -110,9 +110,10 @@ STVM也提供一个类型sqlpuls类型简单工具。
|
||||||
>* 2、在M-SQL支持查询索引 show index from tablename
|
>* 2、在M-SQL支持查询索引 show index from tablename
|
||||||
>* 3、新增用户M-SQL用户体验(TAB补全、查询展示showmode、showsize)
|
>* 3、新增用户M-SQL用户体验(TAB补全、查询展示showmode、showsize)
|
||||||
|
|
||||||
====***更新日期:20180531***====
|
====***更新日期:20180610***====
|
||||||
|
|
||||||
>* 1、新增queue功能
|
>* 1、新增queue网络同步异步接口
|
||||||
|
>* 1、新增将表中长时间无用数据导出备份接口
|
||||||
|
|
||||||
**下本版本:**
|
**下本版本:**
|
||||||
* 1、新增多机资源共享方式。
|
* 1、新增多机资源共享方式。
|
||||||
|
|
|
@ -310,6 +310,7 @@ typedef long CREATE;
|
||||||
#define MQUE_WAIT_ERR 98 // queue waiting for failure
|
#define MQUE_WAIT_ERR 98 // queue waiting for failure
|
||||||
#define MQUE_CRTE_BIG 99 // created queue is too big
|
#define MQUE_CRTE_BIG 99 // created queue is too big
|
||||||
#define NOT_SUPPT_OPT 100 // queue does not support this operation
|
#define NOT_SUPPT_OPT 100 // queue does not support this operation
|
||||||
|
#define SERV_NOT_CONN 101 // not connect server
|
||||||
|
|
||||||
/*************************************************************************************************
|
/*************************************************************************************************
|
||||||
创建表宏函数
|
创建表宏函数
|
||||||
|
|
21
src/stvm.c
21
src/stvm.c
|
@ -4892,7 +4892,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
vCheckTvmEnv();
|
vCheckTvmEnv();
|
||||||
memset(szCom, 0, sizeof(szCom));
|
memset(szCom, 0, sizeof(szCom));
|
||||||
while(-1 != (iChoose = getopt(argc, argv, "w::s::p::f::d:m:t:i:l:c:v?::")))
|
while(-1 != (iChoose = getopt(argc, argv, "w::s::p::f::d:m:t:i:u:l:c:v?::")))
|
||||||
{
|
{
|
||||||
switch(iChoose)
|
switch(iChoose)
|
||||||
{
|
{
|
||||||
|
@ -4904,9 +4904,13 @@ int main(int argc, char *argv[])
|
||||||
case 'p':
|
case 'p':
|
||||||
vPrintParam(optarg);
|
vPrintParam(optarg);
|
||||||
return RC_SUCC;
|
return RC_SUCC;
|
||||||
|
case 'u':
|
||||||
|
lAction |= 2;
|
||||||
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
vTableStruck(atol(optarg));
|
lAction |= 1;
|
||||||
return RC_SUCC;
|
table = atol(optarg);
|
||||||
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
if(RC_SUCC != lDumpTable(pstSavm, atol(optarg)))
|
if(RC_SUCC != lDumpTable(pstSavm, atol(optarg)))
|
||||||
fprintf(stderr, "dump table error, %s\n", sGetTError(pstSavm->m_lErrno));
|
fprintf(stderr, "dump table error, %s\n", sGetTError(pstSavm->m_lErrno));
|
||||||
|
@ -4943,6 +4947,17 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(1 == lAction)
|
||||||
|
{
|
||||||
|
vTableStruck(atol(optarg));
|
||||||
|
return RC_SUCC;
|
||||||
|
}
|
||||||
|
else if(2 == lAction)
|
||||||
|
{
|
||||||
|
// vTableStruck(atol(optarg));
|
||||||
|
return RC_SUCC;
|
||||||
|
}
|
||||||
|
|
||||||
vPrintFunc(basename(argv[0]));
|
vPrintFunc(basename(argv[0]));
|
||||||
return RC_SUCC;
|
return RC_SUCC;
|
||||||
}
|
}
|
||||||
|
|
52
src/tcp.c
52
src/tcp.c
|
@ -4397,7 +4397,7 @@ long lTvmPopup(SATvm *pstSavm, size_t lExpect, time_t lTime, size_t *plOut, v
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4466,7 +4466,7 @@ long lTvmPop(SATvm *pstSavm, void *pvOut, Uenum eWait)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4528,7 +4528,7 @@ long lTvmSelect(SATvm *pstSavm, void *pvOut)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4596,7 +4596,7 @@ long lTvmQuery(SATvm *pstSavm, size_t *plOut, void **ppvOut)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4670,7 +4670,7 @@ long lAsyDelete(SATvm *pstSavm)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4720,7 +4720,7 @@ long lAsyUpdate(SATvm *pstSavm, void *pvData)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4777,7 +4777,7 @@ long lAsyReplace(SATvm *pstSavm, void *pvData)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4832,7 +4832,7 @@ long lAsyInsert(SATvm *pstSavm)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4880,7 +4880,7 @@ long lAsyPush(SATvm *pstSavm)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4928,7 +4928,7 @@ long lTvmPush(SATvm *pstSavm)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4987,7 +4987,7 @@ long lTvmInsert(SATvm *pstSavm)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5046,7 +5046,7 @@ long lTvmDelete(SATvm *pstSavm)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5108,7 +5108,7 @@ long lTvmUpdate(SATvm *pstSavm, void *pvData)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5177,7 +5177,7 @@ long lTvmReplace(SATvm *pstSavm, void *pvData)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5244,7 +5244,7 @@ long lTvmTruncate(SATvm *pstSavm, TABLE t)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5300,7 +5300,7 @@ long lTvmGroup(SATvm *pstSavm, size_t *plOut, void **ppvOut)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5381,7 +5381,7 @@ long lTvmCount(SATvm *pstSavm, size_t *plCount)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5443,7 +5443,7 @@ long lTvmExtreme(SATvm *pstSavm, void *pvOut)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5515,7 +5515,7 @@ long lTvmDropTable(SATvm *pstSavm, TABLE t)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5569,7 +5569,7 @@ long lTvmRenameTable(SATvm *pstSavm, TABLE to, TABLE tn)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5624,7 +5624,7 @@ long lTvmClick(SATvm *pstSavm, ulong *pulHits)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5692,7 +5692,7 @@ long lTvmSelectSeque(SATvm *pstSavm, char *pszSQName, ulong *pulNumber)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5755,7 +5755,7 @@ long lTvmSetSequence(SATvm *pstSavm, char *pszSQName, ulong uStart)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5811,7 +5811,7 @@ long lTvmRebuildIndex(SATvm *pstSavm, TABLE t)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5863,7 +5863,7 @@ long lTvmResetLock(SATvm *pstSavm, TABLE t)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5915,7 +5915,7 @@ long _lTvmWork(SATvm *pstSavm, Benum eWork)
|
||||||
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
pstRun = (RunTime *)pGetRunTime(pstSavm, 0);
|
||||||
if(!pstRun->pstVoid)
|
if(!pstRun->pstVoid)
|
||||||
{
|
{
|
||||||
pstSavm->m_lErrno = DOM_NOT_INITL;
|
pstSavm->m_lErrno = SERV_NOT_CONN;
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ static char tvmerr[128][MAX_INDEX_LEN] = {
|
||||||
"queue waiting for failure",
|
"queue waiting for failure",
|
||||||
"created queue is too big",
|
"created queue is too big",
|
||||||
"queue does not support this operation",
|
"queue does not support this operation",
|
||||||
|
"not connect to server",
|
||||||
"",
|
"",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue