提交 0ec76286 编写于 作者: D dapan1121

fix bug

上级 72f94210
...@@ -1518,6 +1518,8 @@ int tscAlterDbMsg(SSqlObj *pSql, SSqlInfo *pInfo) { ...@@ -1518,6 +1518,8 @@ int tscAlterDbMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pCmd->msgType = (pInfo->pMiscInfo->dbOpt.dbType == TSDB_DB_TYPE_DEFAULT) ? TSDB_MSG_TYPE_CM_ALTER_DB : TSDB_MSG_TYPE_CM_ALTER_TP; pCmd->msgType = (pInfo->pMiscInfo->dbOpt.dbType == TSDB_DB_TYPE_DEFAULT) ? TSDB_MSG_TYPE_CM_ALTER_DB : TSDB_MSG_TYPE_CM_ALTER_TP;
SAlterDbMsg *pAlterDbMsg = (SAlterDbMsg* )pCmd->payload; SAlterDbMsg *pAlterDbMsg = (SAlterDbMsg* )pCmd->payload;
pAlterDbMsg->dbType = -1;
STableMetaInfo *pTableMetaInfo = tscGetTableMetaInfoFromCmd(pCmd, pCmd->clauseIndex, 0); STableMetaInfo *pTableMetaInfo = tscGetTableMetaInfoFromCmd(pCmd, pCmd->clauseIndex, 0);
tNameExtractFullName(&pTableMetaInfo->name, pAlterDbMsg->db); tNameExtractFullName(&pTableMetaInfo->name, pAlterDbMsg->db);
......
...@@ -238,6 +238,7 @@ ...@@ -238,6 +238,7 @@
#define TK_SPACE 300 #define TK_SPACE 300
#define TK_COMMENT 301 #define TK_COMMENT 301
#define TK_ILLEGAL 302 #define TK_ILLEGAL 302
......
...@@ -936,10 +936,10 @@ void setDefaultCreateDbOption(SCreateDbInfo *pDBInfo) { ...@@ -936,10 +936,10 @@ void setDefaultCreateDbOption(SCreateDbInfo *pDBInfo) {
pDBInfo->keep = NULL; pDBInfo->keep = NULL;
pDBInfo->update = -1; pDBInfo->update = -1;
pDBInfo->cachelast = 0; pDBInfo->cachelast = -1;
pDBInfo->dbType = TSDB_DB_TYPE_DEFAULT; pDBInfo->dbType = -1;
pDBInfo->partitions = TSDB_DEFAULT_DB_PARTITON_OPTION; pDBInfo->partitions = -1;
memset(&pDBInfo->precision, 0, sizeof(SStrToken)); memset(&pDBInfo->precision, 0, sizeof(SStrToken));
} }
......
...@@ -2682,7 +2682,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -2682,7 +2682,7 @@ static YYACTIONTYPE yy_reduce(
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break; break;
case 93: /* db_optr ::= */ case 93: /* db_optr ::= */
{setDefaultCreateDbOption(&yymsp[1].minor.yy100);} {setDefaultCreateDbOption(&yymsp[1].minor.yy100); yymsp[1].minor.yy100.dbType = TSDB_DB_TYPE_DEFAULT;}
break; break;
case 94: /* db_optr ::= db_optr cache */ case 94: /* db_optr ::= db_optr cache */
{ yylhsminor.yy100 = yymsp[-1].minor.yy100; yylhsminor.yy100.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } { yylhsminor.yy100 = yymsp[-1].minor.yy100; yylhsminor.yy100.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
...@@ -2764,7 +2764,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -2764,7 +2764,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy100 = yylhsminor.yy100; yymsp[-1].minor.yy100 = yylhsminor.yy100;
break; break;
case 111: /* alter_db_optr ::= */ case 111: /* alter_db_optr ::= */
{ setDefaultCreateDbOption(&yymsp[1].minor.yy100);} { setDefaultCreateDbOption(&yymsp[1].minor.yy100); yymsp[1].minor.yy100.dbType = TSDB_DB_TYPE_DEFAULT;}
break; break;
case 123: /* typename ::= ids */ case 123: /* typename ::= ids */
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册