fix: case issue and authentication issue
This commit is contained in:
parent
b2fea84a3a
commit
7d5708f224
|
@ -1745,11 +1745,6 @@ int32_t ctgChkSetBasicAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res
|
|||
pRes->pass[AUTH_RES_BASIC] = false;
|
||||
pRes->pCond[AUTH_RES_BASIC] = NULL;
|
||||
|
||||
if (req->tbNotExists) {
|
||||
pRes->pass[AUTH_RES_BASIC] = true;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
if (!pInfo->enable) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
@ -1765,6 +1760,12 @@ int32_t ctgChkSetBasicAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
if (req->tbNotExists) {
|
||||
//pRes->pass[AUTH_RES_BASIC] = true;
|
||||
//return TSDB_CODE_SUCCESS;
|
||||
pReq->tbName.type = TSDB_DB_NAME_T;
|
||||
}
|
||||
|
||||
char dbFName[TSDB_DB_FNAME_LEN];
|
||||
tNameGetFullDbName(&pReq->tbName, dbFName);
|
||||
|
||||
|
@ -1890,13 +1891,12 @@ int32_t ctgChkSetViewAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res)
|
|||
|
||||
int32_t ctgChkSetAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res) {
|
||||
#ifdef TD_ENTERPRISE
|
||||
CTG_ERR_RET(ctgChkSetBasicAuthRes(pCtg, req, res));
|
||||
CTG_ERR_RET(ctgChkSetViewAuthRes(pCtg, req, res));
|
||||
if (req->pRawReq->isView) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
CTG_RET(ctgChkSetViewAuthRes(pCtg, req, res));
|
||||
CTG_RET(ctgChkSetBasicAuthRes(pCtg, req, res));
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -77,7 +77,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;')
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, 23)
|
||||
tdSql.checkData(0, 0, 24)
|
||||
tdSql.checkData(0, 1, 'information_schema')
|
||||
tdSql.checkData(0, 2, None)
|
||||
tdSql.checkData(1, 0, 5)
|
||||
|
@ -93,7 +93,7 @@ class TDTestCase:
|
|||
tdSql.checkData(1, 1, 'performance_schema')
|
||||
tdSql.checkData(0, 0, 3)
|
||||
tdSql.checkData(0, 1, 'tbl_count')
|
||||
tdSql.checkData(2, 0, 23)
|
||||
tdSql.checkData(2, 0, 24)
|
||||
tdSql.checkData(2, 1, 'information_schema')
|
||||
|
||||
tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'")
|
||||
|
@ -106,7 +106,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(*) from information_schema.ins_tables')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 31)
|
||||
tdSql.checkData(0, 0, 32)
|
||||
|
||||
|
||||
tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);')
|
||||
|
@ -189,7 +189,7 @@ class TDTestCase:
|
|||
tdSql.checkData(2, 0, 5)
|
||||
tdSql.checkData(2, 1, 'performance_schema')
|
||||
tdSql.checkData(2, 2, None)
|
||||
tdSql.checkData(3, 0, 23)
|
||||
tdSql.checkData(3, 0, 24)
|
||||
tdSql.checkData(3, 1, 'information_schema')
|
||||
tdSql.checkData(3, 2, None)
|
||||
|
||||
|
@ -204,7 +204,7 @@ class TDTestCase:
|
|||
tdSql.checkData(2, 0, 5)
|
||||
tdSql.checkData(2, 1, 'performance_schema')
|
||||
tdSql.checkData(2, 2, None)
|
||||
tdSql.checkData(3, 0, 23)
|
||||
tdSql.checkData(3, 0, 24)
|
||||
tdSql.checkData(3, 1, 'information_schema')
|
||||
tdSql.checkData(3, 2, None)
|
||||
|
||||
|
@ -215,7 +215,7 @@ class TDTestCase:
|
|||
tdSql.checkData(0, 1, 'tbl_count')
|
||||
tdSql.checkData(1, 0, 5)
|
||||
tdSql.checkData(1, 1, 'performance_schema')
|
||||
tdSql.checkData(2, 0, 23)
|
||||
tdSql.checkData(2, 0, 24)
|
||||
tdSql.checkData(2, 1, 'information_schema')
|
||||
|
||||
tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'")
|
||||
|
@ -228,7 +228,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(*) from information_schema.ins_tables')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 32)
|
||||
tdSql.checkData(0, 0, 33)
|
||||
|
||||
|
||||
tdSql.execute('drop database tbl_count')
|
||||
|
|
Loading…
Reference in New Issue