diff --git a/docs/en/12-taos-sql/27-indexing.md b/docs/en/12-taos-sql/27-indexing.md index a89c8929c1..1badd38d17 100644 --- a/docs/en/12-taos-sql/27-indexing.md +++ b/docs/en/12-taos-sql/27-indexing.md @@ -19,6 +19,9 @@ index_option: functions: function [, function] ... ``` +### tag Indexing + + [tag index](../tag-index) ### SMA Indexing diff --git a/docs/zh/12-taos-sql/27-index.md b/docs/zh/12-taos-sql/27-indexing.md similarity index 98% rename from docs/zh/12-taos-sql/27-index.md rename to docs/zh/12-taos-sql/27-indexing.md index da8f38eb22..cf8cac1bed 100644 --- a/docs/zh/12-taos-sql/27-index.md +++ b/docs/zh/12-taos-sql/27-indexing.md @@ -20,6 +20,9 @@ index_option: functions: function [, function] ... ``` +### tag 索引 + + [tag 索引](../tag-index) ### SMA 索引 diff --git a/docs/zh/20-third-party/70-seeq.md b/docs/zh/20-third-party/70-seeq.md new file mode 100644 index 0000000000..0bdf58955d --- /dev/null +++ b/docs/zh/20-third-party/70-seeq.md @@ -0,0 +1,437 @@ +--- +sidebar_label: Seeq +title: Seeq +description: 如何使用 Seeq 和 TDengine 进行时序数据分析 +--- + +# 如何使用 Seeq 和 TDengine 进行时序数据分析 + +## 方案介绍 + +Seeq 是制造业和工业互联网(IIOT)高级分析软件。Seeq 支持在工艺制造组织中使用机器学习创新的新功能。这些功能使组织能够将自己或第三方机器学习算法部署到前线流程工程师和主题专家使用的高级分析应用程序,从而使单个数据科学家的努力扩展到许多前线员工。 + +通过 TDengine Java connector, Seeq 可以轻松支持查询 TDengine 提供的时序数据,并提供数据展现、分析、预测等功能。 + +### Seeq 安装方法 + +从 (Seeq 官网)[https://www.seeq.com/customer-download]下载相关软件,例如 Seeq Server 和 Seeq Data Lab 等。 + +### Seeq Server 安装和启动 + +``` +tar xvzf seeq-server-xxx.tar.gz +cd seeq-server-installer +sudo ./install + +sudo seeq service enable +sudo seeq start +``` + +### Seeq Data Lab Server 安装和启动 + +Seeq Data Lab 需要安装在和 Seeq Server 不同的服务器上,并通过配置和 Seeq Server 互联。详细安装配置指令参见(Seeq 官方文档)[https://support.seeq.com/space/KB/1034059842]。 + +``` +tar xvf seeq-data-lab--64bit-linux.tar.gz +sudo seeq-data-lab-installer/install -f /opt/seeq/seeq-data-lab -g /var/opt/seeq -u seeq +sudo seeq config set Network/DataLab/Hostname localhost +sudo seeq config set Network/DataLab/Port 34231 # the port of the Data Lab server (usually 34231) +sudo seeq config set Network/Hostname # the host IP or URL of the main Seeq Server + +# If the main Seeq server is configured to listen over HTTPS +sudo seeq config set Network/Webserver/SecurePort 443 # the secure port of the main Seeq Server (usually 443) + +# If the main Seeq server is NOT configured to listen over HTTPS +sudo seeq config set Network/Webserver/Port + +#On the main Seeq server, open a Seeq Command Prompt and set the hostname of the Data Lab server: +sudo seeq config set Network/DataLab/Hostname # the host IP (not URL) of the Data Lab server +sudo seeq config set Network/DataLab/Port 34231 # the port of the Data Lab server (usually 34231 +``` + +## TDengine 本地实例安装方法 + +请参考(官网文档)[https://docs.taosdata.com/get-started/package/]。 + +## TDengine Cloud 访问方法 +如果使用 Seeq 连接 TDengine Cloud,请在 https://cloud.taosdata.com 申请帐号并登录查看如何访问 TDengine Cloud。 + +## 如何配置 Seeq 访问 TDengine + +1. 查看 data 存储位置 + +``` +sudo seeq config get Folders/Data +``` + +2. 从 maven.org 下载 TDengine Java connector 包,目前最新版本为(3.2.4)[https://repo1.maven.org/maven2/com/taosdata/jdbc/taos-jdbcdriver/3.2.4/taos-jdbcdriver-3.2.4-dist.jar],并拷贝至 data 存储位置的 plugins\lib 中。 + +3. 重新启动 seeq server + +``` +sudo seeq restart +``` + +4. 输入 License + +使用浏览器访问 ip:34216 并按照说明输入 license。 + +## 使用 Seeq 分析 TDengine 时序数据 + +本章节演示如何使用 Seeq 软件配合 TDengine 进行时序数据分析。 + +### 场景介绍 + +示例场景为一个电力系统,用户每天从电站仪表收集用电量数据,并将其存储在 TDengine 集群中。现在用户想要预测电力消耗将会如何发展,并购买更多设备来支持它。用户电力消耗随着每月订单变化而不同,另外考虑到季节变化,电力消耗量会有所不同。这个城市位于北半球,所以在夏天会使用更多的电力。我们模拟数据来反映这些假定。 + +### 数据 Schema + +``` +CREATE STABLE meters (ts TIMESTAMP, num INT, temperature FLOAT, goods INT) TAGS (device NCHAR(20)); +CREATE TABLE goods (ts1 TIMESTAMP, ts2 TIMESTAMP, goods FLOAT); +``` + +!(Seeq demo schema)[./seeq/seeq-demo-schema.webp] + +### 构造数据方法 + +``` +python mockdata.py +taos -s "insert into power.goods select _wstart, _wstart + 10d, avg(goods) from power.meters interval(10d);" +``` +源代码托管在(github 仓库)[https://github.com/sangshuduo/td-forecasting]。 + +### 使用 Seeq 进行数据分析 + +#### 配置数据源(Data Source) + +使用 Seeq 管理员角色的帐号登录,并新建数据源。 + +- Power + +``` +{ + "QueryDefinitions": [ + { + "Name": "PowerNum", + "Type": "SIGNAL", + "Sql": "SELECT ts, num FROM meters", + "Enabled": true, + "TestMode": false, + "TestQueriesDuringSync": true, + "InProgressCapsulesEnabled": false, + "Variables": null, + "Properties": [ + { + "Name": "Name", + "Value": "Num", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Interpolation Method", + "Value": "linear", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Maximum Interpolation", + "Value": "2day", + "Sql": null, + "Uom": "string" + } + ], + "CapsuleProperties": null + } + ], + "Type": "GENERIC", + "Hostname": null, + "Port": 0, + "DatabaseName": null, + "Username": "root", + "Password": "taosdata", + "InitialSql": null, + "TimeZone": null, + "PrintRows": false, + "UseWindowsAuth": false, + "SqlFetchBatchSize": 100000, + "UseSSL": false, + "JdbcProperties": null, + "GenericDatabaseConfig": { + "DatabaseJdbcUrl": "jdbc:TAOS-RS://127.0.0.1:6041/power?user=root&password=taosdata", + "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver", + "ResolutionInNanoseconds": 1000, + "ZonedColumnTypes": [] + } +} +``` + +- Goods + +``` +{ + "QueryDefinitions": [ + { + "Name": "PowerGoods", + "Type": "CONDITION", + "Sql": "SELECT ts1, ts2, goods FROM power.goods", + "Enabled": true, + "TestMode": false, + "TestQueriesDuringSync": true, + "InProgressCapsulesEnabled": false, + "Variables": null, + "Properties": [ + { + "Name": "Name", + "Value": "Goods", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Maximum Duration", + "Value": "10days", + "Sql": null, + "Uom": "string" + } + ], + "CapsuleProperties": [ + { + "Name": "goods", + "Value": "${columnResult}", + "Column": "goods", + "Uom": "string" + } + ] + } + ], + "Type": "GENERIC", + "Hostname": null, + "Port": 0, + "DatabaseName": null, + "Username": "root", + "Password": "taosdata", + "InitialSql": null, + "TimeZone": null, + "PrintRows": false, + "UseWindowsAuth": false, + "SqlFetchBatchSize": 100000, + "UseSSL": false, + "JdbcProperties": null, + "GenericDatabaseConfig": { + "DatabaseJdbcUrl": "jdbc:TAOS-RS://127.0.0.1:6041/power?user=root&password=taosdata", + "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver", + "ResolutionInNanoseconds": 1000, + "ZonedColumnTypes": [] + } +} +``` + +- Temperature + +``` +{ + "QueryDefinitions": [ + { + "Name": "PowerNum", + "Type": "SIGNAL", + "Sql": "SELECT ts, temperature FROM meters", + "Enabled": true, + "TestMode": false, + "TestQueriesDuringSync": true, + "InProgressCapsulesEnabled": false, + "Variables": null, + "Properties": [ + { + "Name": "Name", + "Value": "Temperature", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Interpolation Method", + "Value": "linear", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Maximum Interpolation", + "Value": "2day", + "Sql": null, + "Uom": "string" + } + ], + "CapsuleProperties": null + } + ], + "Type": "GENERIC", + "Hostname": null, + "Port": 0, + "DatabaseName": null, + "Username": "root", + "Password": "taosdata", + "InitialSql": null, + "TimeZone": null, + "PrintRows": false, + "UseWindowsAuth": false, + "SqlFetchBatchSize": 100000, + "UseSSL": false, + "JdbcProperties": null, + "GenericDatabaseConfig": { + "DatabaseJdbcUrl": "jdbc:TAOS-RS://127.0.0.1:6041/power?user=root&password=taosdata", + "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver", + "ResolutionInNanoseconds": 1000, + "ZonedColumnTypes": [] + } +} +``` + +#### 使用 Seeq Workbench + +登录 Seeq 服务页面并新建 Seeq Workbench,通过选择数据源搜索结果和根据需要选择不同的工具,可以进行数据展现或预测,详细使用方法参见(官方知识库)[https://support.seeq.com/space/KB/146440193/Seeq+Workbench]。 + +!(Seeq Workbench)[./seeq/seeq-demo-workbench.webp] + +#### 用 Seeq Data Lab Server 进行进一步的数据分析 + +登录 Seeq 服务页面并新建 Seeq Data Lab,可以进一步使用 Python 编程或其他机器学习工具进行更复杂的数据挖掘功能。 + +```Python +from seeq import spy +spy.options.compatibility = 189 +import pandas as pd +import matplotlib +import matplotlib.pyplot as plt +import mlforecast +import lightgbm as lgb +from mlforecast.target_transforms import Differences +from sklearn.linear_model import LinearRegression + +ds = spy.search({'ID': "8C91A9C7-B6C2-4E18-AAAF-XXXXXXXXX"}) +print(ds) + +sig = ds.loc[ds['Name'].isin(['Num'])] +print(sig) + +data = spy.pull(sig, start='2015-01-01', end='2022-12-31', grid=None) +print("data.info()") +data.info() +print(data) +#data.plot() + +print("data[Num].info()") +data['Num'].info() +da = data['Num'].index.tolist() +#print(da) + +li = data['Num'].tolist() +#print(li) + +data2 = pd.DataFrame() +data2['ds'] = da +print('1st data2 ds info()') +data2['ds'].info() + +#data2['ds'] = pd.to_datetime(data2['ds']).to_timestamp() +data2['ds'] = pd.to_datetime(data2['ds']).astype('int64') +data2['y'] = li +print('2nd data2 ds info()') +data2['ds'].info() +print(data2) + +data2.insert(0, column = "unique_id", value="unique_id") + +print("Forecasting ...") + +forecast = mlforecast.MLForecast( + models = lgb.LGBMRegressor(), + freq = 1, + lags=[365], + target_transforms=[Differences([365])], +) + +forecast.fit(data2) +predicts = forecast.predict(365) + +pd.concat([data2, predicts]).set_index("ds").plot(title = "current data with forecast") +plt.show() +``` + +运行程序输出结果: + +!(Seeq forecast result)[./seeq/seeq-forecast-result.webp] + +### 配置 Seeq 数据源连接 TDengine Cloud + +配置 Seeq 数据源连接 TDengine Cloud 和连接 TDengine 本地安装实例没有本质的不同,只要登录 TDengine Cloud 后选择“编程 - Java”并拷贝带 token 字符串的 JDBC 填写为 Seeq Data Source 的 DatabaseJdbcUrl 值。 +注意使用 TDengine Cloud 时 SQL 命令中需要指定数据库名称。 + +#### 用 TDengine Cloud 作为数据源的配置内容示例: + +``` +{ + "QueryDefinitions": [ + { + "Name": "CloudVoltage", + "Type": "SIGNAL", + "Sql": "SELECT ts, voltage FROM test.meters", + "Enabled": true, + "TestMode": false, + "TestQueriesDuringSync": true, + "InProgressCapsulesEnabled": false, + "Variables": null, + "Properties": [ + { + "Name": "Name", + "Value": "Voltage", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Interpolation Method", + "Value": "linear", + "Sql": null, + "Uom": "string" + }, + { + "Name": "Maximum Interpolation", + "Value": "2day", + "Sql": null, + "Uom": "string" + } + ], + "CapsuleProperties": null + } + ], + "Type": "GENERIC", + "Hostname": null, + "Port": 0, + "DatabaseName": null, + "Username": "root", + "Password": "taosdata", + "InitialSql": null, + "TimeZone": null, + "PrintRows": false, + "UseWindowsAuth": false, + "SqlFetchBatchSize": 100000, + "UseSSL": false, + "JdbcProperties": null, + "GenericDatabaseConfig": { + "DatabaseJdbcUrl": "jdbc:TAOS-RS://gw.cloud.taosdata.com?useSSL=true&token=41ac9d61d641b6b334e8b76f45f5a8XXXXXXXXXX", + "SqlDriverClassName": "com.taosdata.jdbc.rs.RestfulDriver", + "ResolutionInNanoseconds": 1000, + "ZonedColumnTypes": [] + } +} +``` + +#### TDengine Cloud 作为数据源的 Seeq Workbench 界面示例 + +!(Seeq workbench with TDengine cloud)[./seeq/seeq-workbench-with-tdengine-cloud.webp] + +## 方案总结 + +通过集成Seeq和TDengine,可以充分利用TDengine高效的存储和查询性能,同时也可以受益于Seeq提供给用户的强大数据可视化和分析功能。 + +这种集成使用户能够充分利用TDengine的高性能时序数据存储和检索,确保高效处理大量数据。同时,Seeq提供高级分析功能,如数据可视化、异常检测、相关性分析和预测建模,使用户能够获得有价值的洞察并基于数据进行决策。 + +综合来看,Seeq和TDengine共同为制造业、工业物联网和电力系统等各行各业的时序数据分析提供了综合解决方案。高效数据存储和先进的分析相结合,赋予用户充分发挥时序数据潜力的能力,推动运营改进,并支持预测和规划分析应用。 diff --git a/docs/zh/20-third-party/seeq/seeq-demo-schema.webp b/docs/zh/20-third-party/seeq/seeq-demo-schema.webp new file mode 100644 index 0000000000..3f603749ad Binary files /dev/null and b/docs/zh/20-third-party/seeq/seeq-demo-schema.webp differ diff --git a/docs/zh/20-third-party/seeq/seeq-demo-workbench.webp b/docs/zh/20-third-party/seeq/seeq-demo-workbench.webp new file mode 100644 index 0000000000..5c3d7a4158 Binary files /dev/null and b/docs/zh/20-third-party/seeq/seeq-demo-workbench.webp differ diff --git a/docs/zh/20-third-party/seeq/seeq-forecast-result.webp b/docs/zh/20-third-party/seeq/seeq-forecast-result.webp new file mode 100644 index 0000000000..13144207eb Binary files /dev/null and b/docs/zh/20-third-party/seeq/seeq-forecast-result.webp differ diff --git a/docs/zh/20-third-party/seeq/seeq-workbench-with-tdengine-cloud.webp b/docs/zh/20-third-party/seeq/seeq-workbench-with-tdengine-cloud.webp new file mode 100644 index 0000000000..f486c3ea29 Binary files /dev/null and b/docs/zh/20-third-party/seeq/seeq-workbench-with-tdengine-cloud.webp differ diff --git a/include/os/osDir.h b/include/os/osDir.h index 55c7a15764..533ac8e4a4 100644 --- a/include/os/osDir.h +++ b/include/os/osDir.h @@ -83,7 +83,7 @@ void taosRemoveDir(const char *dirname); bool taosDirExist(const char *dirname); int32_t taosMkDir(const char *dirname); int32_t taosMulMkDir(const char *dirname); -int32_t taosMulModeMkDir(const char *dirname, int mode); +int32_t taosMulModeMkDir(const char *dirname, int mode, bool checkAccess); void taosRemoveOldFiles(const char *dirname, int32_t keepDays); int32_t taosExpandDir(const char *dirname, char *outname, int32_t maxlen); int32_t taosRealPath(char *dirname, char *realPath, int32_t maxlen); diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 3c1f43ef40..9c242d7c1e 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -1523,7 +1523,7 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi taosSetAllDebugFlag(cfgGetItem(pCfg, "debugFlag")->i32, false); - if (taosMulModeMkDir(tsLogDir, 0777) != 0) { + if (taosMulModeMkDir(tsLogDir, 0777, true) != 0) { terrno = TAOS_SYSTEM_ERROR(errno); printf("failed to create dir:%s since %s", tsLogDir, terrstr()); cfgCleanup(pCfg); diff --git a/source/dnode/mnode/impl/inc/mndConsumer.h b/source/dnode/mnode/impl/inc/mndConsumer.h index a3a31cfc5a..94c937e8f4 100644 --- a/source/dnode/mnode/impl/inc/mndConsumer.h +++ b/source/dnode/mnode/impl/inc/mndConsumer.h @@ -33,7 +33,7 @@ enum { int32_t mndInitConsumer(SMnode *pMnode); void mndCleanupConsumer(SMnode *pMnode); -void mndDropConsumerFromSdb(SMnode *pMnode, int64_t consumerId); +void mndDropConsumerFromSdb(SMnode *pMnode, int64_t consumerId, SRpcHandleInfo* info); SMqConsumerObj *mndAcquireConsumer(SMnode *pMnode, int64_t consumerId); void mndReleaseConsumer(SMnode *pMnode, SMqConsumerObj *pConsumer); diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 89c58337ad..6dd7a13c66 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -99,6 +99,8 @@ typedef enum { TRN_CONFLICT_GLOBAL = 1, TRN_CONFLICT_DB = 2, TRN_CONFLICT_DB_INSIDE = 3, + TRN_CONFLICT_TOPIC = 4, + TRN_CONFLICT_TOPIC_INSIDE = 5, } ETrnConflct; typedef enum { diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 82492f930e..f25bd2cffb 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -37,7 +37,6 @@ static const char *mndConsumerStatusName(int status); static int32_t mndConsumerActionInsert(SSdb *pSdb, SMqConsumerObj *pConsumer); static int32_t mndConsumerActionDelete(SSdb *pSdb, SMqConsumerObj *pConsumer); static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, SMqConsumerObj *pNewConsumer); -static int32_t mndProcessConsumerMetaMsg(SRpcMsg *pMsg); static int32_t mndRetrieveConsumer(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextConsumer(SMnode *pMnode, void *pIter); @@ -45,7 +44,6 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg); static int32_t mndProcessAskEpReq(SRpcMsg *pMsg); static int32_t mndProcessMqHbReq(SRpcMsg *pMsg); static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg); -static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg); static int32_t mndProcessConsumerClearMsg(SRpcMsg *pMsg); static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg); @@ -64,7 +62,6 @@ int32_t mndInitConsumer(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_TMQ_HB, mndProcessMqHbReq); mndSetMsgHandle(pMnode, TDMT_MND_TMQ_ASK_EP, mndProcessAskEpReq); mndSetMsgHandle(pMnode, TDMT_MND_TMQ_TIMER, mndProcessMqTimerMsg); -// mndSetMsgHandle(pMnode, TDMT_MND_TMQ_CONSUMER_LOST, mndProcessConsumerLostMsg); mndSetMsgHandle(pMnode, TDMT_MND_TMQ_CONSUMER_RECOVER, mndProcessConsumerRecoverMsg); mndSetMsgHandle(pMnode, TDMT_MND_TMQ_LOST_CONSUMER_CLEAR, mndProcessConsumerClearMsg); @@ -76,7 +73,7 @@ int32_t mndInitConsumer(SMnode *pMnode) { void mndCleanupConsumer(SMnode *pMnode) {} -void mndDropConsumerFromSdb(SMnode *pMnode, int64_t consumerId){ +void mndDropConsumerFromSdb(SMnode *pMnode, int64_t consumerId, SRpcHandleInfo* info){ SMqConsumerClearMsg *pClearMsg = rpcMallocCont(sizeof(SMqConsumerClearMsg)); if (pClearMsg == NULL) { mError("consumer:0x%"PRIx64" failed to clear consumer due to out of memory. alloc size:%d", consumerId, (int32_t)sizeof(SMqConsumerClearMsg)); @@ -85,7 +82,11 @@ void mndDropConsumerFromSdb(SMnode *pMnode, int64_t consumerId){ pClearMsg->consumerId = consumerId; SRpcMsg rpcMsg = { - .msgType = TDMT_MND_TMQ_LOST_CONSUMER_CLEAR, .pCont = pClearMsg, .contLen = sizeof(SMqConsumerClearMsg)}; + .msgType = TDMT_MND_TMQ_LOST_CONSUMER_CLEAR, + .pCont = pClearMsg, + .contLen = sizeof(SMqConsumerClearMsg), + .info = *info, + }; mInfo("consumer:0x%" PRIx64 " drop from sdb", consumerId); tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); @@ -122,48 +123,31 @@ void mndRebCntDec() { } } -//static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg) { -// SMnode *pMnode = pMsg->info.node; -// SMqConsumerLostMsg *pLostMsg = pMsg->pCont; -// SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, pLostMsg->consumerId); -// if (pConsumer == NULL) { -// return 0; -// } -// -// mInfo("process consumer lost msg, consumer:0x%" PRIx64 " status:%d(%s)", pLostMsg->consumerId, pConsumer->status, -// mndConsumerStatusName(pConsumer->status)); -// -// if (pConsumer->status != MQ_CONSUMER_STATUS_READY) { -// mndReleaseConsumer(pMnode, pConsumer); -// return -1; -// } -// -// SMqConsumerObj *pConsumerNew = tNewSMqConsumerObj(pConsumer->consumerId, pConsumer->cgroup); -// pConsumerNew->updateType = CONSUMER_UPDATE_TIMER_LOST; -// -// mndReleaseConsumer(pMnode, pConsumer); -// -// STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg, "lost-csm"); -// if (pTrans == NULL) { -// goto FAIL; -// } -// -// if (mndSetConsumerCommitLogs(pMnode, pTrans, pConsumerNew) != 0) { -// goto FAIL; -// } -// -// if (mndTransPrepare(pMnode, pTrans) != 0) { -// goto FAIL; -// } -// -// tDeleteSMqConsumerObj(pConsumerNew, true); -// mndTransDrop(pTrans); -// return 0; -//FAIL: -// tDeleteSMqConsumerObj(pConsumerNew, true); -// mndTransDrop(pTrans); -// return -1; -//} +static int32_t validateTopics(STrans *pTrans, const SArray *pTopicList, SMnode *pMnode, const char *pUser) { + int32_t numOfTopics = taosArrayGetSize(pTopicList); + + for (int32_t i = 0; i < numOfTopics; i++) { + char *pOneTopic = taosArrayGetP(pTopicList, i); + SMqTopicObj *pTopic = mndAcquireTopic(pMnode, pOneTopic); + if (pTopic == NULL) { // terrno has been set by callee function + return -1; + } + + if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) { + mndReleaseTopic(pMnode, pTopic); + return -1; + } + + mndTransSetDbName(pTrans, pOneTopic, NULL); + if(mndTransCheckConflict(pMnode, pTrans) != 0){ + mndReleaseTopic(pMnode, pTopic); + return -1; + } + mndReleaseTopic(pMnode, pTopic); + } + + return 0; +} static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { SMnode *pMnode = pMsg->info.node; @@ -188,10 +172,13 @@ static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { mndReleaseConsumer(pMnode, pConsumer); - STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "recover-csm"); + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_TOPIC, pMsg, "recover-csm"); if (pTrans == NULL) { goto FAIL; } + if(validateTopics(pTrans, pConsumer->assignedTopics, pMnode, pMsg->info.conn.user) != 0){ + goto FAIL; + } if (mndSetConsumerCommitLogs(pMnode, pTrans, pConsumerNew) != 0) goto FAIL; if (mndTransPrepare(pMnode, pTrans) != 0) goto FAIL; @@ -221,19 +208,12 @@ static int32_t mndProcessConsumerClearMsg(SRpcMsg *pMsg) { mInfo("consumer:0x%" PRIx64 " needs to be cleared, status %s", pClearMsg->consumerId, mndConsumerStatusName(pConsumer->status)); -// if (pConsumer->status != MQ_CONSUMER_STATUS_LOST) { -// mndReleaseConsumer(pMnode, pConsumer); -// return -1; -// } - SMqConsumerObj *pConsumerNew = tNewSMqConsumerObj(pConsumer->consumerId, pConsumer->cgroup); -// pConsumerNew->updateType = CONSUMER_UPDATE_TIMER_LOST; mndReleaseConsumer(pMnode, pConsumer); STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg, "clear-csm"); if (pTrans == NULL) goto FAIL; - // this is the drop action, not the update action if (mndSetConsumerDropLogs(pMnode, pTrans, pConsumerNew) != 0) goto FAIL; if (mndTransPrepare(pMnode, pTrans) != 0) goto FAIL; @@ -318,7 +298,7 @@ static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg) { if (status == MQ_CONSUMER_STATUS_READY) { if (taosArrayGetSize(pConsumer->assignedTopics) == 0) { // unsubscribe or close - mndDropConsumerFromSdb(pMnode, pConsumer->consumerId); + mndDropConsumerFromSdb(pMnode, pConsumer->consumerId, &pMsg->info); } else if (hbStatus > MND_CONSUMER_LOST_HB_CNT) { taosRLockLatch(&pConsumer->lock); int32_t topicNum = taosArrayGetSize(pConsumer->currentTopics); @@ -333,7 +313,7 @@ static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg) { } } else if (status == MQ_CONSUMER_STATUS_LOST) { if (hbStatus > MND_CONSUMER_LOST_CLEAR_THRESHOLD) { // clear consumer if lost a day - mndDropConsumerFromSdb(pMnode, pConsumer->consumerId); + mndDropConsumerFromSdb(pMnode, pConsumer->consumerId, &pMsg->info); } } else { // MQ_CONSUMER_STATUS_REBALANCE taosRLockLatch(&pConsumer->lock); @@ -410,6 +390,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { .msgType = TDMT_MND_TMQ_CONSUMER_RECOVER, .pCont = pRecoverMsg, .contLen = sizeof(SMqConsumerRecoverMsg), + .info = pMsg->info, }; tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &pRpcMsg); } @@ -484,6 +465,7 @@ static int32_t mndProcessAskEpReq(SRpcMsg *pMsg) { .msgType = TDMT_MND_TMQ_CONSUMER_RECOVER, .pCont = pRecoverMsg, .contLen = sizeof(SMqConsumerRecoverMsg), + .info = pMsg->info, }; tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &pRpcMsg); @@ -629,27 +611,6 @@ int32_t mndSetConsumerCommitLogs(SMnode *pMnode, STrans *pTrans, SMqConsumerObj return 0; } -static int32_t validateTopics(const SArray *pTopicList, SMnode *pMnode, const char *pUser) { - int32_t numOfTopics = taosArrayGetSize(pTopicList); - - for (int32_t i = 0; i < numOfTopics; i++) { - char *pOneTopic = taosArrayGetP(pTopicList, i); - SMqTopicObj *pTopic = mndAcquireTopic(pMnode, pOneTopic); - if (pTopic == NULL) { // terrno has been set by callee function - return -1; - } - - if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) { - mndReleaseTopic(pMnode, pTopic); - return -1; - } - - mndReleaseTopic(pMnode, pTopic); - } - - return 0; -} - static void *topicNameDup(void *p) { return taosStrdup((char *)p); } static void freeItem(void *param) { @@ -688,12 +649,12 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { } // check topic existence - pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "subscribe"); + pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_TOPIC, pMsg, "subscribe"); if (pTrans == NULL) { goto _over; } - code = validateTopics(pTopicList, pMnode, pMsg->info.conn.user); + code = validateTopics(pTrans, pTopicList, pMnode, pMsg->info.conn.user); if (code != TSDB_CODE_SUCCESS) { goto _over; } @@ -722,7 +683,6 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { if (mndSetConsumerCommitLogs(pMnode, pTrans, pConsumerNew) != 0) goto _over; if (mndTransPrepare(pMnode, pTrans) != 0) goto _over; - } else { int32_t status = atomic_load_32(&pExistedConsumer->status); @@ -802,7 +762,6 @@ _over: tDeleteSMqConsumerObj(pConsumerNew, true); - // TODO: replace with destroy subscribe msg taosArrayDestroyP(subscribe.topicNames, (FDelete)taosMemoryFree); return code; } diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index d62b9e4174..c756341164 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -553,13 +553,17 @@ static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOu } } - STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pMsg, "tmq-reb"); + char topic[TSDB_TOPIC_FNAME_LEN] = {0}; + char cgroup[TSDB_CGROUP_LEN] = {0}; + mndSplitSubscribeKey(pOutput->pSub->key, topic, cgroup, true); + + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_TOPIC_INSIDE, pMsg, "tmq-reb"); if (pTrans == NULL) { nodesDestroyNode((SNode*)pPlan); return -1; } - mndTransSetDbName(pTrans, pOutput->pSub->dbName, NULL); + mndTransSetDbName(pTrans, topic, cgroup); if (mndTransCheckConflict(pMnode, pTrans) != 0) { mndTransDrop(pTrans); nodesDestroyNode((SNode*)pPlan); @@ -587,10 +591,6 @@ static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOu return -1; } - char topic[TSDB_TOPIC_FNAME_LEN] = {0}; - char cgroup[TSDB_CGROUP_LEN] = {0}; - mndSplitSubscribeKey(pOutput->pSub->key, topic, cgroup, true); - // 3. commit log: consumer to update status and epoch // 3.1 set touched consumer int32_t consumerNum = taosArrayGetSize(pOutput->modifyConsumers); @@ -802,6 +802,19 @@ static int32_t mndProcessDropCgroupReq(SRpcMsg *pMsg) { goto end; } + pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_TOPIC_INSIDE, pMsg, "drop-cgroup"); + if (pTrans == NULL) { + mError("cgroup: %s on topic:%s, failed to drop since %s", dropReq.cgroup, dropReq.topic, terrstr()); + code = -1; + goto end; + } + + mndTransSetDbName(pTrans, dropReq.topic, dropReq.cgroup); + code = mndTransCheckConflict(pMnode, pTrans); + if (code != 0) { + goto end; + } + void *pIter = NULL; SMqConsumerObj *pConsumer; while (1) { @@ -811,18 +824,11 @@ static int32_t mndProcessDropCgroupReq(SRpcMsg *pMsg) { } if (strcmp(dropReq.cgroup, pConsumer->cgroup) == 0) { - mndDropConsumerFromSdb(pMnode, pConsumer->consumerId); + mndDropConsumerFromSdb(pMnode, pConsumer->consumerId, &pMsg->info); } sdbRelease(pMnode->pSdb, pConsumer); } - pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg, "drop-cgroup"); - if (pTrans == NULL) { - mError("cgroup: %s on topic:%s, failed to drop since %s", dropReq.cgroup, dropReq.topic, terrstr()); - code = -1; - goto end; - } - mInfo("trans:%d, used to drop cgroup:%s on topic %s", pTrans->id, dropReq.cgroup, dropReq.topic); if (mndSetDropSubCommitLogs(pMnode, pTrans, pSub) < 0) { @@ -1019,8 +1025,8 @@ int32_t mndGetGroupNumByTopic(SMnode *pMnode, const char *topicName) { if (pIter == NULL) break; - char topic[TSDB_TOPIC_FNAME_LEN]; - char cgroup[TSDB_CGROUP_LEN]; + char topic[TSDB_TOPIC_FNAME_LEN] = {0}; + char cgroup[TSDB_CGROUP_LEN] = {0}; mndSplitSubscribeKey(pSub->key, topic, cgroup, true); if (strcmp(topic, topicName) != 0) { sdbRelease(pSdb, pSub); @@ -1084,7 +1090,6 @@ int32_t mndDropSubByDB(SMnode *pMnode, STrans *pTrans, SDbObj *pDb) { } int32_t mndDropSubByTopic(SMnode *pMnode, STrans *pTrans, const char *topicName) { - int32_t code = -1; SSdb *pSdb = pMnode->pSdb; void *pIter = NULL; @@ -1093,8 +1098,8 @@ int32_t mndDropSubByTopic(SMnode *pMnode, STrans *pTrans, const char *topicName) pIter = sdbFetch(pSdb, SDB_SUBSCRIBE, pIter, (void **)&pSub); if (pIter == NULL) break; - char topic[TSDB_TOPIC_FNAME_LEN]; - char cgroup[TSDB_CGROUP_LEN]; + char topic[TSDB_TOPIC_FNAME_LEN] = {0}; + char cgroup[TSDB_CGROUP_LEN] = {0}; mndSplitSubscribeKey(pSub->key, topic, cgroup, true); if (strcmp(topic, topicName) != 0) { sdbRelease(pSdb, pSub); @@ -1132,15 +1137,13 @@ int32_t mndDropSubByTopic(SMnode *pMnode, STrans *pTrans, const char *topicName) if (mndSetDropSubRedoLogs(pMnode, pTrans, pSub) < 0) { sdbRelease(pSdb, pSub); sdbCancelFetch(pSdb, pIter); - goto END; + return -1; } sdbRelease(pSdb, pSub); } - code = 0; -END: - return code; + return 0; } static int32_t buildResult(SSDataBlock *pBlock, int32_t* numOfRows, int64_t consumerId, const char* topic, const char* cgroup, SArray* vgs, SArray *offsetRows){ diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index f6b2aabede..1e3a8bddb7 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -382,14 +382,29 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * int32_t code = -1; SNode *pAst = NULL; SQueryPlan *pPlan = NULL; - SMqTopicObj topicObj = {0}; + + pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_TOPIC, pReq, "create-topic"); + if (pTrans == NULL) { + mError("topic:%s, failed to create since %s", pCreate->name, terrstr()); + code = -1; + goto _OUT; + } + + mndTransSetDbName(pTrans, pCreate->name, NULL); + code = mndTransCheckConflict(pMnode, pTrans); + if (code != 0) { + goto _OUT; + } + mInfo("trans:%d to create topic:%s", pTrans->id, pCreate->name); + tstrncpy(topicObj.name, pCreate->name, TSDB_TOPIC_FNAME_LEN); tstrncpy(topicObj.db, pDb->name, TSDB_DB_FNAME_LEN); tstrncpy(topicObj.createUser, userName, TSDB_USER_LEN); - if (mndCheckTopicPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_TOPIC, &topicObj) != 0) { - return -1; + code = mndCheckTopicPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_TOPIC, &topicObj); + if (code != 0) { + goto _OUT; } topicObj.createTime = taosGetTimestampMs(); @@ -406,6 +421,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * if (pCreate->withMeta) { terrno = TSDB_CODE_MND_INVALID_TOPIC_OPTION; mError("topic:%s, failed to create since %s", pCreate->name, terrstr()); + code = terrno; goto _OUT; } @@ -414,13 +430,15 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * qDebugL("topic:%s ast %s", topicObj.name, topicObj.ast); - if (nodesStringToNode(pCreate->ast, &pAst) != 0) { + code = nodesStringToNode(pCreate->ast, &pAst); + if (code != 0) { mError("topic:%s, failed to create since %s", pCreate->name, terrstr()); goto _OUT; } SPlanContext cxt = {.pAstRoot = pAst, .topicQuery = true}; - if (qCreateQueryPlan(&cxt, &pPlan, NULL) != 0) { + code = qCreateQueryPlan(&cxt, &pPlan, NULL); + if (code != 0) { mError("failed to create topic:%s since %s", pCreate->name, terrstr()); goto _OUT; } @@ -428,6 +446,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * topicObj.ntbColIds = taosArrayInit(0, sizeof(int16_t)); if (topicObj.ntbColIds == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; + code = terrno; goto _OUT; } @@ -438,12 +457,14 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * topicObj.ntbColIds = NULL; } - if (qExtractResultSchema(pAst, &topicObj.schema.nCols, &topicObj.schema.pSchema) != 0) { + code = qExtractResultSchema(pAst, &topicObj.schema.nCols, &topicObj.schema.pSchema); + if (code != 0) { mError("topic:%s, failed to create since %s", pCreate->name, terrstr()); goto _OUT; } - if (nodesNodeToString((SNode *)pPlan, false, &topicObj.physicalPlan, NULL) != 0) { + code = nodesNodeToString((SNode *)pPlan, false, &topicObj.physicalPlan, NULL); + if (code != 0) { mError("topic:%s, failed to create since %s", pCreate->name, terrstr()); goto _OUT; } @@ -451,6 +472,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * SStbObj *pStb = mndAcquireStb(pMnode, pCreate->subStbName); if (pStb == NULL) { terrno = TSDB_CODE_MND_STB_NOT_EXIST; + code = terrno; goto _OUT; } @@ -470,21 +492,10 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * /*topicObj.withTbName = 1;*/ /*topicObj.withSchema = 1;*/ - pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq, "create-topic"); - if (pTrans == NULL) { - mError("topic:%s, failed to create since %s", pCreate->name, terrstr()); - goto _OUT; - } - - mndTransSetDbName(pTrans, pDb->name, NULL); - if (mndTransCheckConflict(pMnode, pTrans) != 0) { - goto _OUT; - } - mInfo("trans:%d to create topic:%s", pTrans->id, pCreate->name); - SSdbRaw *pCommitRaw = mndTopicActionEncode(&topicObj); if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); + code = -1; goto _OUT; } @@ -510,7 +521,6 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * // encoder check alter info int32_t len; - int32_t code; tEncodeSize(tEncodeSTqCheckInfo, &info, len, code); if (code < 0) { sdbRelease(pSdb, pVgroup); @@ -525,6 +535,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * taosMemoryFree(buf); sdbRelease(pSdb, pVgroup); sdbCancelFetch(pSdb, pIter); + code = -1; goto _OUT; } tEncoderClear(&encoder); @@ -539,6 +550,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * taosMemoryFree(buf); sdbRelease(pSdb, pVgroup); sdbCancelFetch(pSdb, pIter); + code = -1; goto _OUT; } buf = NULL; @@ -548,6 +560,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); + code = -1; goto _OUT; } @@ -664,16 +677,19 @@ _OVER: } static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) { - SMnode *pMnode = pReq->info.node; - SSdb *pSdb = pMnode->pSdb; + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; SMDropTopicReq dropReq = {0}; + int32_t code = 0; + SMqTopicObj *pTopic = NULL; + STrans *pTrans = NULL; if (tDeserializeSMDropTopicReq(pReq->pCont, pReq->contLen, &dropReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; return -1; } - SMqTopicObj *pTopic = mndAcquireTopic(pMnode, dropReq.name); + pTopic = mndAcquireTopic(pMnode, dropReq.name); if (pTopic == NULL) { if (dropReq.igNotExists) { mInfo("topic:%s, not exist, ignore not exist is set", dropReq.name); @@ -685,9 +701,29 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) { } } - if (mndCheckTopicPrivilege(pMnode, pReq->info.conn.user, MND_OPER_DROP_TOPIC, pTopic) != 0) { - mndReleaseTopic(pMnode, pTopic); - return -1; + pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_TOPIC, pReq, "drop-topic"); + if (pTrans == NULL) { + mError("topic:%s, failed to drop since %s", pTopic->name, terrstr()); + code = -1; + goto end; + } + + mndTransSetDbName(pTrans, pTopic->name, NULL); + code = mndTransCheckConflict(pMnode, pTrans); + if (code != 0) { + goto end; + } + + mInfo("trans:%d, used to drop topic:%s", pTrans->id, pTopic->name); + + code = mndCheckTopicPrivilege(pMnode, pReq->info.conn.user, MND_OPER_DROP_TOPIC, pTopic); + if (code != 0) { + goto end; + } + + code = mndCheckDbPrivilegeByName(pMnode, pReq->info.conn.user, MND_OPER_READ_DB, pTopic->db); + if (code != 0) { + goto end; } void *pIter = NULL; @@ -698,37 +734,42 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) { break; } - if (pConsumer->status == MQ_CONSUMER_STATUS_LOST){ - mndDropConsumerFromSdb(pMnode, pConsumer->consumerId); - mndReleaseConsumer(pMnode, pConsumer); - continue; - } - + bool found = false; int32_t sz = taosArrayGetSize(pConsumer->assignedTopics); for (int32_t i = 0; i < sz; i++) { char *name = taosArrayGetP(pConsumer->assignedTopics, i); if (strcmp(name, pTopic->name) == 0) { - mndReleaseConsumer(pMnode, pConsumer); - mndReleaseTopic(pMnode, pTopic); - sdbCancelFetch(pSdb, pIter); - terrno = TSDB_CODE_MND_TOPIC_SUBSCRIBED; - mError("topic:%s, failed to drop since subscribed by consumer:0x%" PRIx64 ", in consumer group %s", - dropReq.name, pConsumer->consumerId, pConsumer->cgroup); - return -1; + found = true; + break; } } + if (found){ + if (pConsumer->status == MQ_CONSUMER_STATUS_LOST) { + mndDropConsumerFromSdb(pMnode, pConsumer->consumerId, &pReq->info); + mndReleaseConsumer(pMnode, pConsumer); + continue; + } + + mndReleaseConsumer(pMnode, pConsumer); + sdbCancelFetch(pSdb, pIter); + terrno = TSDB_CODE_MND_TOPIC_SUBSCRIBED; + mError("topic:%s, failed to drop since subscribed by consumer:0x%" PRIx64 ", in consumer group %s", + dropReq.name, pConsumer->consumerId, pConsumer->cgroup); + code = -1; + goto end; + } sz = taosArrayGetSize(pConsumer->rebNewTopics); for (int32_t i = 0; i < sz; i++) { char *name = taosArrayGetP(pConsumer->rebNewTopics, i); if (strcmp(name, pTopic->name) == 0) { mndReleaseConsumer(pMnode, pConsumer); - mndReleaseTopic(pMnode, pTopic); sdbCancelFetch(pSdb, pIter); terrno = TSDB_CODE_MND_TOPIC_SUBSCRIBED; mError("topic:%s, failed to drop since subscribed by consumer:%" PRId64 ", in consumer group %s (reb new)", dropReq.name, pConsumer->consumerId, pConsumer->cgroup); - return -1; + code = -1; + goto end; } } @@ -737,45 +778,22 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) { char *name = taosArrayGetP(pConsumer->rebRemovedTopics, i); if (strcmp(name, pTopic->name) == 0) { mndReleaseConsumer(pMnode, pConsumer); - mndReleaseTopic(pMnode, pTopic); sdbCancelFetch(pSdb, pIter); terrno = TSDB_CODE_MND_TOPIC_SUBSCRIBED; mError("topic:%s, failed to drop since subscribed by consumer:%" PRId64 ", in consumer group %s (reb remove)", dropReq.name, pConsumer->consumerId, pConsumer->cgroup); - return -1; + code = -1; + goto end; } } sdbRelease(pSdb, pConsumer); } - if (mndCheckDbPrivilegeByName(pMnode, pReq->info.conn.user, MND_OPER_READ_DB, pTopic->db) != 0) { - mndReleaseTopic(pMnode, pTopic); - return -1; - } - - STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq, "drop-topic"); - if (pTrans == NULL) { + code = mndDropSubByTopic(pMnode, pTrans, dropReq.name); + if (code < 0) { mError("topic:%s, failed to drop since %s", pTopic->name, terrstr()); - mndReleaseTopic(pMnode, pTopic); - return -1; - } - - mndTransSetDbName(pTrans, pTopic->db, NULL); - if (mndTransCheckConflict(pMnode, pTrans) != 0) { - mndReleaseTopic(pMnode, pTopic); - mndTransDrop(pTrans); - return -1; - } - - mInfo("trans:%d, used to drop topic:%s", pTrans->id, pTopic->name); - - // TODO check if rebalancing - if (mndDropSubByTopic(pMnode, pTrans, dropReq.name) < 0) { - mError("topic:%s, failed to drop since %s", pTopic->name, terrstr()); - mndTransDrop(pTrans); - mndReleaseTopic(pMnode, pTopic); - return -1; + goto end; } if (pTopic->ntbUid != 0) { @@ -801,25 +819,25 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) { action.pCont = buf; action.contLen = sizeof(SMsgHead) + TSDB_TOPIC_FNAME_LEN; action.msgType = TDMT_VND_TMQ_DEL_CHECKINFO; - if (mndTransAppendRedoAction(pTrans, &action) != 0) { + code = mndTransAppendRedoAction(pTrans, &action); + if (code != 0) { taosMemoryFree(buf); sdbRelease(pSdb, pVgroup); - mndReleaseTopic(pMnode, pTopic); sdbCancelFetch(pSdb, pIter); - mndTransDrop(pTrans); - return -1; + goto end; } sdbRelease(pSdb, pVgroup); } } - int32_t code = mndDropTopic(pMnode, pTrans, pReq, pTopic); + code = mndDropTopic(pMnode, pTrans, pReq, pTopic); + +end: mndReleaseTopic(pMnode, pTopic); mndTransDrop(pTrans); - if (code != 0) { mError("topic:%s, failed to drop since %s", dropReq.name, terrstr()); - return -1; + return code; } char detail[100] = {0}; diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index fddde70834..93a152f0cc 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -791,6 +791,22 @@ static bool mndCheckTransConflict(SMnode *pMnode, STrans *pNew) { } } + if (pNew->conflict == TRN_CONFLICT_TOPIC) { + if (pTrans->conflict == TRN_CONFLICT_GLOBAL) conflict = true; + if (pTrans->conflict == TRN_CONFLICT_TOPIC || pTrans->conflict == TRN_CONFLICT_TOPIC_INSIDE) { + if (strcasecmp(pNew->dbname, pTrans->dbname) == 0 ) conflict = true; + } + } + if (pNew->conflict == TRN_CONFLICT_TOPIC_INSIDE) { + if (pTrans->conflict == TRN_CONFLICT_GLOBAL) conflict = true; + if (pTrans->conflict == TRN_CONFLICT_TOPIC ) { + if (strcasecmp(pNew->dbname, pTrans->dbname) == 0 ) conflict = true; + } + if (pTrans->conflict == TRN_CONFLICT_TOPIC_INSIDE) { + if (strcasecmp(pNew->dbname, pTrans->dbname) == 0 && strcasecmp(pNew->stbname, pTrans->stbname) == 0) conflict = true; + } + } + if (conflict) { mError("trans:%d, db:%s stb:%s type:%d, can't execute since conflict with trans:%d db:%s stb:%s type:%d", pNew->id, pNew->dbname, pNew->stbname, pNew->conflict, pTrans->id, pTrans->dbname, pTrans->stbname, diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index cef8a99e25..a502e3e314 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -783,6 +783,8 @@ int32_t tqProcessDeleteSubReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg walCloseRef(pTq->pVnode->pWal, pHandle->pRef->refId); } + tqUnregisterPushHandle(pTq, pHandle); + code = taosHashRemove(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); if (code != 0) { tqError("cannot process tq delete req %s, since no such handle", pReq->subKey); @@ -884,7 +886,6 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg tqInfo("vgId:%d switch consumer from Id:0x%" PRIx64 " to Id:0x%" PRIx64, req.vgId, pHandle->consumerId, req.newConsumerId); atomic_store_64(&pHandle->consumerId, req.newConsumerId); atomic_store_32(&pHandle->epoch, 0); - tqUnregisterPushHandle(pTq, pHandle); ret = tqMetaSaveHandle(pTq, req.subKey, pHandle); } @@ -1201,6 +1202,7 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { "s-task:%s failed to start scan-history in first stream time window since already started, unexpected " "sched-status:%d", id, schedStatus); + streamMetaReleaseTask(pMeta, pTask); return 0; } @@ -1214,6 +1216,7 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { tqDebug("s-task:%s is paused in the step1, elapsed time:%.2fs, sched-status:%d", pTask->id.idStr, el, TASK_SCHED_STATUS__INACTIVE); atomic_store_8(&pTask->status.schedStatus, TASK_SCHED_STATUS__INACTIVE); + streamMetaReleaseTask(pMeta, pTask); return 0; } diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 8ca2ccad1b..caf88f55fc 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -25,7 +25,7 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* pReader, const int32_t* slotIds, const int32_t* dstSlotIds, void** pRes, const char* idStr) { int32_t numOfRows = pBlock->info.rows; - bool allNullRow = true; + // bool allNullRow = true; if (HASTYPE(pReader->type, CACHESCAN_RETRIEVE_LAST)) { for (int32_t i = 0; i < pReader->numOfCols; ++i) { @@ -36,7 +36,7 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p p->ts = pColVal->ts; p->isNull = !COL_VAL_IS_VALUE(&pColVal->colVal); - allNullRow = p->isNull & allNullRow; + // allNullRow = p->isNull & allNullRow; if (!p->isNull) { if (IS_VAR_DATA_TYPE(pColVal->colVal.type)) { @@ -56,7 +56,8 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p colDataSetVal(pColInfoData, numOfRows, (const char*)pRes[i], false); } - pBlock->info.rows += allNullRow ? 0 : 1; + // pBlock->info.rows += allNullRow ? 0 : 1; + ++pBlock->info.rows; } else if (HASTYPE(pReader->type, CACHESCAN_RETRIEVE_LAST_ROW)) { for (int32_t i = 0; i < pReader->numOfCols; ++i) { SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, dstSlotIds[i]); @@ -65,7 +66,7 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, i); SColVal* pVal = &pColVal->colVal; - allNullRow = false; + // allNullRow = false; if (IS_VAR_DATA_TYPE(pColVal->colVal.type)) { if (!COL_VAL_IS_VALUE(&pColVal->colVal)) { colDataSetNULL(pColInfoData, numOfRows); @@ -80,7 +81,8 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p } } - pBlock->info.rows += allNullRow ? 0 : 1; + // pBlock->info.rows += allNullRow ? 0 : 1; + ++pBlock->info.rows; } else { tsdbError("invalid retrieve type:%d, %s", pReader->type, idStr); return TSDB_CODE_INVALID_PARA; diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 52e6fe6312..c02cff3aa9 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -5608,4 +5608,4 @@ void tsdbReaderSetId(STsdbReader* pReader, const char* idstr) { pReader->idStr = taosStrdup(idstr); } -void tsdbReaderSetCloseFlag(STsdbReader* pReader) { pReader->code = TSDB_CODE_TSC_QUERY_CANCELLED; } +void tsdbReaderSetCloseFlag(STsdbReader* pReader) { /*pReader->code = TSDB_CODE_TSC_QUERY_CANCELLED;*/ } diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index e635862200..c10d8c628d 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -1268,7 +1268,7 @@ static void getBlockToLoadInfo(SDataBlockToLoadInfo* pInfo, SFileDataBlockInfo* } // has duplicated ts of different version in this block - pInfo->hasDupTs = (pBlockInfo->record.numRow > pBlockInfo->record.count); + pInfo->hasDupTs = (pBlockInfo->record.numRow > pBlockInfo->record.count) || (pBlockInfo->record.count <= 0); pInfo->overlapWithDelInfo = overlapWithDelSkyline(pScanInfo, &pBlockInfo->record, pReader->info.order); if (hasDataInLastBlock(pLastBlockReader)) { diff --git a/source/libs/executor/src/filloperator.c b/source/libs/executor/src/filloperator.c index c14692b7f0..f836e71bc9 100644 --- a/source/libs/executor/src/filloperator.c +++ b/source/libs/executor/src/filloperator.c @@ -166,18 +166,20 @@ static void revisedFillStartKey(SFillOperatorInfo* pInfo, SSDataBlock* pBlock, i } else if (ekey < pInfo->pFillInfo->start) { int64_t t = ekey; SInterval* pInterval = &pInfo->pFillInfo->interval; - + int64_t prev = t; while(1) { - int64_t prev = taosTimeAdd(t, pInterval->sliding, pInterval->slidingUnit, pInterval->precision); - if (prev >= pInfo->pFillInfo->start) { - t = prev; + int64_t next = taosTimeAdd(t, pInterval->sliding, pInterval->slidingUnit, pInterval->precision); + if (next >= pInfo->pFillInfo->start) { + prev = t; + t = next; break; } - t = prev; + prev = t; + t = next; } - // todo time window chosen problem: t or prev value? - if (t > pInfo->pFillInfo->start) t -= pInterval->sliding; + // todo time window chosen problem: t or next value? + if (t > pInfo->pFillInfo->start) t = prev; taosFillUpdateStartTimestampInfo(pInfo->pFillInfo, t); } } diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index eb5d6d71df..6e2521e5b9 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -526,9 +526,9 @@ tag_item(A) ::= column_name(B) AS column_alias(C). /************************************************ create index ********************************************************/ cmd ::= CREATE SMA INDEX not_exists_opt(D) - full_index_name(A) ON full_table_name(B) index_options(C). { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, D, A, B, NULL, C); } + col_name(A) ON full_table_name(B) index_options(C). { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, D, A, B, NULL, C); } cmd ::= CREATE INDEX not_exists_opt(D) - full_index_name(A) ON full_table_name(B) NK_LP col_name_list(C) NK_RP. { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, D, A, B, C, NULL); } + col_name(A) ON full_table_name(B) NK_LP col_name_list(C) NK_RP. { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, D, A, B, C, NULL); } cmd ::= DROP INDEX exists_opt(B) full_index_name(A). { pCxt->pRootNode = createDropIndexStmt(pCxt, B, A); } full_index_name(A) ::= index_name(B). { A = createRealTableNodeForIndexName(pCxt, NULL, &B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 3de0ca3f85..bc07687022 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -349,7 +349,8 @@ SNode* createValueNode(SAstCreateContext* pCxt, int32_t dataType, const SToken* return (SNode*)val; } -bool addHintNodeToList(SAstCreateContext* pCxt, SNodeList** ppHintList, EHintOption opt, SToken* paramList, int32_t paramNum) { +bool addHintNodeToList(SAstCreateContext* pCxt, SNodeList** ppHintList, EHintOption opt, SToken* paramList, + int32_t paramNum) { void* value = NULL; switch (opt) { case HINT_BATCH_SCAN: @@ -362,7 +363,7 @@ bool addHintNodeToList(SAstCreateContext* pCxt, SNodeList** ppHintList, EHintOpt default: return true; } - + SHintNode* hint = (SHintNode*)nodesMakeNode(QUERY_NODE_HINT); CHECK_OUT_OF_MEM(hint); hint->option = opt; @@ -386,15 +387,15 @@ SNodeList* createHintNodeList(SAstCreateContext* pCxt, const SToken* pLiteral) { if (NULL == pLiteral || pLiteral->n <= 5) { return NULL; } - SNodeList* pHintList = NULL; - char* hint = strndup(pLiteral->z + 3, pLiteral->n - 5); - int32_t i = 0; - bool quit = false; - bool inParamList = false; - bool lastComma = false; + SNodeList* pHintList = NULL; + char* hint = strndup(pLiteral->z + 3, pLiteral->n - 5); + int32_t i = 0; + bool quit = false; + bool inParamList = false; + bool lastComma = false; EHintOption opt = 0; - int32_t paramNum = 0; - SToken paramList[10]; + int32_t paramNum = 0; + SToken paramList[10]; while (!quit) { SToken t0 = {0}; if (hint[i] == 0) { @@ -413,7 +414,7 @@ SNodeList* createHintNodeList(SAstCreateContext* pCxt, const SToken* pLiteral) { } opt = HINT_BATCH_SCAN; break; - case TK_NO_BATCH_SCAN: + case TK_NO_BATCH_SCAN: lastComma = false; if (0 != opt || inParamList) { quit = true; @@ -447,7 +448,7 @@ SNodeList* createHintNodeList(SAstCreateContext* pCxt, const SToken* pLiteral) { paramList[paramNum++] = t0; } break; - case TK_NK_COMMA: + case TK_NK_COMMA: if (lastComma) { quit = true; } @@ -963,11 +964,12 @@ SNode* addFillClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pFill) { return pStmt; } -SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable, SNodeList* pHint) { +SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable, + SNodeList* pHint) { CHECK_PARSER_STATUS(pCxt); SNode* select = createSelectStmtImpl(isDistinct, pProjectionList, pTable, pHint); CHECK_OUT_OF_MEM(select); - return select; + return select; } SNode* setSelectStmtTagMode(SAstCreateContext* pCxt, SNode* pStmt, bool bSelectTags) { @@ -1862,8 +1864,23 @@ SNode* createCreateIndexStmt(SAstCreateContext* pCxt, EIndexType type, bool igno CHECK_OUT_OF_MEM(pStmt); pStmt->indexType = type; pStmt->ignoreExists = ignoreExists; - snprintf(pStmt->indexDbName, sizeof(pStmt->indexDbName), "%s", ((SRealTableNode*)pIndexName)->table.dbName); - snprintf(pStmt->indexName, sizeof(pStmt->indexName), "%s", ((SRealTableNode*)pIndexName)->table.tableName); + + SRealTableNode* pFullTable = (SRealTableNode*)pRealTable; + if (strlen(pFullTable->table.dbName) == 0) { + // no db specified, + if (pCxt->pQueryCxt->db == NULL) { + pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_DB_NOT_SPECIFIED); + nodesDestroyNode(pIndexName); + nodesDestroyNode(pRealTable); + nodesDestroyNode(pOptions); + return NULL; + } else { + snprintf(pStmt->indexDbName, sizeof(pStmt->indexDbName), "%s", pCxt->pQueryCxt->db); + } + } else { + snprintf(pStmt->indexDbName, sizeof(pStmt->indexDbName), "%s", pFullTable->table.dbName); + } + snprintf(pStmt->indexName, sizeof(pStmt->indexName), "%s", ((SColumnNode*)pIndexName)->colName); snprintf(pStmt->dbName, sizeof(pStmt->dbName), "%s", ((SRealTableNode*)pRealTable)->table.dbName); snprintf(pStmt->tableName, sizeof(pStmt->tableName), "%s", ((SRealTableNode*)pRealTable)->table.tableName); nodesDestroyNode(pIndexName); @@ -1980,8 +1997,7 @@ SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken return (SNode*)pStmt; } -SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pCGroupId, - SToken* pTopicName) { +SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pCGroupId, SToken* pTopicName) { CHECK_PARSER_STATUS(pCxt); if (!checkTopicName(pCxt, pTopicName)) { return NULL; diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index fdec9cba79..784281ebae 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -336,7 +336,7 @@ static int32_t collectMetaKeyFromUseDatabase(SCollectMetaKeyCxt* pCxt, SUseDatab static int32_t collectMetaKeyFromCreateIndex(SCollectMetaKeyCxt* pCxt, SCreateIndexStmt* pStmt) { int32_t code = TSDB_CODE_SUCCESS; - if (INDEX_TYPE_SMA == pStmt->indexType) { + if (INDEX_TYPE_SMA == pStmt->indexType || INDEX_TYPE_NORMAL == pStmt->indexType) { code = reserveTableMetaInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, pCxt->pMetaCache); if (TSDB_CODE_SUCCESS == code) { code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, pCxt->pMetaCache); @@ -356,8 +356,7 @@ static int32_t collectMetaKeyFromCreateTopic(SCollectMetaKeyCxt* pCxt, SCreateTo return collectMetaKeyFromQuery(pCxt, pStmt->pQuery); } if (NULL != pStmt->pWhere) { - int32_t code = collectMetaKeyFromRealTableImpl(pCxt, pStmt->subDbName, pStmt->subSTbName, - AUTH_TYPE_READ); + int32_t code = collectMetaKeyFromRealTableImpl(pCxt, pStmt->subDbName, pStmt->subSTbName, AUTH_TYPE_READ); return code; } return TSDB_CODE_SUCCESS; @@ -387,7 +386,7 @@ static int32_t collectMetaKeyFromCreateStream(SCollectMetaKeyCxt* pCxt, SCreateS if (TSDB_CODE_SUCCESS == code && pStmt->pOptions->fillHistory) { SSelectStmt* pSelect = (SSelectStmt*)pStmt->pQuery; code = reserveDbCfgForLastRow(pCxt, pSelect->pFromTable); - } + } return code; } @@ -590,8 +589,8 @@ static int32_t collectMetaKeyFromShowCreateTable(SCollectMetaKeyCxt* pCxt, SShow code = reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); } if (TSDB_CODE_SUCCESS == code) { - code = reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pStmt->dbName, pStmt->tableName, AUTH_TYPE_READ, - pCxt->pMetaCache); + code = reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pStmt->dbName, pStmt->tableName, + AUTH_TYPE_READ, pCxt->pMetaCache); } return code; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 5b6e93e4f2..5d295e083f 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -563,245 +563,245 @@ typedef union { static const YYACTIONTYPE yy_action[] = { /* 0 */ 38, 311, 2227, 410, 541, 699, 1994, 542, 1853, 2041, /* 10 */ 2042, 164, 48, 46, 1733, 716, 416, 415, 389, 1996, - /* 20 */ 407, 1811, 1578, 41, 40, 135, 2045, 47, 45, 44, - /* 30 */ 43, 42, 581, 577, 576, 1659, 1893, 1576, 1603, 676, - /* 40 */ 144, 1585, 125, 2245, 2078, 124, 123, 122, 121, 120, - /* 50 */ 119, 118, 117, 116, 109, 2195, 317, 715, 699, 1994, - /* 60 */ 664, 41, 40, 2391, 1654, 47, 45, 44, 43, 42, - /* 70 */ 19, 145, 2116, 1606, 2116, 676, 144, 1584, 194, 1986, - /* 80 */ 663, 189, 676, 144, 400, 2392, 665, 2113, 686, 2114, + /* 20 */ 407, 1811, 1578, 41, 40, 133, 2045, 47, 45, 44, + /* 30 */ 43, 42, 583, 579, 578, 1659, 1893, 1576, 1603, 678, + /* 40 */ 142, 1585, 123, 2245, 2078, 122, 121, 120, 119, 118, + /* 50 */ 117, 116, 115, 114, 107, 2195, 9, 715, 699, 1994, + /* 60 */ 666, 41, 40, 2391, 1654, 47, 45, 44, 43, 42, + /* 70 */ 19, 143, 2116, 1606, 2116, 678, 142, 1584, 194, 1986, + /* 80 */ 665, 189, 678, 142, 400, 2392, 667, 2113, 686, 2114, /* 90 */ 686, 2226, 170, 2262, 1822, 185, 172, 2228, 719, 2230, /* 100 */ 2231, 714, 807, 709, 706, 15, 459, 2034, 782, 781, - /* 110 */ 780, 779, 419, 504, 778, 777, 148, 772, 771, 770, + /* 110 */ 780, 779, 419, 504, 778, 777, 146, 772, 771, 770, /* 120 */ 769, 768, 767, 766, 158, 762, 761, 760, 418, 417, /* 130 */ 757, 756, 755, 177, 176, 1604, 1833, 1603, 1808, 1394, - /* 140 */ 546, 1661, 1662, 188, 2323, 2324, 543, 142, 2328, 666, + /* 140 */ 546, 1661, 1662, 188, 2323, 2324, 543, 140, 2328, 668, /* 150 */ 2412, 355, 2181, 1385, 744, 743, 742, 1389, 741, 1391, /* 160 */ 1392, 740, 737, 698, 1400, 734, 1402, 1403, 731, 728, /* 170 */ 725, 1634, 1644, 213, 212, 699, 1994, 1660, 1663, 190, - /* 180 */ 2323, 2324, 558, 142, 2328, 1970, 289, 2323, 675, 2195, - /* 190 */ 136, 674, 1579, 2391, 1577, 56, 503, 2396, 1588, 1803, + /* 180 */ 2323, 2324, 560, 140, 2328, 1970, 290, 2323, 677, 2195, + /* 190 */ 134, 676, 1579, 2391, 1577, 56, 503, 2396, 1588, 1803, /* 200 */ 2391, 41, 40, 429, 482, 47, 45, 44, 43, 42, - /* 210 */ 663, 189, 1604, 481, 422, 2392, 665, 549, 2395, 421, - /* 220 */ 542, 1853, 2392, 2394, 1582, 1583, 269, 1633, 1636, 1637, + /* 210 */ 665, 189, 1604, 481, 422, 2392, 667, 549, 2395, 421, + /* 220 */ 542, 1853, 2392, 2394, 1582, 1583, 270, 1633, 1636, 1637, /* 230 */ 1638, 1639, 1640, 1641, 1642, 1643, 711, 707, 1652, 1653, - /* 240 */ 1655, 1656, 1657, 1658, 2, 48, 46, 698, 638, 1261, + /* 240 */ 1655, 1656, 1657, 1658, 2, 48, 46, 698, 640, 1261, /* 250 */ 359, 1260, 1601, 407, 754, 1578, 1504, 1505, 1680, 495, - /* 260 */ 2227, 639, 511, 367, 2391, 1236, 140, 510, 1659, 684, - /* 270 */ 1576, 41, 40, 716, 1690, 47, 45, 44, 43, 42, - /* 280 */ 1603, 2397, 189, 478, 1262, 512, 2392, 665, 1487, 1488, - /* 290 */ 480, 1761, 1503, 1506, 698, 2396, 30, 1654, 2391, 1737, - /* 300 */ 1832, 2245, 1802, 19, 659, 1603, 1688, 1238, 1241, 1242, - /* 310 */ 1584, 676, 144, 2195, 412, 715, 2395, 2040, 2042, 125, - /* 320 */ 2392, 2393, 124, 123, 122, 121, 120, 119, 118, 117, - /* 330 */ 116, 654, 51, 1429, 1430, 807, 376, 754, 15, 651, - /* 340 */ 650, 1759, 1760, 1762, 1763, 1764, 2205, 466, 2160, 2226, - /* 350 */ 1831, 2262, 35, 2195, 112, 2228, 719, 2230, 2231, 714, - /* 360 */ 2213, 709, 1695, 1689, 147, 62, 151, 2286, 2315, 1773, - /* 370 */ 2209, 60, 403, 2311, 1661, 1662, 62, 508, 636, 51, + /* 260 */ 2227, 641, 511, 367, 2391, 1236, 138, 510, 1659, 556, + /* 270 */ 1576, 41, 40, 716, 1722, 47, 45, 44, 43, 42, + /* 280 */ 1603, 2397, 189, 478, 1262, 512, 2392, 667, 1487, 1488, + /* 290 */ 480, 1761, 1503, 1506, 698, 2396, 30, 1654, 2391, 557, + /* 300 */ 62, 2245, 1802, 19, 1264, 1265, 1688, 1238, 1241, 1242, + /* 310 */ 1584, 678, 142, 2195, 412, 715, 2395, 2040, 2042, 123, + /* 320 */ 2392, 2393, 122, 121, 120, 119, 118, 117, 116, 115, + /* 330 */ 114, 656, 51, 1429, 1430, 807, 376, 101, 15, 653, + /* 340 */ 652, 1759, 1760, 1762, 1763, 1764, 2205, 466, 2160, 2226, + /* 350 */ 1832, 2262, 558, 2109, 110, 2228, 719, 2230, 2231, 714, + /* 360 */ 2213, 709, 1987, 1689, 145, 62, 151, 2286, 2315, 1773, + /* 370 */ 2209, 60, 403, 2311, 1661, 1662, 52, 508, 638, 51, /* 380 */ 502, 501, 500, 499, 494, 493, 492, 491, 490, 486, - /* 390 */ 485, 484, 483, 358, 475, 474, 473, 257, 468, 467, - /* 400 */ 374, 699, 1994, 2195, 1634, 1644, 1810, 624, 2211, 404, - /* 410 */ 1660, 1663, 208, 66, 678, 187, 2323, 2324, 709, 142, - /* 420 */ 2328, 135, 660, 655, 648, 1579, 658, 1577, 586, 685, - /* 430 */ 134, 133, 132, 131, 130, 129, 128, 127, 126, 699, + /* 390 */ 485, 484, 483, 358, 475, 474, 473, 258, 468, 467, + /* 400 */ 374, 699, 1994, 2195, 1634, 1644, 1810, 1880, 2211, 404, + /* 410 */ 1660, 1663, 661, 66, 680, 187, 2323, 2324, 709, 140, + /* 420 */ 2328, 133, 662, 657, 650, 1579, 660, 1577, 588, 602, + /* 430 */ 132, 131, 130, 129, 128, 127, 126, 125, 124, 699, /* 440 */ 1994, 37, 405, 1683, 1684, 1685, 1686, 1687, 1691, 1692, - /* 450 */ 1693, 1694, 86, 12, 2245, 85, 1635, 1582, 1583, 457, + /* 450 */ 1693, 1694, 581, 580, 2245, 441, 294, 1582, 1583, 457, /* 460 */ 1633, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 711, /* 470 */ 707, 1652, 1653, 1655, 1656, 1657, 1658, 2, 12, 48, - /* 480 */ 46, 556, 103, 2109, 1261, 2227, 1260, 407, 293, 1578, - /* 490 */ 752, 156, 155, 749, 748, 747, 153, 222, 679, 62, - /* 500 */ 538, 544, 1659, 1860, 1576, 2227, 2205, 1987, 536, 657, - /* 510 */ 604, 532, 528, 1584, 62, 599, 598, 597, 716, 1262, - /* 520 */ 1985, 293, 589, 141, 593, 616, 2245, 745, 592, 182, - /* 530 */ 2209, 1654, 293, 591, 596, 383, 382, 19, 2195, 590, - /* 540 */ 715, 253, 464, 2095, 1584, 401, 2245, 2047, 615, 375, - /* 550 */ 2099, 255, 764, 167, 373, 254, 146, 607, 2195, 2286, - /* 560 */ 715, 1996, 2045, 613, 601, 611, 252, 251, 2211, 807, - /* 570 */ 250, 74, 15, 685, 2226, 1338, 2262, 2227, 709, 112, + /* 480 */ 46, 2330, 443, 439, 1261, 2227, 1260, 407, 294, 1578, + /* 490 */ 752, 156, 155, 749, 748, 747, 153, 222, 681, 62, + /* 500 */ 538, 544, 1659, 1860, 1576, 2227, 2205, 2327, 536, 659, + /* 510 */ 606, 532, 528, 626, 62, 601, 600, 599, 716, 1262, + /* 520 */ 1985, 294, 591, 139, 595, 618, 2245, 754, 594, 182, + /* 530 */ 2209, 1654, 294, 593, 598, 383, 382, 19, 2195, 592, + /* 540 */ 715, 254, 464, 2095, 1584, 401, 2245, 2047, 617, 375, + /* 550 */ 2099, 256, 182, 167, 373, 255, 144, 609, 2195, 2286, + /* 560 */ 715, 1996, 2045, 615, 603, 613, 253, 252, 2211, 807, + /* 570 */ 251, 1338, 15, 2100, 2226, 12, 2262, 2227, 709, 110, /* 580 */ 2228, 719, 2230, 2231, 714, 451, 709, 450, 90, 203, - /* 590 */ 716, 186, 1862, 2315, 2226, 1830, 2262, 403, 2311, 171, - /* 600 */ 2228, 719, 2230, 2231, 714, 377, 709, 52, 1661, 1662, - /* 610 */ 70, 1983, 191, 69, 1989, 1340, 93, 449, 2245, 362, - /* 620 */ 2345, 84, 387, 2396, 617, 683, 664, 2109, 2047, 2391, - /* 630 */ 2195, 1829, 715, 47, 45, 44, 43, 42, 1634, 1644, - /* 640 */ 1605, 640, 2356, 2046, 1660, 1663, 663, 189, 2195, 410, - /* 650 */ 224, 2392, 665, 1936, 544, 293, 1860, 167, 9, 1579, - /* 660 */ 1896, 1577, 699, 1994, 1578, 1996, 2226, 2330, 2262, 169, - /* 670 */ 293, 112, 2228, 719, 2230, 2231, 714, 1935, 709, 1576, - /* 680 */ 470, 2095, 458, 2411, 2195, 2315, 44, 43, 42, 403, - /* 690 */ 2311, 1582, 1583, 2327, 1633, 1636, 1637, 1638, 1639, 1640, + /* 590 */ 716, 186, 1862, 2315, 2226, 1831, 2262, 403, 2311, 171, + /* 600 */ 2228, 719, 2230, 2231, 714, 377, 709, 169, 1661, 1662, + /* 610 */ 70, 1340, 191, 69, 1989, 1935, 93, 449, 2245, 362, + /* 620 */ 2345, 1584, 387, 2396, 619, 1737, 666, 597, 596, 2391, + /* 630 */ 2195, 1603, 715, 47, 45, 44, 43, 42, 1634, 1644, + /* 640 */ 1605, 642, 2356, 745, 1660, 1663, 665, 189, 2195, 410, + /* 650 */ 224, 2392, 667, 589, 544, 294, 1860, 167, 2178, 1579, + /* 660 */ 1896, 1577, 699, 1994, 1578, 1996, 2226, 2330, 2262, 1349, + /* 670 */ 294, 110, 2228, 719, 2230, 2231, 714, 1336, 709, 1576, + /* 680 */ 470, 2095, 458, 2411, 1348, 2315, 44, 43, 42, 403, + /* 690 */ 2311, 1582, 1583, 2326, 1633, 1636, 1637, 1638, 1639, 1640, /* 700 */ 1641, 1642, 1643, 711, 707, 1652, 1653, 1655, 1656, 1657, - /* 710 */ 1658, 2, 48, 46, 1664, 685, 267, 2227, 453, 1584, - /* 720 */ 407, 441, 1578, 452, 302, 303, 1796, 206, 2188, 301, - /* 730 */ 679, 2047, 599, 598, 597, 1659, 182, 1576, 388, 589, - /* 740 */ 141, 593, 699, 1994, 807, 592, 2045, 2205, 443, 439, - /* 750 */ 591, 596, 383, 382, 699, 1994, 590, 2100, 2245, 94, - /* 760 */ 2189, 2214, 472, 293, 1654, 639, 2047, 694, 2391, 2109, - /* 770 */ 2195, 2209, 715, 397, 487, 639, 1244, 1584, 2391, 699, - /* 780 */ 1994, 2045, 1602, 699, 1994, 2397, 189, 1979, 497, 2095, - /* 790 */ 2392, 665, 256, 291, 265, 2397, 189, 1264, 1265, 488, - /* 800 */ 2392, 665, 807, 557, 2227, 49, 2226, 639, 2262, 2211, - /* 810 */ 2391, 112, 2228, 719, 2230, 2231, 714, 716, 709, 709, - /* 820 */ 699, 1994, 585, 186, 2047, 2315, 584, 2397, 189, 403, - /* 830 */ 2311, 402, 2392, 665, 1579, 211, 1577, 1971, 1981, 2045, - /* 840 */ 1991, 1661, 1662, 41, 40, 2245, 1349, 47, 45, 44, - /* 850 */ 43, 42, 2346, 699, 1994, 699, 1994, 2195, 1828, 715, - /* 860 */ 168, 1348, 1549, 1550, 1669, 333, 1582, 1583, 699, 1994, - /* 870 */ 1603, 1634, 1644, 258, 2047, 266, 1722, 1660, 1663, 1969, - /* 880 */ 2330, 411, 330, 73, 699, 1994, 72, 1823, 682, 2045, - /* 890 */ 14, 13, 1579, 2226, 1577, 2262, 356, 90, 113, 2228, - /* 900 */ 719, 2230, 2231, 714, 306, 709, 2326, 220, 523, 521, - /* 910 */ 518, 2195, 2315, 1827, 41, 40, 2314, 2311, 47, 45, - /* 920 */ 44, 43, 42, 1990, 1582, 1583, 513, 1633, 1636, 1637, + /* 710 */ 1658, 2, 48, 46, 1664, 1863, 1830, 2227, 453, 1584, + /* 720 */ 407, 2047, 1578, 452, 302, 303, 1796, 206, 2188, 301, + /* 730 */ 681, 2047, 601, 600, 599, 1659, 685, 1576, 388, 591, + /* 740 */ 139, 595, 699, 1994, 807, 594, 2045, 2205, 2047, 513, + /* 750 */ 593, 598, 383, 382, 699, 1994, 592, 12, 2245, 10, + /* 760 */ 2189, 2214, 472, 694, 1654, 641, 2047, 800, 2391, 2195, + /* 770 */ 2195, 2209, 715, 397, 487, 641, 1871, 1584, 2391, 699, + /* 780 */ 1994, 2045, 1635, 699, 1994, 2397, 189, 764, 497, 2095, + /* 790 */ 2392, 667, 257, 292, 746, 2397, 189, 2038, 604, 488, + /* 800 */ 2392, 667, 807, 559, 2227, 49, 2226, 641, 2262, 2211, + /* 810 */ 2391, 110, 2228, 719, 2230, 2231, 714, 716, 709, 709, + /* 820 */ 699, 1994, 317, 186, 2047, 2315, 1605, 2397, 189, 403, + /* 830 */ 2311, 402, 2392, 667, 1579, 211, 1577, 1971, 1983, 2045, + /* 840 */ 1991, 1661, 1662, 41, 40, 2245, 1353, 47, 45, 44, + /* 850 */ 43, 42, 2346, 699, 1994, 699, 1994, 2195, 1829, 715, + /* 860 */ 168, 1352, 1549, 1550, 1669, 333, 1582, 1583, 699, 1994, + /* 870 */ 1603, 1634, 1644, 259, 2047, 267, 436, 1660, 1663, 1969, + /* 880 */ 2330, 411, 330, 73, 699, 1994, 72, 1979, 684, 2045, + /* 890 */ 14, 13, 1579, 2226, 1577, 2262, 356, 90, 111, 2228, + /* 900 */ 719, 2230, 2231, 714, 306, 709, 2325, 220, 523, 521, + /* 910 */ 518, 2195, 2315, 1828, 41, 40, 2314, 2311, 47, 45, + /* 920 */ 44, 43, 42, 1990, 1582, 1583, 515, 1633, 1636, 1637, /* 930 */ 1638, 1639, 1640, 1641, 1642, 1643, 711, 707, 1652, 1653, - /* 940 */ 1655, 1656, 1657, 1658, 2, 48, 46, 62, 668, 699, - /* 950 */ 1994, 1826, 1825, 407, 1824, 1578, 41, 40, 699, 1994, - /* 960 */ 47, 45, 44, 43, 42, 1605, 2195, 238, 1659, 696, - /* 970 */ 1576, 752, 156, 155, 749, 748, 747, 153, 697, 1821, - /* 980 */ 699, 1994, 413, 174, 2395, 111, 699, 1994, 2227, 1820, - /* 990 */ 167, 575, 571, 567, 563, 1702, 237, 1654, 1996, 622, - /* 1000 */ 312, 716, 2178, 2353, 2195, 2195, 414, 2195, 166, 12, - /* 1010 */ 1584, 10, 1772, 752, 156, 155, 749, 748, 747, 153, - /* 1020 */ 1819, 1635, 1353, 1818, 2330, 1817, 81, 80, 456, 2245, - /* 1030 */ 1730, 201, 2195, 579, 578, 807, 91, 1352, 49, 235, - /* 1040 */ 2227, 2195, 2195, 715, 448, 446, 639, 595, 594, 2391, - /* 1050 */ 2325, 1603, 167, 716, 1749, 357, 776, 774, 437, 1816, - /* 1060 */ 1997, 435, 431, 427, 424, 449, 2397, 189, 1838, 802, - /* 1070 */ 1606, 2392, 665, 2195, 1661, 1662, 2195, 2226, 2195, 2262, - /* 1080 */ 1977, 2245, 112, 2228, 719, 2230, 2231, 714, 671, 709, - /* 1090 */ 1815, 1814, 1813, 2195, 2411, 715, 2315, 701, 1998, 2287, - /* 1100 */ 403, 2311, 515, 293, 1634, 1644, 234, 228, 1606, 34, - /* 1110 */ 1660, 1663, 2195, 233, 554, 41, 40, 1587, 291, 47, - /* 1120 */ 45, 44, 43, 42, 703, 1579, 2287, 1577, 1586, 2226, - /* 1130 */ 746, 2262, 226, 2038, 112, 2228, 719, 2230, 2231, 714, - /* 1140 */ 680, 709, 154, 2195, 2195, 2195, 2290, 750, 2315, 1972, - /* 1150 */ 2038, 262, 403, 2311, 381, 380, 751, 1582, 1583, 2038, + /* 940 */ 1655, 1656, 1657, 1658, 2, 48, 46, 62, 1603, 699, + /* 950 */ 1994, 1827, 1826, 407, 1690, 1578, 41, 40, 699, 1994, + /* 960 */ 47, 45, 44, 43, 42, 1606, 2195, 239, 1659, 696, + /* 970 */ 1576, 752, 156, 155, 749, 748, 747, 153, 697, 292, + /* 980 */ 699, 1994, 413, 174, 1825, 109, 699, 1994, 2227, 1606, + /* 990 */ 167, 577, 573, 569, 565, 1702, 238, 1654, 1996, 624, + /* 1000 */ 312, 716, 1730, 2353, 2195, 2195, 414, 208, 166, 701, + /* 1010 */ 1584, 2287, 1772, 752, 156, 155, 749, 748, 747, 153, + /* 1020 */ 1824, 1635, 703, 1821, 2287, 1820, 81, 80, 456, 2245, + /* 1030 */ 2359, 201, 35, 776, 774, 807, 91, 2195, 49, 236, + /* 1040 */ 2227, 2195, 1695, 715, 448, 446, 641, 86, 587, 2391, + /* 1050 */ 85, 167, 586, 716, 1749, 357, 2395, 765, 437, 1997, + /* 1060 */ 1956, 435, 431, 427, 424, 449, 2397, 189, 1838, 802, + /* 1070 */ 2088, 2392, 667, 2195, 1661, 1662, 2195, 2226, 2195, 2262, + /* 1080 */ 3, 2245, 110, 2228, 719, 2230, 2231, 714, 670, 709, + /* 1090 */ 1819, 1818, 54, 2195, 2411, 715, 2315, 1817, 1816, 1635, + /* 1100 */ 403, 2311, 2047, 294, 1634, 1644, 235, 228, 1587, 34, + /* 1110 */ 1660, 1663, 462, 233, 554, 41, 40, 2046, 204, 47, + /* 1120 */ 45, 44, 43, 42, 106, 1579, 154, 1577, 1815, 2226, + /* 1130 */ 1814, 2262, 226, 103, 110, 2228, 719, 2230, 2231, 714, + /* 1140 */ 682, 709, 269, 2195, 2195, 1813, 2290, 1972, 2315, 154, + /* 1150 */ 2195, 2195, 403, 2311, 381, 380, 750, 1582, 1583, 2038, /* 1160 */ 1633, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 711, /* 1170 */ 707, 1652, 1653, 1655, 1656, 1657, 1658, 2, 48, 46, - /* 1180 */ 326, 765, 149, 2024, 1956, 710, 407, 639, 1578, 2088, - /* 1190 */ 2391, 1241, 1242, 2335, 1722, 1805, 1806, 3, 137, 669, - /* 1200 */ 154, 1659, 1635, 1576, 2227, 14, 13, 2397, 189, 54, - /* 1210 */ 83, 243, 2392, 665, 241, 55, 652, 716, 245, 2366, - /* 1220 */ 436, 244, 587, 204, 379, 378, 588, 583, 2359, 247, - /* 1230 */ 1654, 462, 246, 41, 40, 286, 154, 47, 45, 44, - /* 1240 */ 43, 42, 1863, 1584, 249, 2245, 1336, 248, 1880, 585, - /* 1250 */ 1334, 2227, 619, 584, 618, 50, 50, 2195, 139, 715, - /* 1260 */ 280, 268, 1871, 667, 716, 1869, 646, 2216, 807, 36, - /* 1270 */ 600, 15, 1934, 1544, 1590, 41, 40, 108, 2227, 47, - /* 1280 */ 45, 44, 43, 42, 602, 1589, 105, 605, 1933, 1729, - /* 1290 */ 1295, 713, 2245, 2226, 800, 2262, 758, 759, 112, 2228, - /* 1300 */ 719, 2230, 2231, 714, 2195, 709, 715, 1661, 1662, 1547, - /* 1310 */ 2411, 2246, 2315, 390, 273, 154, 403, 2311, 420, 2245, - /* 1320 */ 1314, 1312, 1854, 2218, 2104, 1859, 2035, 2349, 1758, 1757, - /* 1330 */ 1296, 2195, 677, 715, 288, 285, 292, 1634, 1644, 50, - /* 1340 */ 2226, 672, 2262, 1660, 1663, 112, 2228, 719, 2230, 2231, - /* 1350 */ 714, 299, 709, 5, 423, 428, 371, 2411, 1579, 2315, - /* 1360 */ 1577, 416, 415, 403, 2311, 71, 1609, 2226, 445, 2262, + /* 1180 */ 147, 2195, 751, 2195, 673, 2038, 407, 641, 1578, 326, + /* 1190 */ 2391, 1244, 2024, 1241, 1242, 2335, 1722, 1602, 2195, 55, + /* 1200 */ 74, 1659, 135, 1576, 2227, 268, 244, 2397, 189, 242, + /* 1210 */ 1869, 590, 2392, 667, 83, 154, 50, 716, 246, 2366, + /* 1220 */ 248, 245, 1544, 247, 379, 378, 250, 585, 1981, 249, + /* 1230 */ 1654, 1977, 607, 41, 40, 1334, 50, 47, 45, 44, + /* 1240 */ 43, 42, 621, 1584, 620, 2245, 758, 274, 94, 587, + /* 1250 */ 84, 2227, 154, 586, 1805, 1806, 50, 2195, 1998, 715, + /* 1260 */ 263, 1729, 2216, 299, 716, 1590, 648, 710, 807, 36, + /* 1270 */ 1314, 15, 1586, 759, 266, 41, 40, 1936, 2227, 47, + /* 1280 */ 45, 44, 43, 42, 14, 13, 1295, 287, 1547, 1758, + /* 1290 */ 1823, 713, 2245, 2226, 654, 2262, 137, 1312, 110, 2228, + /* 1300 */ 719, 2230, 2231, 714, 2195, 709, 715, 1661, 1662, 1757, + /* 1310 */ 2411, 281, 2315, 1934, 71, 152, 403, 2311, 2218, 2245, + /* 1320 */ 276, 1933, 2246, 420, 390, 683, 1296, 2104, 1854, 1501, + /* 1330 */ 2349, 2195, 1859, 715, 2035, 669, 304, 1634, 1644, 671, + /* 1340 */ 2226, 154, 2262, 1660, 1663, 110, 2228, 719, 2230, 2231, + /* 1350 */ 714, 64, 709, 679, 50, 289, 286, 2411, 1579, 2315, + /* 1360 */ 1577, 416, 415, 403, 2311, 50, 293, 2226, 5, 2262, /* 1370 */ 2227, 1592, 348, 2228, 719, 2230, 2231, 714, 712, 709, - /* 1380 */ 700, 2280, 444, 716, 1659, 2384, 1585, 275, 681, 196, - /* 1390 */ 1582, 1583, 197, 1633, 1636, 1637, 1638, 1639, 1640, 1641, + /* 1380 */ 700, 2280, 423, 716, 1659, 2384, 1585, 691, 308, 428, + /* 1390 */ 1582, 1583, 371, 1633, 1636, 1637, 1638, 1639, 1640, 1641, /* 1400 */ 1642, 1643, 711, 707, 1652, 1653, 1655, 1656, 1657, 1658, - /* 1410 */ 2, 2245, 1501, 1654, 152, 154, 447, 64, 50, 2227, - /* 1420 */ 50, 199, 723, 2195, 304, 715, 1584, 152, 154, 138, - /* 1430 */ 152, 1525, 716, 320, 2334, 1602, 210, 463, 691, 2227, - /* 1440 */ 465, 1606, 2105, 469, 471, 506, 476, 489, 1601, 496, - /* 1450 */ 2097, 705, 716, 505, 498, 516, 514, 507, 517, 2226, - /* 1460 */ 2245, 2262, 1607, 215, 112, 2228, 719, 2230, 2231, 714, - /* 1470 */ 519, 709, 2195, 214, 715, 217, 2411, 520, 2315, 522, - /* 1480 */ 2245, 524, 403, 2311, 4, 539, 540, 308, 1379, 547, - /* 1490 */ 1696, 1645, 2195, 325, 715, 1407, 550, 548, 1604, 225, - /* 1500 */ 1411, 1418, 1416, 157, 227, 1608, 1610, 552, 2226, 555, - /* 1510 */ 2262, 551, 553, 112, 2228, 719, 2230, 2231, 714, 230, - /* 1520 */ 709, 232, 88, 89, 559, 2411, 236, 2315, 2226, 580, - /* 1530 */ 2262, 403, 2311, 112, 2228, 719, 2230, 2231, 714, 114, - /* 1540 */ 709, 1593, 608, 1588, 582, 2288, 609, 2315, 621, 352, - /* 1550 */ 2169, 403, 2311, 623, 1984, 240, 92, 1980, 242, 2166, - /* 1560 */ 160, 161, 1982, 2227, 1978, 321, 162, 163, 259, 627, - /* 1570 */ 150, 628, 626, 1596, 1598, 2165, 716, 261, 263, 1532, - /* 1580 */ 653, 634, 643, 631, 632, 633, 707, 1652, 1653, 1655, - /* 1590 */ 1656, 1657, 1658, 2350, 2360, 2227, 2365, 689, 649, 2364, - /* 1600 */ 8, 271, 274, 393, 2245, 2337, 656, 662, 716, 279, - /* 1610 */ 644, 642, 175, 641, 283, 2227, 2195, 2390, 715, 673, - /* 1620 */ 281, 394, 284, 282, 2414, 670, 1722, 143, 716, 1605, - /* 1630 */ 2331, 1727, 294, 179, 287, 1725, 2245, 1611, 2110, 98, - /* 1640 */ 687, 322, 2227, 688, 323, 2124, 2123, 2122, 2195, 692, - /* 1650 */ 715, 399, 2226, 693, 2262, 716, 2245, 112, 2228, 719, - /* 1660 */ 2230, 2231, 714, 100, 709, 192, 1, 324, 2195, 702, - /* 1670 */ 715, 2315, 102, 1995, 61, 403, 2311, 104, 2296, 721, - /* 1680 */ 327, 2039, 1957, 2245, 2226, 315, 2262, 1220, 804, 113, - /* 1690 */ 2228, 719, 2230, 2231, 714, 2195, 709, 715, 801, 159, - /* 1700 */ 53, 806, 363, 2315, 717, 2227, 2262, 704, 2311, 113, - /* 1710 */ 2228, 719, 2230, 2231, 714, 351, 709, 364, 716, 336, - /* 1720 */ 329, 2227, 350, 2315, 2187, 340, 2186, 366, 2311, 331, - /* 1730 */ 2185, 2226, 78, 2262, 716, 2182, 113, 2228, 719, 2230, - /* 1740 */ 2231, 714, 425, 709, 426, 1569, 2245, 1570, 195, 430, - /* 1750 */ 2315, 2180, 2227, 432, 433, 2312, 434, 2179, 2195, 372, - /* 1760 */ 715, 2177, 2245, 2176, 438, 716, 440, 391, 2175, 442, - /* 1770 */ 2227, 1560, 2156, 198, 2195, 2155, 715, 200, 1528, 79, - /* 1780 */ 1527, 2137, 2136, 716, 2135, 454, 455, 2134, 2133, 2087, - /* 1790 */ 1478, 460, 2084, 2245, 2226, 2083, 2262, 461, 392, 171, - /* 1800 */ 2228, 719, 2230, 2231, 714, 2195, 709, 715, 202, 82, - /* 1810 */ 2226, 2245, 2262, 2082, 2081, 349, 2228, 719, 2230, 2231, - /* 1820 */ 714, 2086, 709, 2195, 2085, 715, 205, 2080, 2079, 2077, - /* 1830 */ 2076, 2075, 207, 477, 2074, 479, 2090, 2073, 2072, 2071, - /* 1840 */ 2070, 2226, 2357, 2262, 2069, 2068, 349, 2228, 719, 2230, - /* 1850 */ 2231, 714, 2067, 709, 2066, 2065, 2064, 2227, 209, 2226, - /* 1860 */ 2063, 2262, 2062, 2061, 342, 2228, 719, 2230, 2231, 714, - /* 1870 */ 716, 709, 2227, 2060, 2059, 2058, 2057, 87, 2056, 2055, - /* 1880 */ 2089, 2054, 2053, 1480, 2052, 716, 2051, 2227, 2050, 509, - /* 1890 */ 2049, 2048, 1350, 360, 1354, 1899, 361, 216, 2245, 1898, - /* 1900 */ 713, 1346, 1897, 1895, 1892, 218, 525, 527, 526, 661, - /* 1910 */ 2195, 219, 715, 2245, 1891, 1884, 1873, 530, 398, 531, - /* 1920 */ 529, 1849, 533, 1243, 1848, 2195, 2154, 715, 2245, 537, - /* 1930 */ 183, 535, 2144, 2132, 2227, 76, 231, 2131, 534, 221, - /* 1940 */ 2195, 223, 715, 2108, 1973, 2215, 2226, 716, 2262, 184, - /* 1950 */ 545, 172, 2228, 719, 2230, 2231, 714, 1894, 709, 2227, - /* 1960 */ 77, 2226, 229, 2262, 1890, 560, 349, 2228, 719, 2230, - /* 1970 */ 2231, 714, 716, 709, 561, 2245, 2226, 1288, 2262, 1888, + /* 1410 */ 2, 2245, 723, 1654, 1379, 152, 1609, 154, 136, 2227, + /* 1420 */ 152, 445, 444, 2195, 1696, 715, 1584, 1645, 196, 1589, + /* 1430 */ 197, 447, 716, 199, 2334, 1525, 320, 674, 325, 2227, + /* 1440 */ 1602, 465, 463, 210, 1606, 2105, 469, 471, 506, 476, + /* 1450 */ 1601, 705, 716, 496, 489, 2097, 516, 498, 505, 2226, + /* 1460 */ 2245, 2262, 507, 517, 110, 2228, 719, 2230, 2231, 714, + /* 1470 */ 514, 709, 2195, 214, 715, 215, 2411, 519, 2315, 217, + /* 1480 */ 2245, 522, 403, 2311, 524, 1407, 1607, 520, 1411, 4, + /* 1490 */ 1418, 1416, 2195, 157, 715, 540, 539, 547, 550, 225, + /* 1500 */ 1604, 551, 548, 227, 1608, 1610, 553, 1611, 2226, 552, + /* 1510 */ 2262, 555, 582, 110, 2228, 719, 2230, 2231, 714, 230, + /* 1520 */ 709, 232, 88, 2110, 89, 2411, 561, 2315, 2226, 237, + /* 1530 */ 2262, 403, 2311, 110, 2228, 719, 2230, 2231, 714, 610, + /* 1540 */ 709, 1593, 112, 1588, 352, 2288, 584, 2315, 611, 2169, + /* 1550 */ 623, 403, 2311, 625, 1984, 2166, 241, 1980, 243, 160, + /* 1560 */ 161, 92, 1982, 2227, 1978, 162, 148, 260, 163, 629, + /* 1570 */ 321, 628, 1532, 1596, 1598, 2165, 716, 636, 264, 2365, + /* 1580 */ 635, 630, 655, 633, 689, 262, 707, 1652, 1653, 1655, + /* 1590 */ 1656, 1657, 1658, 645, 2350, 2227, 2360, 651, 8, 2364, + /* 1600 */ 272, 664, 275, 393, 2245, 658, 175, 2337, 716, 634, + /* 1610 */ 280, 646, 643, 282, 644, 2227, 2195, 283, 715, 394, + /* 1620 */ 2414, 285, 675, 2390, 672, 1722, 141, 1605, 716, 1725, + /* 1630 */ 2331, 1727, 179, 295, 687, 149, 2245, 1, 284, 322, + /* 1640 */ 688, 150, 2227, 2124, 2123, 323, 2122, 399, 2195, 692, + /* 1650 */ 715, 100, 2226, 693, 2262, 716, 2245, 110, 2228, 719, + /* 1660 */ 2230, 2231, 714, 1995, 709, 324, 192, 61, 2195, 702, + /* 1670 */ 715, 2315, 2296, 102, 721, 403, 2311, 1957, 288, 327, + /* 1680 */ 2039, 1220, 315, 2245, 2226, 804, 2262, 801, 53, 111, + /* 1690 */ 2228, 719, 2230, 2231, 714, 2195, 709, 715, 329, 159, + /* 1700 */ 806, 351, 363, 2315, 717, 2227, 2262, 704, 2311, 111, + /* 1710 */ 2228, 719, 2230, 2231, 714, 2187, 709, 364, 716, 78, + /* 1720 */ 336, 2227, 350, 2315, 340, 2186, 2185, 366, 2311, 331, + /* 1730 */ 2182, 2226, 425, 2262, 716, 426, 111, 2228, 719, 2230, + /* 1740 */ 2231, 714, 1569, 709, 1570, 195, 2245, 430, 2180, 432, + /* 1750 */ 2315, 433, 2227, 434, 2179, 2312, 372, 2177, 2195, 438, + /* 1760 */ 715, 2176, 2245, 440, 2175, 716, 442, 391, 1560, 2156, + /* 1770 */ 2227, 198, 2155, 200, 2195, 79, 715, 1528, 1527, 2137, + /* 1780 */ 2136, 2135, 454, 716, 455, 2134, 2133, 1478, 2087, 460, + /* 1790 */ 461, 2084, 202, 2245, 2226, 2083, 2262, 2082, 392, 171, + /* 1800 */ 2228, 719, 2230, 2231, 714, 2195, 709, 715, 82, 2081, + /* 1810 */ 2226, 2245, 2262, 2086, 205, 349, 2228, 719, 2230, 2231, + /* 1820 */ 714, 2085, 709, 2195, 2080, 715, 2079, 2077, 2076, 2075, + /* 1830 */ 207, 477, 2074, 479, 2090, 2073, 2072, 2071, 2070, 2069, + /* 1840 */ 2068, 2226, 2357, 2262, 2067, 2066, 349, 2228, 719, 2230, + /* 1850 */ 2231, 714, 2065, 709, 2064, 2063, 2062, 2227, 360, 2226, + /* 1860 */ 2061, 2262, 2060, 2059, 342, 2228, 719, 2230, 2231, 714, + /* 1870 */ 716, 709, 2227, 2058, 209, 87, 2057, 2056, 2055, 2089, + /* 1880 */ 2054, 2053, 2052, 1480, 2051, 716, 2050, 2227, 509, 2049, + /* 1890 */ 2048, 1350, 1354, 361, 1899, 216, 1346, 1898, 2245, 1897, + /* 1900 */ 713, 1895, 1892, 525, 526, 218, 527, 1891, 529, 663, + /* 1910 */ 2195, 219, 715, 2245, 531, 1884, 530, 535, 398, 534, + /* 1920 */ 533, 1873, 537, 1849, 183, 2195, 1243, 715, 2245, 231, + /* 1930 */ 76, 1848, 221, 2154, 2227, 2144, 223, 2132, 2131, 2108, + /* 1940 */ 2195, 2215, 715, 1973, 184, 545, 2226, 716, 2262, 234, + /* 1950 */ 77, 172, 2228, 719, 2230, 2231, 714, 1894, 709, 2227, + /* 1960 */ 229, 2226, 562, 2262, 1890, 563, 349, 2228, 719, 2230, + /* 1970 */ 2231, 714, 716, 709, 1288, 2245, 2226, 1888, 2262, 566, /* 1980 */ 406, 348, 2228, 719, 2230, 2231, 714, 2195, 709, 715, - /* 1990 */ 2281, 562, 564, 565, 566, 1886, 2227, 568, 569, 1883, - /* 2000 */ 2245, 570, 572, 574, 573, 2413, 1868, 1866, 1867, 716, - /* 2010 */ 1865, 1845, 2195, 1975, 715, 1423, 1422, 1974, 63, 239, - /* 2020 */ 1337, 1335, 1333, 2226, 1332, 2262, 1331, 1330, 349, 2228, - /* 2030 */ 719, 2230, 2231, 714, 1881, 709, 773, 2245, 1329, 1326, - /* 2040 */ 1324, 1325, 408, 384, 1872, 775, 1323, 385, 620, 2195, - /* 2050 */ 2262, 715, 1870, 344, 2228, 719, 2230, 2231, 714, 386, - /* 2060 */ 709, 606, 2227, 1844, 1843, 1842, 610, 603, 1841, 1840, - /* 2070 */ 612, 115, 614, 1554, 1558, 716, 1556, 1553, 29, 2153, - /* 2080 */ 57, 67, 1534, 2227, 1536, 2226, 2143, 2262, 629, 625, - /* 2090 */ 349, 2228, 719, 2230, 2231, 714, 716, 709, 630, 2130, - /* 2100 */ 2129, 635, 264, 2245, 1513, 2396, 20, 810, 165, 1512, - /* 2110 */ 1538, 1775, 65, 637, 2227, 2195, 17, 715, 21, 278, - /* 2120 */ 31, 270, 6, 319, 2245, 645, 7, 716, 647, 272, - /* 2130 */ 22, 277, 1756, 173, 33, 276, 2195, 1748, 715, 181, - /* 2140 */ 32, 2216, 1790, 95, 24, 1789, 59, 798, 794, 790, - /* 2150 */ 786, 2226, 316, 2262, 1795, 2245, 334, 2228, 719, 2230, - /* 2160 */ 2231, 714, 1796, 709, 395, 1794, 1793, 2195, 396, 715, - /* 2170 */ 290, 58, 2226, 1719, 2262, 178, 2128, 332, 2228, 719, - /* 2180 */ 2230, 2231, 714, 23, 709, 2227, 1718, 2107, 96, 97, - /* 2190 */ 297, 2106, 110, 298, 25, 309, 18, 1754, 716, 300, - /* 2200 */ 305, 2227, 99, 2226, 105, 2262, 310, 26, 335, 2228, - /* 2210 */ 719, 2230, 2231, 714, 716, 709, 307, 690, 11, 68, - /* 2220 */ 101, 1671, 1670, 13, 1594, 2265, 2245, 695, 1649, 708, - /* 2230 */ 180, 1647, 193, 722, 1626, 39, 409, 16, 2195, 1646, - /* 2240 */ 715, 27, 2245, 1681, 1618, 28, 718, 726, 1408, 720, - /* 2250 */ 724, 729, 1405, 2227, 2195, 727, 715, 1404, 730, 732, - /* 2260 */ 1401, 733, 296, 735, 1395, 1393, 716, 736, 738, 295, - /* 2270 */ 739, 106, 2227, 313, 2226, 107, 2262, 75, 1399, 341, - /* 2280 */ 2228, 719, 2230, 2231, 714, 716, 709, 1398, 260, 1397, - /* 2290 */ 2226, 1417, 2262, 1396, 2245, 345, 2228, 719, 2230, 2231, - /* 2300 */ 714, 1413, 709, 1286, 753, 2227, 2195, 1318, 715, 1317, - /* 2310 */ 1344, 1316, 1315, 2245, 1313, 1311, 763, 1310, 716, 1309, - /* 2320 */ 314, 1307, 1306, 1305, 2227, 2195, 1304, 715, 1341, 1303, - /* 2330 */ 1302, 1301, 1339, 1298, 1297, 1294, 1293, 716, 1292, 1291, - /* 2340 */ 2227, 1889, 2226, 783, 2262, 785, 2245, 337, 2228, 719, - /* 2350 */ 2230, 2231, 714, 716, 709, 1887, 784, 787, 2195, 788, - /* 2360 */ 715, 2226, 1885, 2262, 789, 2245, 346, 2228, 719, 2230, - /* 2370 */ 2231, 714, 791, 709, 792, 2227, 793, 2195, 1882, 715, - /* 2380 */ 795, 2245, 796, 1864, 797, 799, 1233, 1839, 716, 1221, - /* 2390 */ 803, 318, 2227, 2195, 2226, 715, 2262, 805, 808, 338, - /* 2400 */ 2228, 719, 2230, 2231, 714, 716, 709, 1580, 328, 809, + /* 1990 */ 2281, 564, 567, 568, 1886, 570, 2227, 571, 572, 1883, + /* 2000 */ 2245, 575, 574, 576, 1868, 2413, 1866, 1867, 1865, 716, + /* 2010 */ 1845, 1975, 2195, 1423, 715, 1422, 240, 63, 1974, 1337, + /* 2020 */ 1335, 1333, 1332, 2226, 1331, 2262, 1330, 1329, 349, 2228, + /* 2030 */ 719, 2230, 2231, 714, 773, 709, 775, 2245, 1324, 1326, + /* 2040 */ 1881, 384, 408, 1872, 385, 605, 1325, 1870, 622, 2195, + /* 2050 */ 2262, 715, 1323, 344, 2228, 719, 2230, 2231, 714, 386, + /* 2060 */ 709, 608, 2227, 1844, 1843, 1842, 612, 1841, 614, 1840, + /* 2070 */ 616, 113, 1554, 1556, 1558, 716, 1553, 29, 2153, 57, + /* 2080 */ 67, 1534, 1536, 2227, 631, 2226, 2143, 2262, 265, 627, + /* 2090 */ 349, 2228, 719, 2230, 2231, 714, 716, 709, 2130, 632, + /* 2100 */ 2129, 1513, 2396, 2245, 20, 1512, 165, 810, 1538, 637, + /* 2110 */ 31, 6, 17, 639, 2227, 2195, 647, 715, 1775, 271, + /* 2120 */ 7, 649, 21, 319, 2245, 22, 173, 716, 278, 273, + /* 2130 */ 279, 1756, 277, 32, 2216, 95, 2195, 33, 715, 181, + /* 2140 */ 1748, 65, 24, 1790, 1795, 1789, 291, 798, 794, 790, + /* 2150 */ 786, 2226, 316, 2262, 395, 2245, 334, 2228, 719, 2230, + /* 2160 */ 2231, 714, 1796, 709, 23, 1794, 1793, 2195, 396, 715, + /* 2170 */ 59, 178, 2226, 2128, 2262, 58, 2107, 332, 2228, 719, + /* 2180 */ 2230, 2231, 714, 18, 709, 2227, 1719, 97, 1718, 298, + /* 2190 */ 2106, 307, 108, 1754, 98, 309, 96, 310, 716, 25, + /* 2200 */ 26, 2227, 690, 2226, 103, 2262, 300, 305, 335, 2228, + /* 2210 */ 719, 2230, 2231, 714, 716, 709, 68, 99, 1671, 11, + /* 2220 */ 13, 1670, 1594, 180, 1681, 2265, 2245, 695, 193, 1649, + /* 2230 */ 708, 1626, 1647, 1646, 720, 39, 722, 16, 2195, 27, + /* 2240 */ 715, 1618, 2245, 409, 28, 726, 1408, 724, 1413, 1405, + /* 2250 */ 1404, 727, 729, 2227, 2195, 730, 715, 1401, 732, 718, + /* 2260 */ 733, 735, 297, 1395, 736, 738, 716, 1393, 739, 296, + /* 2270 */ 313, 104, 2227, 1399, 2226, 105, 2262, 1417, 1286, 341, + /* 2280 */ 2228, 719, 2230, 2231, 714, 716, 709, 75, 261, 753, + /* 2290 */ 2226, 1398, 2262, 1318, 2245, 345, 2228, 719, 2230, 2231, + /* 2300 */ 714, 1397, 709, 1396, 1317, 2227, 2195, 1316, 715, 1315, + /* 2310 */ 1344, 1313, 1311, 2245, 1310, 1309, 763, 314, 716, 1307, + /* 2320 */ 1306, 1304, 1305, 1303, 2227, 2195, 1302, 715, 1341, 1301, + /* 2330 */ 1339, 1298, 1297, 1294, 1293, 1292, 1889, 716, 1291, 783, + /* 2340 */ 2227, 784, 2226, 1887, 2262, 785, 2245, 337, 2228, 719, + /* 2350 */ 2230, 2231, 714, 716, 709, 787, 788, 789, 2195, 1885, + /* 2360 */ 715, 2226, 791, 2262, 793, 2245, 346, 2228, 719, 2230, + /* 2370 */ 2231, 714, 792, 709, 1882, 2227, 795, 2195, 796, 715, + /* 2380 */ 1864, 2245, 797, 799, 1233, 1839, 1221, 803, 716, 318, + /* 2390 */ 805, 808, 2227, 2195, 2226, 715, 2262, 1580, 328, 338, + /* 2400 */ 2228, 719, 2230, 2231, 714, 716, 709, 809, 1809, 1809, /* 2410 */ 1809, 1809, 1809, 2226, 1809, 2262, 2245, 1809, 347, 2228, /* 2420 */ 719, 2230, 2231, 714, 1809, 709, 1809, 2227, 2195, 2226, /* 2430 */ 715, 2262, 1809, 2245, 339, 2228, 719, 2230, 2231, 714, @@ -848,7 +848,7 @@ static const YYCODETYPE yy_lookahead[] = { /* 20 */ 20, 0, 22, 8, 9, 375, 399, 12, 13, 14, /* 30 */ 15, 16, 382, 360, 361, 35, 0, 37, 20, 355, /* 40 */ 356, 37, 21, 384, 0, 24, 25, 26, 27, 28, - /* 50 */ 29, 30, 31, 32, 362, 396, 34, 398, 355, 356, + /* 50 */ 29, 30, 31, 32, 362, 396, 42, 398, 355, 356, /* 60 */ 463, 8, 9, 466, 64, 12, 13, 14, 15, 16, /* 70 */ 70, 379, 398, 20, 398, 355, 356, 77, 375, 387, /* 80 */ 483, 484, 355, 356, 410, 488, 489, 413, 414, 413, @@ -870,220 +870,220 @@ static const YYCODETYPE yy_lookahead[] = { /* 240 */ 240, 241, 242, 243, 244, 12, 13, 20, 50, 20, /* 250 */ 18, 22, 20, 20, 69, 22, 141, 142, 224, 27, /* 260 */ 343, 463, 30, 70, 466, 4, 37, 35, 35, 20, - /* 270 */ 37, 8, 9, 356, 170, 12, 13, 14, 15, 16, + /* 270 */ 37, 8, 9, 356, 260, 12, 13, 14, 15, 16, /* 280 */ 20, 483, 484, 51, 55, 53, 488, 489, 171, 172, - /* 290 */ 58, 224, 177, 178, 20, 463, 33, 64, 466, 14, - /* 300 */ 343, 384, 287, 70, 20, 20, 113, 46, 47, 48, + /* 290 */ 58, 224, 177, 178, 20, 463, 33, 64, 466, 355, + /* 300 */ 105, 384, 287, 70, 56, 57, 113, 46, 47, 48, /* 310 */ 77, 355, 356, 396, 394, 398, 484, 397, 398, 21, /* 320 */ 488, 489, 24, 25, 26, 27, 28, 29, 30, 31, - /* 330 */ 32, 176, 105, 141, 142, 102, 104, 69, 105, 272, + /* 330 */ 32, 176, 105, 141, 142, 102, 104, 362, 105, 272, /* 340 */ 273, 274, 275, 276, 277, 278, 372, 115, 380, 432, - /* 350 */ 343, 434, 248, 396, 437, 438, 439, 440, 441, 442, - /* 360 */ 386, 444, 258, 170, 447, 105, 449, 450, 451, 106, + /* 350 */ 343, 434, 408, 409, 437, 438, 439, 440, 441, 442, + /* 360 */ 386, 444, 387, 170, 447, 105, 449, 450, 451, 106, /* 370 */ 396, 173, 455, 456, 141, 142, 105, 145, 180, 105, /* 380 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, /* 390 */ 158, 159, 160, 161, 162, 163, 164, 429, 166, 167, - /* 400 */ 168, 355, 356, 396, 171, 172, 0, 115, 434, 435, - /* 410 */ 177, 178, 64, 4, 458, 459, 460, 461, 444, 463, - /* 420 */ 464, 375, 267, 268, 269, 192, 356, 194, 382, 355, + /* 400 */ 168, 355, 356, 396, 171, 172, 0, 0, 434, 435, + /* 410 */ 177, 178, 20, 4, 458, 459, 460, 461, 444, 463, + /* 420 */ 464, 375, 267, 268, 269, 192, 356, 194, 382, 22, /* 430 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 355, /* 440 */ 356, 248, 249, 250, 251, 252, 253, 254, 255, 256, - /* 450 */ 257, 258, 104, 245, 384, 107, 171, 224, 225, 375, + /* 450 */ 257, 258, 360, 361, 384, 187, 261, 224, 225, 375, /* 460 */ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, /* 470 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 12, - /* 480 */ 13, 407, 362, 409, 20, 343, 22, 20, 261, 22, + /* 480 */ 13, 436, 214, 215, 20, 343, 22, 20, 261, 22, /* 490 */ 134, 135, 136, 137, 138, 139, 140, 351, 356, 105, - /* 500 */ 51, 355, 35, 357, 37, 343, 372, 387, 59, 439, - /* 510 */ 4, 62, 63, 77, 105, 72, 73, 74, 356, 55, - /* 520 */ 386, 261, 79, 80, 81, 19, 384, 115, 85, 384, + /* 500 */ 51, 355, 35, 357, 37, 343, 372, 462, 59, 439, + /* 510 */ 4, 62, 63, 115, 105, 72, 73, 74, 356, 55, + /* 520 */ 386, 261, 79, 80, 81, 19, 384, 69, 85, 384, /* 530 */ 396, 64, 261, 90, 91, 92, 93, 70, 396, 96, /* 540 */ 398, 35, 355, 356, 77, 376, 384, 384, 21, 404, - /* 550 */ 405, 136, 77, 384, 391, 140, 447, 51, 396, 450, + /* 550 */ 405, 136, 384, 384, 391, 140, 447, 51, 396, 450, /* 560 */ 398, 392, 399, 36, 58, 38, 39, 40, 434, 102, - /* 570 */ 64, 115, 105, 355, 432, 37, 434, 343, 444, 437, + /* 570 */ 64, 37, 105, 405, 432, 245, 434, 343, 444, 437, /* 580 */ 438, 439, 440, 441, 442, 191, 444, 193, 364, 402, /* 590 */ 356, 449, 358, 451, 432, 343, 434, 455, 456, 437, - /* 600 */ 438, 439, 440, 441, 442, 381, 444, 105, 141, 142, - /* 610 */ 104, 385, 470, 107, 390, 77, 201, 223, 384, 204, - /* 620 */ 478, 165, 207, 3, 209, 407, 463, 409, 384, 466, - /* 630 */ 396, 343, 398, 12, 13, 14, 15, 16, 171, 172, - /* 640 */ 20, 479, 480, 399, 177, 178, 483, 484, 396, 376, - /* 650 */ 351, 488, 489, 373, 355, 261, 357, 384, 42, 192, - /* 660 */ 0, 194, 355, 356, 22, 392, 432, 436, 434, 365, - /* 670 */ 261, 437, 438, 439, 440, 441, 442, 373, 444, 37, - /* 680 */ 355, 356, 375, 449, 396, 451, 14, 15, 16, 455, + /* 600 */ 438, 439, 440, 441, 442, 381, 444, 365, 141, 142, + /* 610 */ 104, 77, 470, 107, 390, 373, 201, 223, 384, 204, + /* 620 */ 478, 77, 207, 3, 209, 14, 463, 369, 370, 466, + /* 630 */ 396, 20, 398, 12, 13, 14, 15, 16, 171, 172, + /* 640 */ 20, 479, 480, 115, 177, 178, 483, 484, 396, 376, + /* 650 */ 351, 488, 489, 13, 355, 261, 357, 384, 0, 192, + /* 660 */ 0, 194, 355, 356, 22, 392, 432, 436, 434, 22, + /* 670 */ 261, 437, 438, 439, 440, 441, 442, 37, 444, 37, + /* 680 */ 355, 356, 375, 449, 37, 451, 14, 15, 16, 455, /* 690 */ 456, 224, 225, 462, 227, 228, 229, 230, 231, 232, /* 700 */ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - /* 710 */ 243, 244, 12, 13, 14, 355, 64, 343, 416, 77, - /* 720 */ 20, 187, 22, 421, 135, 136, 106, 402, 416, 140, - /* 730 */ 356, 384, 72, 73, 74, 35, 384, 37, 391, 79, - /* 740 */ 80, 81, 355, 356, 102, 85, 399, 372, 214, 215, - /* 750 */ 90, 91, 92, 93, 355, 356, 96, 405, 384, 107, - /* 760 */ 416, 386, 375, 261, 64, 463, 384, 407, 466, 409, - /* 770 */ 396, 396, 398, 391, 375, 463, 14, 77, 466, 355, - /* 780 */ 356, 399, 20, 355, 356, 483, 484, 385, 355, 356, - /* 790 */ 488, 489, 135, 173, 422, 483, 484, 56, 57, 375, + /* 710 */ 243, 244, 12, 13, 14, 0, 343, 343, 416, 77, + /* 720 */ 20, 384, 22, 421, 135, 136, 106, 402, 416, 140, + /* 730 */ 356, 384, 72, 73, 74, 35, 399, 37, 391, 79, + /* 740 */ 80, 81, 355, 356, 102, 85, 399, 372, 384, 102, + /* 750 */ 90, 91, 92, 93, 355, 356, 96, 245, 384, 247, + /* 760 */ 416, 386, 375, 399, 64, 463, 384, 52, 466, 396, + /* 770 */ 396, 396, 398, 391, 375, 463, 0, 77, 466, 355, + /* 780 */ 356, 399, 171, 355, 356, 483, 484, 77, 355, 356, + /* 790 */ 488, 489, 135, 173, 393, 483, 484, 396, 22, 375, /* 800 */ 488, 489, 102, 375, 343, 105, 432, 463, 434, 434, /* 810 */ 466, 437, 438, 439, 440, 441, 442, 356, 444, 444, - /* 820 */ 355, 356, 134, 449, 384, 451, 138, 483, 484, 455, + /* 820 */ 355, 356, 34, 449, 384, 451, 20, 483, 484, 455, /* 830 */ 456, 391, 488, 489, 192, 402, 194, 0, 385, 399, /* 840 */ 375, 141, 142, 8, 9, 384, 22, 12, 13, 14, /* 850 */ 15, 16, 478, 355, 356, 355, 356, 396, 343, 398, /* 860 */ 18, 37, 205, 206, 14, 23, 224, 225, 355, 356, - /* 870 */ 20, 171, 172, 375, 384, 375, 260, 177, 178, 0, - /* 880 */ 436, 391, 40, 41, 355, 356, 44, 344, 375, 399, + /* 870 */ 20, 171, 172, 375, 384, 375, 218, 177, 178, 0, + /* 880 */ 436, 391, 40, 41, 355, 356, 44, 385, 375, 399, /* 890 */ 1, 2, 192, 432, 194, 434, 54, 364, 437, 438, /* 900 */ 439, 440, 441, 442, 375, 444, 462, 65, 66, 67, /* 910 */ 68, 396, 451, 343, 8, 9, 455, 456, 12, 13, /* 920 */ 14, 15, 16, 390, 224, 225, 102, 227, 228, 229, /* 930 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - /* 940 */ 240, 241, 242, 243, 244, 12, 13, 105, 33, 355, - /* 950 */ 356, 343, 343, 20, 343, 22, 8, 9, 355, 356, + /* 940 */ 240, 241, 242, 243, 244, 12, 13, 105, 20, 355, + /* 950 */ 356, 343, 343, 20, 170, 22, 8, 9, 355, 356, /* 960 */ 12, 13, 14, 15, 16, 20, 396, 35, 35, 375, - /* 970 */ 37, 134, 135, 136, 137, 138, 139, 140, 375, 343, - /* 980 */ 355, 356, 376, 51, 3, 143, 355, 356, 343, 343, + /* 970 */ 37, 134, 135, 136, 137, 138, 139, 140, 375, 173, + /* 980 */ 355, 356, 376, 51, 343, 143, 355, 356, 343, 20, /* 990 */ 384, 59, 60, 61, 62, 106, 64, 64, 392, 416, - /* 1000 */ 375, 356, 0, 358, 396, 396, 375, 396, 173, 245, - /* 1010 */ 77, 247, 106, 134, 135, 136, 137, 138, 139, 140, - /* 1020 */ 343, 171, 22, 343, 436, 343, 184, 185, 186, 384, - /* 1030 */ 4, 189, 396, 360, 361, 102, 104, 37, 105, 107, - /* 1040 */ 343, 396, 396, 398, 202, 203, 463, 369, 370, 466, - /* 1050 */ 462, 20, 384, 356, 106, 213, 369, 370, 216, 343, - /* 1060 */ 392, 219, 220, 221, 222, 223, 483, 484, 346, 347, - /* 1070 */ 20, 488, 489, 396, 141, 142, 396, 432, 396, 434, - /* 1080 */ 385, 384, 437, 438, 439, 440, 441, 442, 33, 444, - /* 1090 */ 343, 343, 343, 396, 449, 398, 451, 448, 385, 450, - /* 1100 */ 455, 456, 102, 261, 171, 172, 174, 175, 20, 2, - /* 1110 */ 177, 178, 396, 181, 182, 8, 9, 37, 173, 12, - /* 1120 */ 13, 14, 15, 16, 448, 192, 450, 194, 37, 432, - /* 1130 */ 393, 434, 200, 396, 437, 438, 439, 440, 441, 442, - /* 1140 */ 416, 444, 33, 396, 396, 396, 449, 393, 451, 0, - /* 1150 */ 396, 385, 455, 456, 39, 40, 393, 224, 225, 396, + /* 1000 */ 375, 356, 4, 358, 396, 396, 375, 64, 173, 448, + /* 1010 */ 77, 450, 106, 134, 135, 136, 137, 138, 139, 140, + /* 1020 */ 343, 171, 448, 343, 450, 343, 184, 185, 186, 384, + /* 1030 */ 406, 189, 248, 369, 370, 102, 104, 396, 105, 107, + /* 1040 */ 343, 396, 258, 398, 202, 203, 463, 104, 134, 466, + /* 1050 */ 107, 384, 138, 356, 106, 213, 3, 371, 216, 392, + /* 1060 */ 374, 219, 220, 221, 222, 223, 483, 484, 346, 347, + /* 1070 */ 0, 488, 489, 396, 141, 142, 396, 432, 396, 434, + /* 1080 */ 33, 384, 437, 438, 439, 440, 441, 442, 33, 444, + /* 1090 */ 343, 343, 45, 396, 449, 398, 451, 343, 343, 171, + /* 1100 */ 455, 456, 384, 261, 171, 172, 174, 175, 37, 2, + /* 1110 */ 177, 178, 42, 181, 182, 8, 9, 399, 173, 12, + /* 1120 */ 13, 14, 15, 16, 105, 192, 33, 194, 343, 432, + /* 1130 */ 343, 434, 200, 114, 437, 438, 439, 440, 441, 442, + /* 1140 */ 416, 444, 173, 396, 396, 343, 449, 0, 451, 33, + /* 1150 */ 396, 396, 455, 456, 39, 40, 393, 224, 225, 396, /* 1160 */ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, /* 1170 */ 237, 238, 239, 240, 241, 242, 243, 244, 12, 13, - /* 1180 */ 377, 371, 33, 380, 374, 385, 20, 463, 22, 0, - /* 1190 */ 466, 47, 48, 259, 260, 141, 142, 33, 33, 284, - /* 1200 */ 33, 35, 171, 37, 343, 1, 2, 483, 484, 45, - /* 1210 */ 45, 108, 488, 489, 111, 106, 481, 356, 108, 358, - /* 1220 */ 218, 111, 13, 173, 109, 110, 13, 112, 406, 108, - /* 1230 */ 64, 42, 111, 8, 9, 492, 33, 12, 13, 14, - /* 1240 */ 15, 16, 0, 77, 108, 384, 37, 111, 0, 134, - /* 1250 */ 37, 343, 208, 138, 210, 33, 33, 396, 359, 398, - /* 1260 */ 475, 173, 0, 282, 356, 0, 358, 49, 102, 2, - /* 1270 */ 22, 105, 372, 106, 194, 8, 9, 105, 343, 12, - /* 1280 */ 13, 14, 15, 16, 22, 194, 114, 22, 372, 263, - /* 1290 */ 37, 356, 384, 432, 52, 434, 13, 13, 437, 438, + /* 1180 */ 33, 396, 393, 396, 33, 396, 20, 463, 22, 377, + /* 1190 */ 466, 14, 380, 47, 48, 259, 260, 20, 396, 106, + /* 1200 */ 115, 35, 33, 37, 343, 64, 108, 483, 484, 111, + /* 1210 */ 0, 13, 488, 489, 45, 33, 33, 356, 108, 358, + /* 1220 */ 108, 111, 106, 111, 109, 110, 108, 112, 385, 111, + /* 1230 */ 64, 385, 22, 8, 9, 37, 33, 12, 13, 14, + /* 1240 */ 15, 16, 208, 77, 210, 384, 13, 33, 107, 134, + /* 1250 */ 165, 343, 33, 138, 141, 142, 33, 396, 385, 398, + /* 1260 */ 385, 263, 49, 33, 356, 194, 358, 385, 102, 2, + /* 1270 */ 37, 105, 37, 13, 422, 8, 9, 373, 343, 12, + /* 1280 */ 13, 14, 15, 16, 1, 2, 37, 492, 106, 106, + /* 1290 */ 344, 356, 384, 432, 481, 434, 359, 37, 437, 438, /* 1300 */ 439, 440, 441, 442, 396, 444, 398, 141, 142, 106, - /* 1310 */ 449, 384, 451, 415, 33, 33, 455, 456, 359, 384, - /* 1320 */ 37, 37, 354, 105, 406, 356, 395, 406, 106, 106, - /* 1330 */ 77, 396, 465, 398, 485, 457, 468, 171, 172, 33, - /* 1340 */ 432, 286, 434, 177, 178, 437, 438, 439, 440, 441, - /* 1350 */ 442, 33, 444, 264, 417, 51, 433, 449, 192, 451, - /* 1360 */ 194, 12, 13, 455, 456, 33, 20, 432, 426, 434, + /* 1310 */ 449, 475, 451, 372, 33, 33, 455, 456, 105, 384, + /* 1320 */ 106, 372, 384, 359, 415, 106, 77, 406, 354, 106, + /* 1330 */ 406, 396, 356, 398, 395, 282, 106, 171, 172, 284, + /* 1340 */ 432, 33, 434, 177, 178, 437, 438, 439, 440, 441, + /* 1350 */ 442, 33, 444, 465, 33, 485, 457, 449, 192, 451, + /* 1360 */ 194, 12, 13, 455, 456, 33, 468, 432, 264, 434, /* 1370 */ 343, 22, 437, 438, 439, 440, 441, 442, 443, 444, - /* 1380 */ 445, 446, 207, 356, 35, 358, 37, 106, 106, 431, - /* 1390 */ 224, 225, 364, 227, 228, 229, 230, 231, 232, 233, + /* 1380 */ 445, 446, 417, 356, 35, 358, 37, 106, 106, 51, + /* 1390 */ 224, 225, 433, 227, 228, 229, 230, 231, 232, 233, /* 1400 */ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - /* 1410 */ 244, 384, 106, 64, 33, 33, 426, 33, 33, 343, - /* 1420 */ 33, 364, 33, 396, 106, 398, 77, 33, 33, 33, - /* 1430 */ 33, 190, 356, 419, 358, 20, 45, 356, 106, 343, - /* 1440 */ 403, 20, 406, 356, 403, 170, 401, 355, 20, 356, - /* 1450 */ 355, 102, 356, 401, 403, 103, 101, 401, 368, 432, - /* 1460 */ 384, 434, 20, 355, 437, 438, 439, 440, 441, 442, - /* 1470 */ 100, 444, 396, 367, 398, 355, 449, 366, 451, 355, - /* 1480 */ 384, 355, 455, 456, 50, 348, 352, 106, 106, 348, - /* 1490 */ 106, 106, 396, 106, 398, 106, 426, 352, 20, 364, - /* 1500 */ 106, 106, 106, 106, 364, 20, 20, 357, 432, 357, - /* 1510 */ 434, 398, 418, 437, 438, 439, 440, 441, 442, 364, - /* 1520 */ 444, 364, 364, 364, 355, 449, 364, 451, 432, 348, - /* 1530 */ 434, 455, 456, 437, 438, 439, 440, 441, 442, 355, - /* 1540 */ 444, 192, 346, 194, 384, 449, 346, 451, 211, 348, - /* 1550 */ 396, 455, 456, 430, 384, 384, 105, 384, 384, 396, - /* 1560 */ 384, 384, 384, 343, 384, 426, 384, 384, 362, 198, - /* 1570 */ 428, 425, 197, 224, 225, 396, 356, 424, 362, 196, - /* 1580 */ 271, 355, 396, 398, 423, 417, 237, 238, 239, 240, - /* 1590 */ 241, 242, 243, 406, 406, 343, 474, 270, 396, 474, - /* 1600 */ 279, 411, 411, 396, 384, 477, 396, 183, 356, 476, - /* 1610 */ 281, 280, 474, 265, 471, 343, 396, 487, 398, 285, - /* 1620 */ 473, 288, 417, 472, 493, 283, 260, 356, 356, 20, - /* 1630 */ 436, 115, 362, 357, 486, 262, 384, 20, 409, 362, - /* 1640 */ 396, 411, 343, 396, 411, 396, 396, 396, 396, 175, - /* 1650 */ 398, 396, 432, 408, 434, 356, 384, 437, 438, 439, - /* 1660 */ 440, 441, 442, 362, 444, 467, 469, 380, 396, 449, - /* 1670 */ 398, 451, 362, 356, 105, 455, 456, 105, 454, 388, - /* 1680 */ 355, 396, 374, 384, 432, 362, 434, 22, 345, 437, - /* 1690 */ 438, 439, 440, 441, 442, 396, 444, 398, 38, 349, - /* 1700 */ 420, 348, 412, 451, 432, 343, 434, 455, 456, 437, - /* 1710 */ 438, 439, 440, 441, 442, 427, 444, 412, 356, 378, - /* 1720 */ 363, 343, 378, 451, 0, 378, 0, 455, 456, 341, - /* 1730 */ 0, 432, 45, 434, 356, 0, 437, 438, 439, 440, - /* 1740 */ 441, 442, 37, 444, 217, 37, 384, 37, 37, 217, - /* 1750 */ 451, 0, 343, 37, 37, 456, 217, 0, 396, 217, - /* 1760 */ 398, 0, 384, 0, 37, 356, 22, 389, 0, 37, - /* 1770 */ 343, 212, 0, 200, 396, 0, 398, 200, 194, 201, - /* 1780 */ 192, 0, 0, 356, 0, 188, 187, 0, 0, 0, - /* 1790 */ 49, 37, 0, 384, 432, 0, 434, 51, 389, 437, - /* 1800 */ 438, 439, 440, 441, 442, 396, 444, 398, 49, 45, - /* 1810 */ 432, 384, 434, 0, 0, 437, 438, 439, 440, 441, - /* 1820 */ 442, 0, 444, 396, 0, 398, 49, 0, 0, 0, - /* 1830 */ 0, 0, 160, 37, 0, 160, 0, 0, 0, 0, + /* 1410 */ 244, 384, 33, 64, 106, 33, 20, 33, 33, 343, + /* 1420 */ 33, 426, 207, 396, 106, 398, 77, 106, 431, 194, + /* 1430 */ 364, 426, 356, 364, 358, 190, 419, 286, 106, 343, + /* 1440 */ 20, 403, 356, 45, 20, 406, 356, 403, 170, 401, + /* 1450 */ 20, 102, 356, 356, 355, 355, 103, 403, 401, 432, + /* 1460 */ 384, 434, 401, 368, 437, 438, 439, 440, 441, 442, + /* 1470 */ 101, 444, 396, 367, 398, 355, 449, 100, 451, 355, + /* 1480 */ 384, 355, 455, 456, 355, 106, 20, 366, 106, 50, + /* 1490 */ 106, 106, 396, 106, 398, 352, 348, 348, 426, 364, + /* 1500 */ 20, 398, 352, 364, 20, 20, 418, 20, 432, 357, + /* 1510 */ 434, 357, 348, 437, 438, 439, 440, 441, 442, 364, + /* 1520 */ 444, 364, 364, 409, 364, 449, 355, 451, 432, 364, + /* 1530 */ 434, 455, 456, 437, 438, 439, 440, 441, 442, 346, + /* 1540 */ 444, 192, 355, 194, 348, 449, 384, 451, 346, 396, + /* 1550 */ 211, 455, 456, 430, 384, 396, 384, 384, 384, 384, + /* 1560 */ 384, 105, 384, 343, 384, 384, 428, 362, 384, 198, + /* 1570 */ 426, 197, 196, 224, 225, 396, 356, 355, 362, 474, + /* 1580 */ 417, 425, 271, 398, 270, 424, 237, 238, 239, 240, + /* 1590 */ 241, 242, 243, 396, 406, 343, 406, 396, 279, 474, + /* 1600 */ 411, 183, 411, 396, 384, 396, 474, 477, 356, 423, + /* 1610 */ 476, 281, 265, 473, 280, 343, 396, 472, 398, 288, + /* 1620 */ 493, 417, 285, 487, 283, 260, 356, 20, 356, 262, + /* 1630 */ 436, 115, 357, 362, 396, 362, 384, 469, 471, 411, + /* 1640 */ 396, 362, 343, 396, 396, 411, 396, 396, 396, 175, + /* 1650 */ 398, 362, 432, 407, 434, 356, 384, 437, 438, 439, + /* 1660 */ 440, 441, 442, 356, 444, 380, 467, 105, 396, 449, + /* 1670 */ 398, 451, 454, 105, 388, 455, 456, 374, 486, 355, + /* 1680 */ 396, 22, 362, 384, 432, 345, 434, 38, 420, 437, + /* 1690 */ 438, 439, 440, 441, 442, 396, 444, 398, 363, 349, + /* 1700 */ 348, 427, 412, 451, 432, 343, 434, 455, 456, 437, + /* 1710 */ 438, 439, 440, 441, 442, 0, 444, 412, 356, 45, + /* 1720 */ 378, 343, 378, 451, 378, 0, 0, 455, 456, 341, + /* 1730 */ 0, 432, 37, 434, 356, 217, 437, 438, 439, 440, + /* 1740 */ 441, 442, 37, 444, 37, 37, 384, 217, 0, 37, + /* 1750 */ 451, 37, 343, 217, 0, 456, 217, 0, 396, 37, + /* 1760 */ 398, 0, 384, 22, 0, 356, 37, 389, 212, 0, + /* 1770 */ 343, 200, 0, 200, 396, 201, 398, 194, 192, 0, + /* 1780 */ 0, 0, 188, 356, 187, 0, 0, 49, 0, 37, + /* 1790 */ 51, 0, 49, 384, 432, 0, 434, 0, 389, 437, + /* 1800 */ 438, 439, 440, 441, 442, 396, 444, 398, 45, 0, + /* 1810 */ 432, 384, 434, 0, 49, 437, 438, 439, 440, 441, + /* 1820 */ 442, 0, 444, 396, 0, 398, 0, 0, 0, 0, + /* 1830 */ 160, 37, 0, 160, 0, 0, 0, 0, 0, 0, /* 1840 */ 0, 432, 480, 434, 0, 0, 437, 438, 439, 440, - /* 1850 */ 441, 442, 0, 444, 0, 0, 0, 343, 49, 432, + /* 1850 */ 441, 442, 0, 444, 0, 0, 0, 343, 50, 432, /* 1860 */ 0, 434, 0, 0, 437, 438, 439, 440, 441, 442, - /* 1870 */ 356, 444, 343, 0, 0, 0, 0, 45, 0, 0, - /* 1880 */ 0, 0, 0, 22, 0, 356, 0, 343, 0, 144, - /* 1890 */ 0, 0, 22, 50, 22, 0, 50, 64, 384, 0, - /* 1900 */ 356, 37, 0, 0, 0, 64, 37, 42, 51, 482, - /* 1910 */ 396, 64, 398, 384, 0, 0, 0, 51, 389, 42, - /* 1920 */ 37, 0, 37, 14, 0, 396, 0, 398, 384, 37, - /* 1930 */ 33, 42, 0, 0, 343, 42, 183, 0, 51, 45, - /* 1940 */ 396, 43, 398, 0, 0, 49, 432, 356, 434, 49, - /* 1950 */ 49, 437, 438, 439, 440, 441, 442, 0, 444, 343, - /* 1960 */ 42, 432, 42, 434, 0, 37, 437, 438, 439, 440, - /* 1970 */ 441, 442, 356, 444, 51, 384, 432, 71, 434, 0, + /* 1870 */ 356, 444, 343, 0, 49, 45, 0, 0, 0, 0, + /* 1880 */ 0, 0, 0, 22, 0, 356, 0, 343, 144, 0, + /* 1890 */ 0, 22, 22, 50, 0, 64, 37, 0, 384, 0, + /* 1900 */ 356, 0, 0, 37, 51, 64, 42, 0, 37, 482, + /* 1910 */ 396, 64, 398, 384, 42, 0, 51, 42, 389, 51, + /* 1920 */ 37, 0, 37, 0, 33, 396, 14, 398, 384, 183, + /* 1930 */ 42, 0, 45, 0, 343, 0, 43, 0, 0, 0, + /* 1940 */ 396, 49, 398, 0, 49, 49, 432, 356, 434, 49, + /* 1950 */ 42, 437, 438, 439, 440, 441, 442, 0, 444, 343, + /* 1960 */ 42, 432, 37, 434, 0, 51, 437, 438, 439, 440, + /* 1970 */ 441, 442, 356, 444, 71, 384, 432, 0, 434, 37, /* 1980 */ 389, 437, 438, 439, 440, 441, 442, 396, 444, 398, - /* 1990 */ 446, 42, 37, 51, 42, 0, 343, 37, 51, 0, - /* 2000 */ 384, 42, 37, 42, 51, 491, 0, 0, 0, 356, - /* 2010 */ 0, 0, 396, 0, 398, 37, 22, 0, 113, 111, + /* 1990 */ 446, 42, 51, 42, 0, 37, 343, 51, 42, 0, + /* 2000 */ 384, 51, 37, 42, 0, 491, 0, 0, 0, 356, + /* 2010 */ 0, 0, 396, 37, 398, 22, 111, 113, 0, 37, /* 2020 */ 37, 37, 37, 432, 37, 434, 37, 37, 437, 438, - /* 2030 */ 439, 440, 441, 442, 0, 444, 33, 384, 37, 37, - /* 2040 */ 22, 37, 389, 22, 0, 33, 37, 22, 432, 396, - /* 2050 */ 434, 398, 0, 437, 438, 439, 440, 441, 442, 22, - /* 2060 */ 444, 37, 343, 0, 0, 0, 37, 53, 0, 0, - /* 2070 */ 37, 20, 22, 37, 106, 356, 37, 37, 105, 0, - /* 2080 */ 173, 105, 37, 343, 22, 432, 0, 434, 22, 1, - /* 2090 */ 437, 438, 439, 440, 441, 442, 356, 444, 173, 0, - /* 2100 */ 0, 179, 175, 384, 173, 3, 33, 19, 195, 173, - /* 2110 */ 199, 106, 3, 179, 343, 396, 266, 398, 33, 49, - /* 2120 */ 105, 105, 50, 35, 384, 103, 50, 356, 101, 106, - /* 2130 */ 33, 33, 106, 105, 33, 105, 396, 106, 398, 51, - /* 2140 */ 105, 49, 37, 105, 33, 37, 33, 59, 60, 61, - /* 2150 */ 62, 432, 64, 434, 106, 384, 437, 438, 439, 440, - /* 2160 */ 441, 442, 106, 444, 37, 37, 37, 396, 37, 398, - /* 2170 */ 49, 259, 432, 106, 434, 49, 0, 437, 438, 439, - /* 2180 */ 440, 441, 442, 266, 444, 343, 106, 0, 105, 42, - /* 2190 */ 49, 0, 104, 106, 105, 107, 266, 106, 356, 105, - /* 2200 */ 105, 343, 42, 432, 114, 434, 49, 33, 437, 438, - /* 2210 */ 439, 440, 441, 442, 356, 444, 174, 176, 246, 105, - /* 2220 */ 105, 103, 103, 2, 22, 105, 384, 139, 106, 105, - /* 2230 */ 49, 106, 49, 37, 22, 105, 37, 105, 396, 106, - /* 2240 */ 398, 105, 384, 224, 106, 105, 226, 37, 106, 115, - /* 2250 */ 105, 37, 106, 343, 396, 105, 398, 106, 105, 37, - /* 2260 */ 106, 105, 174, 37, 106, 106, 356, 105, 37, 181, - /* 2270 */ 105, 105, 343, 33, 432, 105, 434, 105, 126, 437, - /* 2280 */ 438, 439, 440, 441, 442, 356, 444, 126, 200, 126, - /* 2290 */ 432, 37, 434, 126, 384, 437, 438, 439, 440, 441, - /* 2300 */ 442, 22, 444, 71, 70, 343, 396, 37, 398, 37, - /* 2310 */ 77, 37, 37, 384, 37, 37, 99, 37, 356, 37, - /* 2320 */ 33, 37, 37, 37, 343, 396, 22, 398, 77, 37, - /* 2330 */ 37, 37, 37, 37, 37, 37, 37, 356, 22, 37, - /* 2340 */ 343, 0, 432, 37, 434, 42, 384, 437, 438, 439, - /* 2350 */ 440, 441, 442, 356, 444, 0, 51, 37, 396, 51, - /* 2360 */ 398, 432, 0, 434, 42, 384, 437, 438, 439, 440, - /* 2370 */ 441, 442, 37, 444, 51, 343, 42, 396, 0, 398, - /* 2380 */ 37, 384, 51, 0, 42, 37, 37, 0, 356, 22, - /* 2390 */ 33, 22, 343, 396, 432, 398, 434, 21, 21, 437, - /* 2400 */ 438, 439, 440, 441, 442, 356, 444, 22, 22, 20, + /* 2030 */ 439, 440, 441, 442, 33, 444, 33, 384, 22, 37, + /* 2040 */ 0, 22, 389, 0, 22, 53, 37, 0, 432, 396, + /* 2050 */ 434, 398, 37, 437, 438, 439, 440, 441, 442, 22, + /* 2060 */ 444, 37, 343, 0, 0, 0, 37, 0, 37, 0, + /* 2070 */ 22, 20, 37, 37, 106, 356, 37, 105, 0, 173, + /* 2080 */ 105, 37, 22, 343, 22, 432, 0, 434, 175, 1, + /* 2090 */ 437, 438, 439, 440, 441, 442, 356, 444, 0, 173, + /* 2100 */ 0, 173, 3, 384, 33, 173, 195, 19, 199, 179, + /* 2110 */ 105, 50, 266, 179, 343, 396, 103, 398, 106, 105, + /* 2120 */ 50, 101, 33, 35, 384, 33, 105, 356, 33, 106, + /* 2130 */ 49, 106, 105, 105, 49, 105, 396, 33, 398, 51, + /* 2140 */ 106, 3, 33, 37, 106, 37, 49, 59, 60, 61, + /* 2150 */ 62, 432, 64, 434, 37, 384, 437, 438, 439, 440, + /* 2160 */ 441, 442, 106, 444, 266, 37, 37, 396, 37, 398, + /* 2170 */ 33, 49, 432, 0, 434, 259, 0, 437, 438, 439, + /* 2180 */ 440, 441, 442, 266, 444, 343, 106, 42, 106, 106, + /* 2190 */ 0, 174, 104, 106, 42, 107, 105, 49, 356, 105, + /* 2200 */ 33, 343, 176, 432, 114, 434, 105, 105, 437, 438, + /* 2210 */ 439, 440, 441, 442, 356, 444, 105, 105, 103, 246, + /* 2220 */ 2, 103, 22, 49, 224, 105, 384, 139, 49, 106, + /* 2230 */ 105, 22, 106, 106, 115, 105, 37, 105, 396, 105, + /* 2240 */ 398, 106, 384, 37, 105, 37, 106, 105, 22, 106, + /* 2250 */ 106, 105, 37, 343, 396, 105, 398, 106, 37, 226, + /* 2260 */ 105, 37, 174, 106, 105, 37, 356, 106, 105, 181, + /* 2270 */ 33, 105, 343, 126, 432, 105, 434, 37, 71, 437, + /* 2280 */ 438, 439, 440, 441, 442, 356, 444, 105, 200, 70, + /* 2290 */ 432, 126, 434, 37, 384, 437, 438, 439, 440, 441, + /* 2300 */ 442, 126, 444, 126, 37, 343, 396, 37, 398, 37, + /* 2310 */ 77, 37, 37, 384, 37, 37, 99, 33, 356, 37, + /* 2320 */ 37, 22, 37, 37, 343, 396, 37, 398, 77, 37, + /* 2330 */ 37, 37, 37, 37, 37, 22, 0, 356, 37, 37, + /* 2340 */ 343, 51, 432, 0, 434, 42, 384, 437, 438, 439, + /* 2350 */ 440, 441, 442, 356, 444, 37, 51, 42, 396, 0, + /* 2360 */ 398, 432, 37, 434, 42, 384, 437, 438, 439, 440, + /* 2370 */ 441, 442, 51, 444, 0, 343, 37, 396, 51, 398, + /* 2380 */ 0, 384, 42, 37, 37, 0, 22, 33, 356, 22, + /* 2390 */ 21, 21, 343, 396, 432, 398, 434, 22, 22, 437, + /* 2400 */ 438, 439, 440, 441, 442, 356, 444, 20, 494, 494, /* 2410 */ 494, 494, 494, 432, 494, 434, 384, 494, 437, 438, /* 2420 */ 439, 440, 441, 442, 494, 444, 494, 343, 396, 432, /* 2430 */ 398, 434, 494, 384, 437, 438, 439, 440, 441, 442, @@ -1160,90 +1160,90 @@ static const YYCODETYPE yy_lookahead[] = { }; #define YY_SHIFT_COUNT (810) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2389) +#define YY_SHIFT_MAX (2387) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 842, 0, 233, 0, 467, 467, 467, 467, 467, 467, /* 10 */ 467, 467, 467, 467, 467, 467, 700, 933, 933, 1166, /* 20 */ 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, /* 30 */ 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, /* 40 */ 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, - /* 50 */ 933, 227, 260, 394, 274, 271, 502, 271, 274, 274, - /* 60 */ 271, 1349, 271, 1349, 1349, 409, 271, 18, 115, 143, + /* 50 */ 933, 227, 260, 394, 274, 195, 271, 195, 274, 274, + /* 60 */ 195, 1349, 195, 1349, 1349, 409, 195, 18, 115, 143, /* 70 */ 143, 115, 261, 261, 117, 192, 126, 126, 143, 143, /* 80 */ 143, 143, 143, 143, 143, 143, 143, 143, 249, 143, - /* 90 */ 143, 113, 18, 143, 143, 284, 18, 143, 249, 143, - /* 100 */ 249, 18, 143, 143, 18, 143, 18, 18, 18, 143, - /* 110 */ 268, 232, 193, 193, 443, 298, 642, 642, 642, 642, + /* 90 */ 143, 113, 18, 143, 143, 392, 18, 143, 143, 18, + /* 100 */ 143, 143, 18, 143, 18, 18, 18, 143, 458, 232, + /* 110 */ 193, 193, 443, 298, 642, 642, 642, 642, 642, 642, /* 120 */ 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, - /* 130 */ 642, 642, 642, 642, 642, 1115, 620, 117, 192, 741, - /* 140 */ 741, 538, 945, 945, 945, 185, 764, 764, 538, 113, - /* 150 */ 292, 208, 18, 436, 18, 436, 436, 412, 475, 22, + /* 130 */ 642, 642, 642, 1115, 620, 117, 192, 248, 248, 534, + /* 140 */ 806, 806, 806, 185, 512, 512, 534, 113, 398, 18, + /* 150 */ 18, 330, 18, 544, 18, 544, 544, 528, 710, 788, /* 160 */ 37, 37, 37, 37, 37, 37, 37, 37, 2088, 660, - /* 170 */ 21, 53, 15, 67, 229, 155, 4, 4, 285, 198, - /* 180 */ 850, 464, 1050, 1144, 762, 688, 1088, 934, 616, 981, - /* 190 */ 934, 1164, 1026, 1031, 1089, 1304, 1346, 1175, 113, 1346, - /* 200 */ 113, 1241, 1415, 1391, 1421, 1415, 1391, 1275, 1428, 1415, - /* 210 */ 1428, 1391, 1275, 1275, 1352, 1355, 1428, 1370, 1428, 1428, - /* 220 */ 1428, 1442, 1434, 1442, 1434, 1346, 113, 1478, 113, 1485, - /* 230 */ 1486, 113, 1485, 113, 113, 113, 1428, 113, 1442, 18, + /* 170 */ 21, 53, 15, 67, 229, 155, 4, 4, 611, 198, + /* 180 */ 850, 464, 945, 1146, 1177, 914, 969, 936, 14, 1053, + /* 190 */ 936, 1047, 998, 928, 1104, 1338, 1396, 1215, 113, 1396, + /* 200 */ 113, 1245, 1420, 1398, 1424, 1420, 1398, 1278, 1430, 1420, + /* 210 */ 1430, 1398, 1278, 1278, 1353, 1369, 1430, 1377, 1430, 1430, + /* 220 */ 1430, 1466, 1439, 1466, 1439, 1396, 113, 1480, 113, 1484, + /* 230 */ 1485, 113, 1484, 113, 1487, 113, 113, 1430, 113, 1466, /* 240 */ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - /* 250 */ 1428, 22, 22, 1442, 436, 436, 436, 1337, 1451, 1346, - /* 260 */ 268, 1371, 1375, 1478, 268, 1383, 1089, 1428, 1421, 1421, - /* 270 */ 436, 1309, 1327, 436, 1309, 1327, 436, 436, 18, 1321, - /* 280 */ 1424, 1309, 1329, 1331, 1348, 1089, 1333, 1334, 1342, 1366, - /* 290 */ 1415, 1609, 1516, 1373, 1485, 268, 268, 1617, 1327, 436, - /* 300 */ 436, 436, 436, 436, 1327, 436, 1474, 268, 412, 268, - /* 310 */ 1415, 1569, 1572, 436, 475, 1428, 268, 1665, 1660, 1442, + /* 250 */ 18, 1430, 788, 788, 1466, 544, 544, 544, 1339, 1456, + /* 260 */ 1396, 458, 1371, 1374, 1480, 458, 1376, 1104, 1430, 1424, + /* 270 */ 1424, 544, 1311, 1314, 544, 1311, 1314, 544, 544, 18, + /* 280 */ 1319, 1418, 1311, 1330, 1334, 1347, 1104, 1331, 1337, 1341, + /* 290 */ 1365, 1420, 1607, 1516, 1367, 1484, 458, 458, 1314, 544, + /* 300 */ 544, 544, 544, 544, 1314, 544, 1474, 458, 528, 458, + /* 310 */ 1420, 1562, 1568, 544, 710, 1430, 458, 1659, 1649, 1466, /* 320 */ 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 36, /* 330 */ 932, 406, 263, 506, 906, 948, 837, 1107, 1267, 835, /* 340 */ 879, 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1225, - /* 350 */ 356, 415, 527, 621, 621, 27, 449, 534, 44, 348, - /* 360 */ 824, 1000, 657, 589, 589, 672, 889, 104, 672, 672, - /* 370 */ 672, 152, 1002, 1109, 1189, 1165, 456, 1149, 1103, 1110, - /* 380 */ 1121, 1136, 1209, 1213, 1248, 1262, 1265, 1044, 1167, 1203, - /* 390 */ 652, 1222, 1223, 1281, 1054, 915, 1055, 1282, 1306, 1318, - /* 400 */ 1332, 1381, 1382, 1204, 1384, 34, 1385, 1218, 1387, 1389, - /* 410 */ 1394, 1395, 1396, 1397, 1172, 1080, 1091, 1283, 1284, 1253, - /* 420 */ 1242, 1724, 1726, 1730, 1687, 1735, 1705, 1527, 1708, 1710, - /* 430 */ 1711, 1532, 1751, 1716, 1717, 1539, 1757, 1542, 1761, 1727, - /* 440 */ 1763, 1744, 1768, 1732, 1559, 1772, 1573, 1775, 1577, 1578, - /* 450 */ 1584, 1588, 1781, 1782, 1784, 1597, 1599, 1787, 1788, 1741, - /* 460 */ 1789, 1754, 1746, 1792, 1759, 1795, 1764, 1813, 1814, 1821, - /* 470 */ 1777, 1824, 1827, 1828, 1829, 1830, 1831, 1672, 1796, 1834, - /* 480 */ 1675, 1836, 1837, 1838, 1839, 1840, 1844, 1845, 1852, 1854, - /* 490 */ 1855, 1856, 1860, 1862, 1863, 1873, 1874, 1809, 1875, 1832, - /* 500 */ 1876, 1878, 1879, 1880, 1881, 1882, 1861, 1884, 1886, 1888, - /* 510 */ 1745, 1890, 1891, 1870, 1843, 1872, 1846, 1895, 1833, 1864, - /* 520 */ 1899, 1841, 1902, 1847, 1903, 1904, 1869, 1857, 1865, 1914, - /* 530 */ 1883, 1866, 1877, 1915, 1885, 1887, 1889, 1916, 1892, 1921, - /* 540 */ 1894, 1893, 1897, 1896, 1900, 1909, 1901, 1924, 1898, 1918, - /* 550 */ 1926, 1932, 1933, 1920, 1753, 1937, 1943, 1944, 1906, 1957, - /* 560 */ 1964, 1928, 1923, 1949, 1979, 1955, 1942, 1952, 1995, 1960, - /* 570 */ 1947, 1959, 1999, 1965, 1953, 1961, 2006, 2007, 2008, 2010, - /* 580 */ 2011, 2013, 1905, 1908, 1978, 1994, 2017, 1983, 1984, 1985, - /* 590 */ 1987, 1989, 1990, 2001, 2003, 2012, 2002, 2004, 2018, 2009, - /* 600 */ 2034, 2021, 2044, 2025, 2014, 2052, 2037, 2024, 2063, 2064, - /* 610 */ 2065, 2029, 2068, 2033, 2069, 2050, 2051, 2036, 2039, 2040, - /* 620 */ 1968, 1973, 2079, 1907, 1976, 1911, 2045, 2062, 2086, 1913, - /* 630 */ 2066, 1925, 1927, 2099, 2100, 1931, 1922, 1936, 1934, 2102, - /* 640 */ 2073, 1850, 2015, 2005, 2016, 2072, 2022, 2076, 2027, 2023, - /* 650 */ 2085, 2097, 2026, 2028, 2030, 2035, 2031, 2098, 2070, 2092, - /* 660 */ 2038, 2101, 1917, 2048, 2056, 2109, 2111, 1930, 2105, 2108, - /* 670 */ 2127, 2128, 2129, 2131, 2067, 2080, 2121, 1912, 2113, 2126, - /* 680 */ 2176, 2187, 2083, 2147, 1896, 2141, 2089, 2087, 2091, 2094, - /* 690 */ 2095, 2041, 2114, 2191, 2160, 2042, 2115, 2090, 1896, 2157, - /* 700 */ 2174, 2118, 1972, 2119, 2221, 2202, 2019, 2120, 2122, 2124, - /* 710 */ 2125, 2130, 2133, 2181, 2132, 2136, 2183, 2138, 2212, 2020, - /* 720 */ 2140, 2134, 2142, 2196, 2199, 2145, 2146, 2210, 2150, 2151, - /* 730 */ 2214, 2153, 2154, 2222, 2156, 2158, 2226, 2162, 2159, 2231, - /* 740 */ 2165, 2152, 2161, 2163, 2167, 2166, 2240, 2170, 2254, 2172, - /* 750 */ 2240, 2240, 2279, 2232, 2234, 2270, 2272, 2274, 2275, 2277, - /* 760 */ 2278, 2280, 2282, 2233, 2217, 2287, 2284, 2285, 2286, 2304, - /* 770 */ 2292, 2293, 2294, 2251, 2003, 2295, 2012, 2296, 2297, 2298, - /* 780 */ 2299, 2316, 2302, 2341, 2306, 2305, 2303, 2355, 2320, 2308, - /* 790 */ 2322, 2362, 2335, 2323, 2334, 2378, 2343, 2331, 2342, 2383, - /* 800 */ 2348, 2349, 2387, 2367, 2357, 2369, 2376, 2385, 2386, 2377, - /* 810 */ 2389, + /* 350 */ 356, 415, 527, 621, 621, 27, 449, 268, 44, 943, + /* 360 */ 647, 824, 657, 589, 589, 672, 889, 784, 672, 672, + /* 370 */ 672, 152, 658, 1093, 1070, 1169, 1085, 1147, 1098, 1110, + /* 380 */ 1112, 1118, 640, 1198, 407, 776, 1210, 1034, 1116, 1182, + /* 390 */ 1141, 1183, 1203, 1214, 1113, 1055, 1151, 1219, 1223, 1230, + /* 400 */ 1281, 1282, 1308, 1283, 1318, 34, 1321, 1213, 1332, 1379, + /* 410 */ 1382, 1384, 1385, 1387, 1019, 1071, 1235, 1233, 1260, 1249, + /* 420 */ 715, 1715, 1725, 1726, 1674, 1730, 1695, 1518, 1705, 1707, + /* 430 */ 1708, 1530, 1748, 1712, 1714, 1536, 1754, 1539, 1757, 1722, + /* 440 */ 1761, 1741, 1764, 1729, 1556, 1769, 1571, 1772, 1573, 1574, + /* 450 */ 1583, 1586, 1779, 1780, 1781, 1594, 1597, 1785, 1786, 1738, + /* 460 */ 1788, 1752, 1739, 1791, 1743, 1795, 1763, 1797, 1809, 1813, + /* 470 */ 1765, 1821, 1824, 1826, 1827, 1828, 1829, 1670, 1794, 1832, + /* 480 */ 1673, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1844, 1845, + /* 490 */ 1852, 1854, 1855, 1856, 1860, 1862, 1863, 1825, 1873, 1830, + /* 500 */ 1876, 1877, 1878, 1879, 1880, 1881, 1861, 1882, 1884, 1886, + /* 510 */ 1744, 1889, 1890, 1869, 1808, 1870, 1843, 1894, 1831, 1859, + /* 520 */ 1897, 1841, 1899, 1847, 1901, 1902, 1866, 1853, 1864, 1907, + /* 530 */ 1871, 1865, 1872, 1915, 1883, 1868, 1875, 1921, 1885, 1923, + /* 540 */ 1887, 1888, 1891, 1892, 1895, 1912, 1896, 1931, 1893, 1908, + /* 550 */ 1933, 1935, 1937, 1918, 1746, 1938, 1892, 1900, 1939, 1943, + /* 560 */ 1903, 1957, 1964, 1925, 1914, 1949, 1977, 1942, 1941, 1951, + /* 570 */ 1994, 1958, 1946, 1956, 1999, 1965, 1950, 1961, 2004, 2006, + /* 580 */ 2007, 2008, 2010, 2011, 1904, 1905, 1976, 1993, 2018, 1982, + /* 590 */ 1983, 1984, 1985, 1987, 1989, 1990, 2001, 2003, 2002, 2009, + /* 600 */ 2016, 2015, 2040, 2019, 2043, 2022, 1992, 2047, 2037, 2024, + /* 610 */ 2063, 2064, 2065, 2029, 2067, 2031, 2069, 2048, 2051, 2035, + /* 620 */ 2036, 2039, 1968, 1972, 2078, 1906, 1975, 1909, 2044, 2060, + /* 630 */ 2086, 1911, 2062, 1926, 1913, 2098, 2100, 1928, 1930, 1932, + /* 640 */ 1934, 2099, 2071, 1846, 2005, 2012, 2014, 2061, 2013, 2070, + /* 650 */ 2020, 2023, 2089, 2092, 2025, 2021, 2027, 2028, 2034, 2095, + /* 660 */ 2081, 2085, 2030, 2104, 1898, 2038, 2056, 2138, 2109, 1917, + /* 670 */ 2106, 2108, 2117, 2128, 2129, 2131, 2080, 2082, 2097, 1916, + /* 680 */ 2137, 2122, 2173, 2176, 2091, 2145, 2094, 2083, 2087, 2101, + /* 690 */ 2102, 2026, 2111, 2190, 2152, 2017, 2112, 2090, 1892, 2148, + /* 700 */ 2167, 2115, 1973, 2118, 2218, 2200, 2000, 2120, 2123, 2125, + /* 710 */ 2126, 2130, 2127, 2174, 2132, 2134, 2179, 2135, 2209, 2033, + /* 720 */ 2139, 2119, 2140, 2199, 2206, 2142, 2143, 2208, 2146, 2144, + /* 730 */ 2215, 2150, 2151, 2221, 2155, 2157, 2224, 2159, 2161, 2228, + /* 740 */ 2163, 2147, 2165, 2175, 2177, 2166, 2237, 2170, 2240, 2182, + /* 750 */ 2237, 2237, 2226, 2207, 2219, 2256, 2267, 2270, 2272, 2274, + /* 760 */ 2275, 2277, 2278, 2233, 2217, 2284, 2282, 2283, 2285, 2299, + /* 770 */ 2286, 2289, 2292, 2251, 2001, 2293, 2003, 2294, 2295, 2296, + /* 780 */ 2297, 2313, 2301, 2336, 2302, 2290, 2303, 2343, 2318, 2305, + /* 790 */ 2315, 2359, 2325, 2321, 2322, 2374, 2339, 2327, 2340, 2380, + /* 800 */ 2346, 2347, 2385, 2364, 2354, 2367, 2369, 2375, 2376, 2370, + /* 810 */ 2387, }; #define YY_REDUCE_COUNT (328) #define YY_REDUCE_MIN (-452) @@ -1257,31 +1257,31 @@ static const short yy_reduce_ofst[] = { /* 50 */ 2353, -273, 163, 302, -44, 312, 344, 583, -316, -280, /* 60 */ 724, -26, -403, 134, 375, -266, -168, -373, -326, -350, /* 70 */ 46, -324, -346, -133, 145, -80, 146, 299, -297, -180, - /* 80 */ 84, 307, 187, 325, 387, 399, 424, 433, 74, 428, - /* 90 */ 465, 224, 347, 498, 500, 70, 382, 513, 218, 529, - /* 100 */ 360, 169, 594, 603, 440, 625, 273, 490, 606, 631, - /* 110 */ -308, -249, -452, -452, 304, -250, -207, -43, 7, 252, - /* 120 */ 288, 515, 570, 608, 609, 611, 636, 646, 677, 680, - /* 130 */ 682, 716, 747, 748, 749, -288, 231, 352, -388, -327, - /* 140 */ 673, 678, 231, 444, 588, 120, 649, 676, 687, 533, - /* 150 */ -32, 109, 668, 737, 244, 754, 763, 803, 810, 722, - /* 160 */ 226, 402, 453, 695, 713, 766, 800, 713, 372, 280, - /* 170 */ 543, 822, 743, 735, 899, 785, 900, 916, 927, 898, - /* 180 */ 927, 959, 918, 968, 969, 931, 921, 867, 867, 849, - /* 190 */ 867, 878, 868, 927, 937, 923, 942, 958, 1028, 990, - /* 200 */ 1057, 1014, 1081, 1037, 1036, 1087, 1041, 1045, 1092, 1093, - /* 210 */ 1095, 1051, 1052, 1056, 1090, 1106, 1108, 1111, 1120, 1124, - /* 220 */ 1126, 1137, 1134, 1141, 1145, 1070, 1135, 1113, 1140, 1150, - /* 230 */ 1094, 1155, 1152, 1157, 1158, 1159, 1169, 1162, 1181, 1160, - /* 240 */ 1170, 1171, 1173, 1174, 1176, 1177, 1178, 1180, 1182, 1183, - /* 250 */ 1184, 1196, 1200, 1201, 1154, 1163, 1179, 1123, 1142, 1139, - /* 260 */ 1206, 1146, 1153, 1185, 1216, 1161, 1168, 1226, 1187, 1188, - /* 270 */ 1186, 1122, 1190, 1202, 1125, 1191, 1207, 1210, 927, 1128, - /* 280 */ 1133, 1138, 1147, 1151, 1143, 1205, 1131, 1130, 1148, 867, - /* 290 */ 1271, 1194, 1197, 1198, 1276, 1270, 1277, 1229, 1230, 1244, - /* 300 */ 1247, 1249, 1250, 1251, 1233, 1255, 1245, 1301, 1287, 1310, - /* 310 */ 1317, 1224, 1291, 1285, 1308, 1325, 1323, 1343, 1350, 1353, - /* 320 */ 1280, 1288, 1290, 1305, 1341, 1344, 1347, 1357, 1388, + /* 80 */ 84, 307, 187, 325, 387, 399, 424, 433, -56, 428, + /* 90 */ 465, 224, 347, 498, 500, 70, 382, 513, 529, 169, + /* 100 */ 594, 603, 440, 625, 273, 490, 606, 631, -308, -249, + /* 110 */ -452, -452, 242, -250, -207, 7, 252, 373, 515, 570, + /* 120 */ 608, 609, 641, 677, 680, 682, 747, 748, 754, 755, + /* 130 */ 785, 787, 802, -288, 45, 168, -388, -327, 92, 258, + /* 140 */ 45, 231, 444, -25, 561, 574, 664, 533, -32, 337, + /* 150 */ 364, 109, 667, 401, 718, 763, 789, 812, 686, 722, + /* 160 */ 453, 502, 843, 846, 873, 875, 882, 873, 852, 904, + /* 170 */ 946, 624, 795, 813, 937, 836, 941, 949, 938, 909, + /* 180 */ 938, 964, 921, 974, 976, 939, 924, 888, 888, 870, + /* 190 */ 888, 899, 898, 938, 965, 959, 995, 997, 1066, 1005, + /* 200 */ 1069, 1017, 1086, 1038, 1039, 1090, 1044, 1048, 1099, 1097, + /* 210 */ 1100, 1054, 1057, 1061, 1095, 1106, 1120, 1121, 1124, 1126, + /* 220 */ 1129, 1148, 1143, 1149, 1150, 1072, 1135, 1103, 1139, 1152, + /* 230 */ 1088, 1155, 1154, 1157, 1114, 1158, 1160, 1171, 1165, 1164, + /* 240 */ 1162, 1170, 1172, 1173, 1174, 1175, 1176, 1178, 1180, 1181, + /* 250 */ 1184, 1187, 1193, 1202, 1196, 1153, 1159, 1179, 1123, 1138, + /* 260 */ 1144, 1205, 1156, 1161, 1185, 1216, 1186, 1163, 1222, 1188, + /* 270 */ 1190, 1197, 1105, 1189, 1201, 1125, 1191, 1207, 1209, 938, + /* 280 */ 1130, 1134, 1132, 1140, 1145, 1167, 1204, 1127, 1136, 1192, + /* 290 */ 888, 1270, 1194, 1168, 1199, 1275, 1271, 1273, 1228, 1238, + /* 300 */ 1244, 1247, 1248, 1250, 1234, 1251, 1246, 1279, 1285, 1289, + /* 310 */ 1307, 1218, 1286, 1284, 1303, 1324, 1320, 1340, 1350, 1352, + /* 320 */ 1268, 1274, 1290, 1305, 1342, 1344, 1346, 1335, 1388, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, @@ -1294,12 +1294,12 @@ static const YYACTIONTYPE yy_default[] = { /* 70 */ 1807, 1807, 1807, 1807, 2098, 1807, 1807, 1807, 1807, 1807, /* 80 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 90 */ 1807, 1903, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 100 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 110 */ 1901, 2091, 2317, 1807, 1807, 1807, 1807, 1807, 1807, 1807, + /* 100 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1901, 2091, + /* 110 */ 2317, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 120 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 130 */ 1807, 1807, 1807, 1807, 1807, 1807, 2329, 1807, 1807, 1877, - /* 140 */ 1877, 1807, 2329, 2329, 2329, 1901, 2289, 2289, 1807, 1903, - /* 150 */ 2159, 1807, 1807, 1807, 1807, 1807, 1807, 2023, 1807, 1837, + /* 130 */ 1807, 1807, 1807, 1807, 2329, 1807, 1807, 1877, 1877, 1807, + /* 140 */ 2329, 2329, 2329, 1901, 2289, 2289, 1807, 1903, 2159, 1807, + /* 150 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2023, 1807, 1837, /* 160 */ 1807, 1807, 1807, 1807, 2047, 1807, 1807, 1807, 2151, 1807, /* 170 */ 1807, 2358, 2415, 1807, 1807, 2361, 1807, 1807, 1807, 1807, /* 180 */ 1807, 1807, 2103, 1807, 1807, 1976, 2348, 2321, 2335, 2399, @@ -1307,13 +1307,13 @@ static const YYACTIONTYPE yy_default[] = { /* 200 */ 1903, 2138, 1807, 2096, 1807, 1807, 2096, 2093, 1807, 1807, /* 210 */ 1807, 2096, 2093, 2093, 1965, 1961, 1807, 1959, 1807, 1807, /* 220 */ 1807, 1807, 1861, 1807, 1861, 1807, 1903, 1807, 1903, 1807, - /* 230 */ 1807, 1903, 1807, 1903, 1903, 1903, 1807, 1903, 1807, 1807, + /* 230 */ 1807, 1903, 1807, 1903, 1807, 1903, 1903, 1807, 1903, 1807, /* 240 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 250 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2171, 2157, 1807, - /* 260 */ 1901, 2149, 2147, 1807, 1901, 2145, 2352, 1807, 1807, 1807, - /* 270 */ 1807, 2369, 2367, 1807, 2369, 2367, 1807, 1807, 1807, 2383, - /* 280 */ 2379, 2369, 2388, 2385, 2354, 2352, 2418, 2405, 2401, 2335, - /* 290 */ 1807, 1807, 2340, 2338, 1807, 1901, 1901, 1807, 2367, 1807, + /* 250 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2171, 2157, + /* 260 */ 1807, 1901, 2149, 2147, 1807, 1901, 2145, 2352, 1807, 1807, + /* 270 */ 1807, 1807, 2369, 2367, 1807, 2369, 2367, 1807, 1807, 1807, + /* 280 */ 2383, 2379, 2369, 2388, 2385, 2354, 2352, 2418, 2405, 2401, + /* 290 */ 2335, 1807, 1807, 2340, 2338, 1807, 1901, 1901, 2367, 1807, /* 300 */ 1807, 1807, 1807, 1807, 2367, 1807, 1807, 1901, 1807, 1901, /* 310 */ 1807, 1807, 1992, 1807, 1807, 1807, 1901, 1807, 1846, 1807, /* 320 */ 2140, 2162, 2121, 2121, 2026, 2026, 2026, 1904, 1812, 1807, @@ -1339,20 +1339,20 @@ static const YYACTIONTYPE yy_default[] = { /* 520 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 530 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 540 */ 1807, 1807, 1851, 2222, 1807, 1807, 1807, 1807, 1807, 1807, - /* 550 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, + /* 550 */ 1807, 1807, 1807, 1807, 1807, 1807, 2225, 1807, 1807, 1807, /* 560 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 570 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 580 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 590 */ 1807, 1807, 1807, 1807, 1942, 1941, 1807, 1807, 1807, 1807, + /* 590 */ 1807, 1807, 1807, 1807, 1807, 1807, 1942, 1941, 1807, 1807, /* 600 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 610 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 620 */ 2226, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 630 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2398, - /* 640 */ 2355, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, - /* 650 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2217, - /* 660 */ 1807, 2380, 1807, 1807, 2396, 1807, 2400, 1807, 1807, 1807, - /* 670 */ 1807, 1807, 1807, 1807, 2328, 2324, 1807, 1807, 2320, 1807, - /* 680 */ 1807, 1807, 1807, 1807, 2225, 1807, 1807, 1807, 1807, 1807, + /* 620 */ 1807, 1807, 2226, 1807, 1807, 1807, 1807, 1807, 1807, 1807, + /* 630 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, + /* 640 */ 1807, 2398, 2355, 1807, 1807, 1807, 1807, 1807, 1807, 1807, + /* 650 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, + /* 660 */ 1807, 2217, 1807, 2380, 1807, 1807, 2396, 1807, 2400, 1807, + /* 670 */ 1807, 1807, 1807, 1807, 1807, 1807, 2328, 2324, 1807, 1807, + /* 680 */ 2320, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, /* 690 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2216, 1807, /* 700 */ 2279, 1807, 1807, 1807, 2313, 1807, 1807, 2264, 1807, 1807, /* 710 */ 1807, 1807, 1807, 1807, 1807, 1807, 1807, 2226, 1807, 2229, @@ -2220,8 +2220,8 @@ static const char *const yyTokenName[] = { /* 404 */ "tag_list_opt", /* 405 */ "tag_item", /* 406 */ "column_alias", - /* 407 */ "full_index_name", - /* 408 */ "index_options", + /* 407 */ "index_options", + /* 408 */ "full_index_name", /* 409 */ "index_name", /* 410 */ "func_list", /* 411 */ "sliding_opt", @@ -2610,8 +2610,8 @@ static const char *const yyRuleName[] = { /* 293 */ "tag_item ::= column_name", /* 294 */ "tag_item ::= column_name column_alias", /* 295 */ "tag_item ::= column_name AS column_alias", - /* 296 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", - /* 297 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", + /* 296 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 297 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", /* 298 */ "cmd ::= DROP INDEX exists_opt full_index_name", /* 299 */ "full_index_name ::= index_name", /* 300 */ "full_index_name ::= db_name NK_DOT index_name", @@ -3077,8 +3077,8 @@ static void yy_destructor( case 402: /* table_name_cond */ case 403: /* from_db_opt */ case 405: /* tag_item */ - case 407: /* full_index_name */ - case 408: /* index_options */ + case 407: /* index_options */ + case 408: /* full_index_name */ case 411: /* sliding_opt */ case 412: /* sma_stream_opt */ case 413: /* func */ @@ -3877,13 +3877,13 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 405, /* (293) tag_item ::= column_name */ 405, /* (294) tag_item ::= column_name column_alias */ 405, /* (295) tag_item ::= column_name AS column_alias */ - 340, /* (296) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - 340, /* (297) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + 340, /* (296) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 340, /* (297) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ 340, /* (298) cmd ::= DROP INDEX exists_opt full_index_name */ - 407, /* (299) full_index_name ::= index_name */ - 407, /* (300) full_index_name ::= db_name NK_DOT index_name */ - 408, /* (301) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 408, /* (302) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + 408, /* (299) full_index_name ::= index_name */ + 408, /* (300) full_index_name ::= db_name NK_DOT index_name */ + 407, /* (301) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 407, /* (302) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ 410, /* (303) func_list ::= func */ 410, /* (304) func_list ::= func_list NK_COMMA func */ 413, /* (305) func ::= sma_func_name NK_LP expression_list NK_RP */ @@ -4493,8 +4493,8 @@ static const signed char yyRuleInfoNRhs[] = { -1, /* (293) tag_item ::= column_name */ -2, /* (294) tag_item ::= column_name column_alias */ -3, /* (295) tag_item ::= column_name AS column_alias */ - -8, /* (296) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - -9, /* (297) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + -8, /* (296) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (297) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -4, /* (298) cmd ::= DROP INDEX exists_opt full_index_name */ -1, /* (299) full_index_name ::= index_name */ -3, /* (300) full_index_name ::= db_name NK_DOT index_name */ @@ -6306,12 +6306,12 @@ static YYACTIONTYPE yy_reduce( #line 6306 "sql.c" yymsp[-2].minor.yy28 = yylhsminor.yy28; break; - case 296: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + case 296: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ #line 529 "sql.y" { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy793, yymsp[-3].minor.yy28, yymsp[-1].minor.yy28, NULL, yymsp[0].minor.yy28); } #line 6312 "sql.c" break; - case 297: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + case 297: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ #line 531 "sql.y" { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy793, yymsp[-5].minor.yy28, yymsp[-3].minor.yy28, yymsp[-1].minor.yy236, NULL); } #line 6317 "sql.c" diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index b3c2fbb42c..4df7454df8 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -654,9 +654,12 @@ int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu SColumnInfoData *pInputData = pInput->columnData; SColumnInfoData *pOutputData = pOutput->columnData; - int32_t outputLen = pInputData->varmeta.length * pInput->numOfRows; - char *outputBuf = taosMemoryCalloc(outputLen, 1); - char *output = outputBuf; + int32_t outputLen = pInputData->info.bytes; + char *outputBuf = taosMemoryMalloc(outputLen); + if (outputBuf == NULL) { + qError("substr function memory allocation failure. size: %d", outputLen); + return TSDB_CODE_OUT_OF_MEMORY; + } for (int32_t i = 0; i < pInput->numOfRows; ++i) { if (colDataIsNull_s(pInputData, i)) { @@ -676,14 +679,16 @@ int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu startPosBytes = TMAX(startPosBytes, 0); } + char *output = outputBuf; int32_t resLen = TMIN(subLen, len - startPosBytes); if (resLen > 0) { memcpy(varDataVal(output), varDataVal(input) + startPosBytes, resLen); + varDataSetLen(output, resLen); + } else { + varDataSetLen(output, 0); } - varDataSetLen(output, resLen); colDataSetVal(pOutputData, i, output, false); - output += varDataTLen(output); } pOutput->numOfRows = pInput->numOfRows; diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 2353497916..45878bb865 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -52,7 +52,7 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandF memset(streamPath, 0, len); sprintf(streamPath, "%s/%s", pMeta->path, "checkpoints"); - code = taosMulModeMkDir(streamPath, 0755); + code = taosMulModeMkDir(streamPath, 0755, false); if (code != 0) { terrno = TAOS_SYSTEM_ERROR(code); goto _err; @@ -90,7 +90,7 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandF memset(streamPath, 0, len); sprintf(streamPath, "%s/%s", pMeta->path, "state"); - code = taosMulModeMkDir(streamPath, 0755); + code = taosMulModeMkDir(streamPath, 0755, false); if (code != 0) { terrno = TAOS_SYSTEM_ERROR(code); goto _err; diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 5b42be182c..8694e5cf4c 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -169,7 +169,7 @@ SStreamState* streamStateOpen(char* path, void* pTask, bool specPath, int32_t sz sscanf(cfg, "%d\n%d\n", &szPage, &pages); } } else { - int32_t code = taosMulModeMkDir(statePath, 0755); + int32_t code = taosMulModeMkDir(statePath, 0755, false); if (code == 0) { pCfgFile = taosOpenFile(cfgPath, TD_FILE_WRITE | TD_FILE_CREATE); sprintf(cfg, "%d\n%d\n", szPage, pages); diff --git a/source/libs/tdb/src/db/tdbDb.c b/source/libs/tdb/src/db/tdbDb.c index 4f595d8d4a..81b306e65d 100644 --- a/source/libs/tdb/src/db/tdbDb.c +++ b/source/libs/tdb/src/db/tdbDb.c @@ -62,7 +62,7 @@ int32_t tdbOpen(const char *dbname, int32_t szPage, int32_t pages, TDB **ppDb, i } memset(pDb->pgrHash, 0, tsize); - ret = taosMulModeMkDir(dbname, 0755); + ret = taosMulModeMkDir(dbname, 0755, false); if (ret < 0) { return -1; } diff --git a/source/os/src/osDir.c b/source/os/src/osDir.c index 3d63da7ba3..6e52c4ed27 100644 --- a/source/os/src/osDir.c +++ b/source/os/src/osDir.c @@ -193,7 +193,7 @@ int32_t taosMulMkDir(const char *dirname) { return code; } -int32_t taosMulModeMkDir(const char *dirname, int mode) { +int32_t taosMulModeMkDir(const char *dirname, int mode, bool checkAccess) { if (dirname == NULL || strlen(dirname) >= TDDIRMAXLEN) return -1; char temp[TDDIRMAXLEN]; char *pos = temp; @@ -206,6 +206,9 @@ int32_t taosMulModeMkDir(const char *dirname, int mode) { #endif if (taosDirExist(temp)) { + if (checkAccess && taosCheckAccessFile(temp, TD_FILE_ACCESS_EXIST_OK | TD_FILE_ACCESS_READ_OK | TD_FILE_ACCESS_WRITE_OK)) { + return 0; + } return chmod(temp, mode); } @@ -248,6 +251,9 @@ int32_t taosMulModeMkDir(const char *dirname, int mode) { } if (code < 0 && errno == EEXIST) { + if (checkAccess && taosCheckAccessFile(temp, TD_FILE_ACCESS_EXIST_OK | TD_FILE_ACCESS_READ_OK | TD_FILE_ACCESS_WRITE_OK)) { + return 0; + } return chmod(temp, mode); } diff --git a/tests/script/tsim/query/interval.sim b/tests/script/tsim/query/interval.sim index e2b0d219cb..135fcc8591 100644 --- a/tests/script/tsim/query/interval.sim +++ b/tests/script/tsim/query/interval.sim @@ -206,6 +206,19 @@ if $desc_rows != $asc_rows then return -1 endi +print ================= step11 + +sql create database if not exists test0828 +sql use test0828 +sql create stable st (ts timestamp, c2 int) tags(tg int) +sql insert into ct1 using st tags(1) values('2021-08-01', 0) +sql insert into ct2 using st tags(2) values('2022-08-01', 1) +sql select _wstart, _wend, count(*) from st where ts>='2021-01-01' and ts < '2023-08-28' interval(1n) fill(value, 0) order by _wstart desc +print $rows +if $rows != 32 then + return -1 +endi +sql drop database test0828 print =============== clear #sql drop database $db #sql select * from information_schema.ins_databases diff --git a/tests/script/tsim/tagindex/add_index.sim b/tests/script/tsim/tagindex/add_index.sim index a6e9cae670..70771fc63b 100644 --- a/tests/script/tsim/tagindex/add_index.sim +++ b/tests/script/tsim/tagindex/add_index.sim @@ -18,6 +18,20 @@ sql use $dbPrefix print =============== create super table and register tag index sql create table if not exists $mtPrefix (ts timestamp, c1 int) tags (t1 int, t2 int, t3 int, t4 int, t5 int) +sql use information_schema; + +sql create index t2i on ta_3_db.ta_3_mt(t2) + +sql_error create index t3i on ta_3_mt(t3) + +sql_error drop index t2i +sql drop index ta_3_db.t2i + + +sql use $dbPrefix + + + sql show stables if $rows != 1 then return -1 @@ -310,4 +324,5 @@ sql_error create index ti2 on $mtPrefix (t1) sql_error create index t2i on ta_3_tb17 (t2) -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file + +system sh/exec.sh -n dnode1 -s stop -x SIGINT