提交 db39eaec 编写于 作者: S slguan

Merge branch 'develop' of https://github.com/taosdata/TDengine into develop

......@@ -327,15 +327,16 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
*(uint32_t*) payload = TSDB_DATA_NCHAR_NULL;
} else {
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
int32_t resLen = -1;
if (!taosMbsToUcs4(pToken->z, pToken->n, payload + VARSTR_HEADER_SIZE, pSchema->bytes - VARSTR_HEADER_SIZE, &resLen)) {
char buf[512] = {0};
snprintf(buf, 512, "%s", strerror(errno));
size_t wcharLength = 0;
if (!taosMbsToUcs4(pToken->z, pToken->n, payload + VARSTR_HEADER_SIZE, pSchema->bytes - VARSTR_HEADER_SIZE,
&wcharLength)) {
char buf[512] = {0};
snprintf(buf, tListLen(buf), "%s", strerror(errno));
return tscInvalidSQLErrMsg(msg, buf, pToken->z);
}
*(uint16_t*)payload = (uint16_t) (resLen * TSDB_NCHAR_SIZE);
*(uint16_t*) payload = (uint16_t) (wcharLength);
}
break;
......
......@@ -40,6 +40,10 @@ bool taosTmrReset(TAOS_TMR_CALLBACK fp, int mseconds, void *param, void *handle,
void taosTmrCleanUp(void *handle);
int32_t taosInitTimer(void (*callback)(int), int32_t ms);
void taosUninitTimer();
#ifdef __cplusplus
}
#endif
......
......@@ -141,10 +141,7 @@ int32_t taosFileRename(char *fullPath, char *suffix, char delimiter, char **dstP
*/
void getTmpfilePath(const char *fileNamePattern, char *dstPath);
int32_t taosInitTimer(void (*callback)(int), int32_t ms);
void taosUninitTimer();
bool taosMbsToUcs4(char *mbs, int32_t mbs_len, char *ucs4, int32_t ucs4_max_len, int32_t* len);
bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t* len);
int tasoUcs4Compare(void* f1_ucs4, void *f2_ucs4, int bytes);
......
......@@ -490,25 +490,26 @@ bool taosUcs4ToMbs(void *ucs4, int32_t ucs4_max_len, char *mbs) {
#endif
}
bool taosMbsToUcs4(char *mbs, int32_t mbs_len, char *ucs4, int32_t ucs4_max_len, int32_t* len) {
bool taosMbsToUcs4(char *mbs, size_t mbsLength, char *ucs4, int32_t ucs4_max_len, size_t* len) {
memset(ucs4, 0, ucs4_max_len);
#ifdef USE_LIBICONV
iconv_t cd = iconv_open(DEFAULT_UNICODE_ENCODEC, tsCharset);
size_t ucs4_input_len = mbs_len;
size_t outLen = ucs4_max_len;
if (iconv(cd, &mbs, &ucs4_input_len, &ucs4, &outLen) == -1) {
size_t ucs4_input_len = mbsLength;
size_t outLeft = ucs4_max_len;
if (iconv(cd, &mbs, &ucs4_input_len, &ucs4, &outLeft) == -1) {
iconv_close(cd);
return false;
}
iconv_close(cd);
if (len != NULL) {
*len = outLen;
*len = ucs4_max_len - outLeft;
}
return true;
#else
mbstate_t state = {0};
int32_t len = mbsnrtowcs((wchar_t *) ucs4, (const char **) &mbs, mbs_len, ucs4_max_len / 4, &state);
int32_t len = mbsnrtowcs((wchar_t *) ucs4, (const char **) &mbs, mbsLength, ucs4_max_len / 4, &state);
return len >= 0;
#endif
}
......
......@@ -9,6 +9,11 @@ python3 ./test.py $1 -f insert/smallint.py
python3 ./test.py $1 -f insert/tinyint.py
python3 ./test.py $1 -f insert/date.py
python3 ./test.py $1 -f insert/binary.py
python3 ./test.py $1 -f table/column_name.py
python3 ./test.py $1 -f table/column_num.py
python3 ./test.py $1 -f table/db_table.py
python3 ./test.py $1 -f import_merge/importBlock1HO.py
python3 ./test.py $1 -f import_merge/importBlock1HPO.py
python3 ./test.py $1 -f import_merge/importBlock1H.py
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,19 +43,19 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import %d sequential data" % (self.rows / 2))
tdLog.info("import %d sequential data" % (self.maxrows / 2))
startTime = self.startTime
sqlcmd = ['import into tb1 values']
for rid in range(1, self.rows / 2 + 1):
for rid in range(1, self.maxrows / 2 + 1):
sqlcmd.append('(%ld, %d)' % (startTime + rid, rid))
tdSql.execute(" ".join(sqlcmd))
tdLog.info("================= step3")
tdSql.query('select * from tb1')
tdSql.checkRows(self.rows / 2)
tdSql.checkRows(self.maxrows / 2)
tdLog.info("================= step4")
tdDnodes.stop(1)
......@@ -70,7 +70,7 @@ class TDTestCase:
tdLog.info("================= step7")
tdSql.execute('reset query cache')
tdSql.query('select * from tb1 order by ts desc')
tdSql.checkRows(self.rows / 2 + 1)
tdSql.checkRows(self.maxrows / 2 + 1)
tdLog.info("================= step8")
tdLog.info("import 10 data in batch before")
......@@ -83,7 +83,7 @@ class TDTestCase:
tdLog.info("================= step9")
tdSql.execute('reset query cache')
tdSql.query('select * from tb1 order by ts desc')
tdSql.checkRows(self.rows / 2 + 11)
tdSql.checkRows(self.maxrows / 2 + 11)
def stop(self):
tdSql.close()
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxwrows = 200
self.rowsPerTable = 20
tdDnodes.stop(1)
......@@ -36,7 +36,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -44,7 +44,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import %d sequential data" % self.rowsPerTable)
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
self.rowsPerTable = 100
tdDnodes.stop(1)
......@@ -36,7 +36,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -44,7 +44,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import %d sequential data" % self.rowsPerTable)
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
self.rowsPerTable = 20
tdDnodes.stop(1)
......@@ -36,7 +36,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -44,7 +44,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import %d sequential data" % self.rowsPerTable)
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,7 +43,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,7 +43,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,7 +43,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,7 +43,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,7 +43,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than %d rows less than %d rows will go to data and last file" %
(self.rows, 10 + self.rows))
(self.maxrows, 10 + self.maxrows))
tdLog.info("================= step2")
tdLog.info("import 205 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import 20 sequential data")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -43,19 +43,19 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import %d sequential data" % (self.rows / 2))
tdLog.info("import %d sequential data" % (self.maxrows / 2))
startTime = self.startTime
sqlcmd = ['import into tb1 values']
for rid in range(1, self.rows / 2 + 1):
for rid in range(1, self.maxrows / 2 + 1):
sqlcmd.append('(%ld, %d)' % (startTime + rid, rid))
tdSql.execute(" ".join(sqlcmd))
tdLog.info("================= step3")
tdSql.query('select * from tb1')
tdSql.checkRows(self.rows / 2)
tdSql.checkRows(self.maxrows / 2)
tdLog.info("================= step4")
tdDnodes.stop(1)
......@@ -73,7 +73,7 @@ class TDTestCase:
tdLog.info("================= step9")
tdSql.execute('reset query cache')
tdSql.query('select * from tb1 order by ts desc')
tdSql.checkRows(self.rows / 2)
tdSql.checkRows(self.maxrows / 2)
def stop(self):
tdSql.close()
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import 20 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import 20 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......@@ -39,7 +39,7 @@ class TDTestCase:
tdSql.execute('create table tb1 (ts timestamp, speed int)')
tdLog.info(
"More than 10 rows less than %d rows will go to data file" %
self.rows)
self.maxrows)
tdLog.info("================= step2")
tdLog.info("import 20 sequential data")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,11 +27,11 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -27,7 +27,7 @@ class TDTestCase:
def run(self):
self.ntables = 1
self.startTime = 1520000010000
self.rows = 200
self.maxrows = 200
tdDnodes.stop(1)
tdDnodes.deploy(1)
......@@ -35,7 +35,7 @@ class TDTestCase:
tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db')
tdSql.execute('create database db rows %d' % self.rows)
tdSql.execute('create database db maxrows %d' % self.maxrows)
tdSql.execute('use db')
tdLog.info("================= step1")
......
......@@ -34,12 +34,12 @@ python3 ./test.py $1 -f table/db_table.py
python3 ./test.py -s $1
sleep 1
#python3 ./test.py $1 -f import_merge/importDataLastTO.py
#python3 ./test.py -s $1
#sleep 1
#python3 ./test.py $1 -f import_merge/importDataLastT.py
#python3 ./test.py -s $1
#sleep 1
python3 ./test.py $1 -f import_merge/importDataLastTO.py
python3 ./test.py -s $1
sleep 1
python3 ./test.py $1 -f import_merge/importDataLastT.py
python3 ./test.py -s $1
sleep 1
python3 ./test.py $1 -f import_merge/importDataTO.py
python3 ./test.py -s $1
sleep 1
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
......@@ -49,8 +48,7 @@ print =============== step2
system sh/exec.sh -n dnode1 -s stop
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
print =============== step3
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 1
system sh/exec.sh -n dnode1 -s start
sleep 3000
......@@ -99,8 +98,7 @@ print =============== step4
system sh/exec.sh -n dnode1 -s stop
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 1
system sh/exec.sh -n dnode1 -s start
print =============== step5
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
......@@ -37,8 +36,7 @@ print =============== step2
system sh/exec.sh -n dnode1 -s stop
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
print =============== step3
......
......@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
......
......@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
......
......@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
......
......@@ -10,89 +10,89 @@ print ========== bigint
sql create table mt_bigint (ts timestamp, c bigint) tags (tagname bigint)
## case 00: static create table for test tag values
sql create table st_bigint_0 using mt_bigint tags (null)
sql describe st_bigint_0
if $data23 != NULL then
sql create table st_bigint_0 using mt_bigint tags (NULL)
sql select tagname from st_bigint_0
if $data00 != NULL then
return -1
endi
sql create table st_bigint_1 using mt_bigint tags (NULL)
sql describe st_bigint_1
if $data23 != NULL then
sql select tagname from st_bigint_1
if $data00 != NULL then
return -1
endi
sql create table st_bigint_2 using mt_bigint tags ('null')
sql describe st_bigint_2
if $data23 != NULL then
sql create table st_bigint_2 using mt_bigint tags ('NULL')
sql select tagname from st_bigint_2
if $data00 != NULL then
return -1
endi
sql create table st_bigint_3 using mt_bigint tags ('NULL')
sql describe st_bigint_3
if $data23 != NULL then
sql select tagname from st_bigint_3
if $data00 != NULL then
return -1
endi
sql create table st_bigint_4 using mt_bigint tags ("null")
sql describe st_bigint_4
if $data23 != NULL then
sql create table st_bigint_4 using mt_bigint tags ("NULL")
sql select tagname from st_bigint_4
if $data00 != NULL then
return -1
endi
sql create table st_bigint_5 using mt_bigint tags ("NULL")
sql describe st_bigint_5
if $data23 != NULL then
sql select tagname from st_bigint_5
if $data00 != NULL then
return -1
endi
sql create table st_bigint_6 using mt_bigint tags (-9223372036854775807)
sql describe st_bigint_6
if $data23 != -9223372036854775807 then
sql select tagname from st_bigint_6
if $data00 != -9223372036854775807 then
return -1
endi
sql create table st_bigint_7 using mt_bigint tags (9223372036854775807)
sql describe st_bigint_7
if $data23 != 9223372036854775807 then
sql select tagname from st_bigint_7
if $data00 != 9223372036854775807 then
return -1
endi
sql create table st_bigint_8 using mt_bigint tags (37)
sql describe st_bigint_8
if $data23 != 37 then
sql select tagname from st_bigint_8
if $data00 != 37 then
return -1
endi
sql create table st_bigint_9 using mt_bigint tags (-100)
sql describe st_bigint_9
if $data23 != -100 then
sql select tagname from st_bigint_9
if $data00 != -100 then
return -1
endi
sql create table st_bigint_10 using mt_bigint tags (+113)
sql describe st_bigint_10
if $data23 != 113 then
sql select tagname from st_bigint_10
if $data00 != 113 then
return -1
endi
sql create table st_bigint_11 using mt_bigint tags ('-100')
sql describe st_bigint_11
if $data23 != -100 then
sql select tagname from st_bigint_11
if $data00 != -100 then
return -1
endi
sql create table st_bigint_12 using mt_bigint tags ("+78")
sql describe st_bigint_12
if $data23 != 78 then
sql select tagname from st_bigint_12
if $data00 != 78 then
return -1
endi
sql create table st_bigint_13 using mt_bigint tags (+0078)
sql describe st_bigint_13
if $data23 != 78 then
sql select tagname from st_bigint_13
if $data00 != 78 then
return -1
endi
sql create table st_bigint_14 using mt_bigint tags (-00078)
sql describe st_bigint_14
if $data23 != -78 then
sql select tagname from st_bigint_14
if $data00 != -78 then
return -1
endi
## case 01: insert values for test column values
sql insert into st_bigint_0 values (now, null)
sql insert into st_bigint_0 values (now, NULL)
sql select * from st_bigint_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_1 values (now, NULL)
......@@ -100,15 +100,15 @@ sql select * from st_bigint_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_2 values (now, 'null')
sql insert into st_bigint_2 values (now, 'NULL')
sql select * from st_bigint_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_3 values (now, 'NULL')
......@@ -116,15 +116,15 @@ sql select * from st_bigint_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_4 values (now, "null")
sql insert into st_bigint_4 values (now, "NULL")
sql select * from st_bigint_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_5 values (now, "NULL")
......@@ -132,7 +132,7 @@ sql select * from st_bigint_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_6 values (now, 9223372036854775807)
......@@ -211,64 +211,64 @@ if $data01 != -56 then
endi
## case 02: dynamic create table for test tag values
sql insert into st_bigint_16 using mt_bigint tags (null) values (now, null)
sql describe st_bigint_16
if $data23 != NULL then
sql insert into st_bigint_16 using mt_bigint tags (NULL) values (now, NULL)
sql select tagname from st_bigint_16
if $data00 != NULL then
return -1
endi
sql select * from st_bigint_16
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_17 using mt_bigint tags (NULL) values (now, NULL)
sql describe st_bigint_17
if $data23 != NULL then
sql select tagname from st_bigint_17
if $data00 != NULL then
return -1
endi
sql select * from st_bigint_17
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_18 using mt_bigint tags ('null') values (now, 'null')
sql describe st_bigint_18
if $data23 != NULL then
sql insert into st_bigint_18 using mt_bigint tags ('NULL') values (now, 'NULL')
sql select tagname from st_bigint_18
if $data00 != NULL then
return -1
endi
sql select * from st_bigint_18
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_19 using mt_bigint tags ('NULL') values (now, 'NULL')
sql describe st_bigint_19
if $data23 != NULL then
sql select tagname from st_bigint_19
if $data00 != NULL then
return -1
endi
sql select * from st_bigint_19
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_20 using mt_bigint tags ("null") values (now, "null")
sql describe st_bigint_20
if $data23 != NULL then
sql insert into st_bigint_20 using mt_bigint tags ("NULL") values (now, "NULL")
sql select tagname from st_bigint_20
if $data00 != NULL then
return -1
endi
sql select * from st_bigint_20
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_21 using mt_bigint tags ("NULL") values (now, "NULL")
sql describe st_bigint_21
if $data23 != NULL then
sql select tagname from st_bigint_21
if $data00 != NULL then
return -1
endi
sql select * from st_bigint_21
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_22 using mt_bigint tags (9223372036854775807) values (now, 9223372036854775807)
sql describe st_bigint_22
if $data23 != 9223372036854775807 then
sql select tagname from st_bigint_22
if $data00 != 9223372036854775807 then
return -1
endi
sql select * from st_bigint_22
......@@ -276,8 +276,8 @@ if $data01 != 9223372036854775807 then
return -1
endi
sql insert into st_bigint_23 using mt_bigint tags (-9223372036854775807) values (now, -9223372036854775807)
sql describe st_bigint_23
if $data23 != -9223372036854775807 then
sql select tagname from st_bigint_23
if $data00 != -9223372036854775807 then
return -1
endi
sql select * from st_bigint_23
......@@ -285,8 +285,8 @@ if $data01 != -9223372036854775807 then
return -1
endi
sql insert into st_bigint_24 using mt_bigint tags (10) values (now, 10)
sql describe st_bigint_24
if $data23 != 10 then
sql select tagname from st_bigint_24
if $data00 != 10 then
return -1
endi
sql select * from st_bigint_24
......@@ -294,8 +294,8 @@ if $data01 != 10 then
return -1
endi
sql insert into st_bigint_25 using mt_bigint tags ("-0") values (now, "-0")
sql describe st_bigint_25
if $data23 != 0 then
sql select tagname from st_bigint_25
if $data00 != 0 then
return -1
endi
sql select * from st_bigint_25
......@@ -303,8 +303,8 @@ if $data01 != 0 then
return -1
endi
sql insert into st_bigint_26 using mt_bigint tags ('123') values (now, '123')
sql describe st_bigint_26
if $data23 != 123 then
sql select tagname from st_bigint_26
if $data00 != 123 then
return -1
endi
sql select * from st_bigint_26
......@@ -312,8 +312,8 @@ if $data01 != 123 then
return -1
endi
sql insert into st_bigint_27 using mt_bigint tags (+056) values (now, +00056)
sql describe st_bigint_27
if $data23 != 56 then
sql select tagname from st_bigint_27
if $data00 != 56 then
return -1
endi
sql select * from st_bigint_27
......@@ -321,8 +321,8 @@ if $data01 != 56 then
return -1
endi
sql insert into st_bigint_28 using mt_bigint tags (-056) values (now, -0056)
sql describe st_bigint_28
if $data23 != -56 then
sql select tagname from st_bigint_28
if $data00 != -56 then
return -1
endi
sql select * from st_bigint_28
......@@ -330,47 +330,47 @@ if $data01 != -56 then
return -1
endi
## case 03: alter tag values
sql alter table st_bigint_0 set tag tagname=9223372036854775807
sql describe st_bigint_0
if $data23 != 9223372036854775807 then
return -1
endi
sql alter table st_bigint_0 set tag tagname=-9223372036854775807
sql describe st_bigint_0
if $data23 != -9223372036854775807 then
return -1
endi
sql alter table st_bigint_0 set tag tagname=+100
sql describe st_bigint_0
if $data23 != 100 then
return -1
endi
sql alter table st_bigint_0 set tag tagname=-33
sql describe st_bigint_0
if $data23 != -33 then
return -1
endi
sql alter table st_bigint_0 set tag tagname='+98'
sql describe st_bigint_0
if $data23 != 98 then
return -1
endi
sql alter table st_bigint_0 set tag tagname='-076'
sql describe st_bigint_0
if $data23 != -76 then
return -1
endi
sql alter table st_bigint_0 set tag tagname=+0012
sql describe st_bigint_0
if $data23 != 12 then
return -1
endi
sql alter table st_bigint_0 set tag tagname=-00063
sql describe st_bigint_0
if $data23 != -63 then
return -1
endi
### case 03: alter tag values
#sql alter table st_bigint_0 set tag tagname=9223372036854775807
#sql select tagname from st_bigint_0
#if $data00 != 9223372036854775807 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname=-9223372036854775807
#sql select tagname from st_bigint_0
#if $data00 != -9223372036854775807 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname=+100
#sql select tagname from st_bigint_0
#if $data00 != 100 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname=-33
#sql select tagname from st_bigint_0
#if $data00 != -33 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname='+98'
#sql select tagname from st_bigint_0
#if $data00 != 98 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname='-076'
#sql select tagname from st_bigint_0
#if $data00 != -76 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname=+0012
#sql select tagname from st_bigint_0
#if $data00 != 12 then
# return -1
#endi
#sql alter table st_bigint_0 set tag tagname=-00063
#sql select tagname from st_bigint_0
#if $data00 != -63 then
# return -1
#endi
## case 04: illegal input
################## when overflow, auto set max
......@@ -454,13 +454,13 @@ sql insert into st_bigint_e23 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e24 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e25 using mt_bigint tags (033) values (now, 00062)
sql alter table st_bigint_e13 set tag tagname=9223372036854775808
sql_error alter table st_bigint_e14 set tag tagname=-9223372036854775808
sql alter table st_bigint_e15 set tag tagname=92233720368547758080
sql_error alter table st_bigint_e16 set tag tagname=-92233720368547758080
sql_error alter table st_bigint_e19 set tag tagname=123abc
sql_error alter table st_bigint_e20 set tag tagname="123abc"
sql_error alter table st_bigint_e22 set tag tagname=abc
sql_error alter table st_bigint_e23 set tag tagname="abc"
sql_error alter table st_bigint_e24 set tag tagname=" "
sql_error alter table st_bigint_e25 set tag tagname=''
#sql alter table st_bigint_e13 set tag tagname=9223372036854775808
#sql_error alter table st_bigint_e14 set tag tagname=-9223372036854775808
#sql alter table st_bigint_e15 set tag tagname=92233720368547758080
#sql_error alter table st_bigint_e16 set tag tagname=-92233720368547758080
#sql_error alter table st_bigint_e19 set tag tagname=123abc
#sql_error alter table st_bigint_e20 set tag tagname="123abc"
#sql_error alter table st_bigint_e22 set tag tagname=abc
#sql_error alter table st_bigint_e23 set tag tagname="abc"
#sql_error alter table st_bigint_e24 set tag tagname=" "
#sql_error alter table st_bigint_e25 set tag tagname=''
......@@ -12,110 +12,110 @@ sql create table mt_bool (ts timestamp, c bool) tags (tagname bool)
## case 00: static create table for test tag values
sql create table st_bool_0 using mt_bool tags (null)
sql select tagname from st_bool_0
if $data23 != NULL then
print ==1== expect: NULL, actually: $data23
if $data00 != NULL then
print ==1== expect: NULL, actually: $data00
return -1
endi
sql create table st_bool_1 using mt_bool tags (NULL)
sql select tagname from st_bool_1
if $data23 != NULL then
print ==2== expect: NULL, actually: $data23
if $data00 != NULL then
print ==2== expect: NULL, actually: $data00
return -1
endi
sql create table st_bool_2 using mt_bool tags ('null')
sql select tagname from st_bool_2
if $data23 != NULL then
print ==3== expect: NULL, actually: $data23
if $data00 != NULL then
print ==3== expect: NULL, actually: $data00
return -1
endi
sql create table st_bool_3 using mt_bool tags ('NULL')
sql select tagname from st_bool_3
if $data23 != NULL then
print ==4== expect: NULL, actually: $data23
if $data00 != NULL then
print ==4== expect: NULL, actually: $data00
return -1
endi
sql create table st_bool_4 using mt_bool tags ("null")
sql select tagname from st_bool_4
if $data23 != NULL then
print ==5== expect: NULL, actually: $data23
if $data00 != NULL then
print ==5== expect: NULL, actually: $data00
return -1
endi
sql create table st_bool_5 using mt_bool tags ("NULL")
sql select tagname from st_bool_5
if $data23 != NULL then
print ==6== expect: NULL, actually: $data23
if $data00 != NULL then
print ==6== expect: NULL, actually: $data00
return -1
endi
sql create table st_bool_6 using mt_bool tags ("true")
sql select tagname from st_bool_6
if $data23 != true then
print ==7== expect: true, actually: $data23
if $data00 != 1 then
print ==7== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_7 using mt_bool tags ('true')
sql select tagname from st_bool_7
if $data23 != true then
print ==8== expect: true, actually: $data23
if $data00 != 1 then
print ==8== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_8 using mt_bool tags (true)
sql select tagname from st_bool_8
if $data23 != true then
print ==9== expect: true, actually: $data23
if $data00 != 1 then
print ==9== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_9 using mt_bool tags ("false")
sql select tagname from st_bool_9
if $data23 != false then
print ==10== expect: false, actually: $data23
if $data00 != 0 then
print ==10== expect: 0, actually: $data00
return -1
endi
sql create table st_bool_10 using mt_bool tags ('false')
sql select tagname from st_bool_10
if $data23 != false then
print ==11== expect: false, actually: $data23
if $data00 != 0 then
print ==11== expect: 0, actually: $data00
return -1
endi
sql create table st_bool_11 using mt_bool tags (false)
sql select tagname from st_bool_11
if $data23 != false then
print ==12== expect: false, actually: $data23
if $data00 != 0 then
print ==12== expect: 0, actually: $data00
return -1
endi
sql create table st_bool_12 using mt_bool tags (0)
sql select tagname from st_bool_12
if $data23 != false then
print ==13== expect: false, actually: $data23
if $data00 != 0 then
print ==13== expect: 0, actually: $data00
return -1
endi
sql create table st_bool_13 using mt_bool tags (1)
sql select tagname from st_bool_13
if $data23 != true then
print ==14== expect: true, actually: $data23
if $data00 != 1 then
print ==14== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_14 using mt_bool tags (6.9)
sql select tagname from st_bool_14
if $data23 != true then
print ==15== expect: true, actually: $data23
if $data00 != 1 then
print ==15== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_15 using mt_bool tags (-3)
sql select tagname from st_bool_15
if $data23 != true then
print ==16== expect: true, actually: $data23
if $data00 != 1 then
print ==16== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_15_0 using mt_bool tags (+300)
sql select tagname from st_bool_15_0
if $data23 != true then
print ==16== expect: true, actually: $data23
if $data00 != 1 then
print ==16== expect: 1, actually: $data00
return -1
endi
sql create table st_bool_15_1 using mt_bool tags (-8.03)
sql select tagname from st_bool_15_1
if $data23 != true then
print ==16== expect: true, actually: $data23
if $data00 != 1 then
print ==16== expect: 1, actually: $data00
return -1
endi
......@@ -125,7 +125,7 @@ sql select * from st_bool_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
print ==17== expect: NULL, actually: $data01
return -1
endi
......@@ -134,7 +134,7 @@ sql select * from st_bool_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
print ==18== expect: NULL, actually: $data01
return -1
endi
......@@ -143,7 +143,7 @@ sql select * from st_bool_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
print ==19== expect: NULL, actually: $data01
return -1
endi
......@@ -152,7 +152,7 @@ sql select * from st_bool_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
print ==20== expect: NULL, actually: $data01
return -1
endi
......@@ -161,7 +161,7 @@ sql select * from st_bool_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
print ==21== expect: NULL, actually: $data01
return -1
endi
......@@ -170,7 +170,7 @@ sql select * from st_bool_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
print ==22== expect: NULL, actually: $data01
return -1
endi
......@@ -180,7 +180,7 @@ if $rows != 1 then
return -1
endi
if $data01 != 1 then
print ==23== expect: true, actually: $data01
print ==23== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_7 values (now, 'true')
......@@ -189,7 +189,7 @@ if $rows != 1 then
return -1
endi
if $data01 != 1 then
print ==24== expect: true, actually: $data01
print ==24== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_8 values (now, true)
......@@ -198,7 +198,7 @@ if $rows != 1 then
return -1
endi
if $data01 != 1 then
print ==25== expect: true, actually: $data01
print ==25== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_9 values (now, "false")
......@@ -243,7 +243,7 @@ if $rows != 1 then
return -1
endi
if $data01 != 1 then
print ==30== expect: true, actually: $data01
print ==30== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_14 values (now, 6.9)
......@@ -252,7 +252,7 @@ if $rows != 1 then
return -1
endi
if $data01 != 1 then
print ==31== expect: true, actually: $data01
print ==31== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_15 values (now, -3)
......@@ -286,201 +286,201 @@ endi
## case 02: dynamic create table for test tag values
sql insert into st_bool_16 using mt_bool tags (null) values (now, null)
sql select tagname from st_bool_16
if $data23 != NULL then
print ==33== expect: NULL, actually: $data23
if $data00 != NULL then
print ==33== expect: NULL, actually: $data00
return -1
endi
sql select * from st_bool_16
if $data01 != null then
if $data01 != NULL then
print ==34== expect: NULL, actually: $data01
return -1
endi
sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL)
sql select tagname from st_bool_17
if $data23 != NULL then
print ==35== expect: NULL, actually: $data23
if $data00 != NULL then
print ==35== expect: NULL, actually: $data00
return -1
endi
sql select * from st_bool_17
if $data01 != null then
if $data01 != NULL then
print ==36== expect: NULL, actually: $data01
return -1
endi
sql insert into st_bool_18 using mt_bool tags ('null') values (now, 'null')
sql select tagname from st_bool_18
if $data23 != NULL then
print ==37== expect: NULL, actually: $data23
if $data00 != NULL then
print ==37== expect: NULL, actually: $data00
return -1
endi
sql select * from st_bool_18
if $data01 != null then
if $data01 != NULL then
print ==38== expect: NULL, actually: $data01
return -1
endi
sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL')
sql select tagname from st_bool_19
if $data23 != NULL then
print ==39== expect: NULL, actually: $data23
if $data00 != NULL then
print ==39== expect: NULL, actually: $data00
return -1
endi
sql select * from st_bool_19
if $data01 != null then
if $data01 != NULL then
print ==40== expect: NULL, actually: $data01
return -1
endi
sql insert into st_bool_20 using mt_bool tags ("null") values (now, "null")
sql select tagname from st_bool_20
if $data23 != NULL then
print ==41== expect: NULL, actually: $data23
if $data00 != NULL then
print ==41== expect: NULL, actually: $data00
return -1
endi
sql select * from st_bool_20
if $data01 != null then
if $data01 != NULL then
print ==42== expect: NULL, actually: $data01
return -1
endi
sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL")
sql select tagname from st_bool_21
if $data23 != NULL then
print ==43== expect: NULL, actually: $data23
if $data00 != NULL then
print ==43== expect: NULL, actually: $data00
return -1
endi
sql select * from st_bool_21
if $data01 != null then
if $data01 != NULL then
print ==44== expect: NULL, actually: $data01
return -1
endi
sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true")
sql select tagname from st_bool_22
if $data23 != true then
print ==45== expect: true, actually: $data23
if $data00 != 1 then
print ==45== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_22
if $data01 != 1 then
print ==46== expect: true, actually: $data01
print ==46== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true')
sql select tagname from st_bool_23
if $data23 != true then
print ==47== expect: true, actually: $data23
if $data00 != 1 then
print ==47== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_23
if $data01 != 1 then
print ==48== expect: true, actually: $data01
print ==48== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_24 using mt_bool tags (true) values (now, true)
sql select tagname from st_bool_24
if $data23 != true then
print ==49== expect: true, actually: $data23
if $data00 != 1 then
print ==49== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_24
if $data01 != 1 then
print ==50== expect: true, actually: $data01
print ==50== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false")
sql select tagname from st_bool_25
if $data23 != false then
print ==51== expect: false, actually: $data23
if $data00 != 0 then
print ==51== expect: 0, actually: $data00
return -1
endi
sql select * from st_bool_25
if $data01 != 0 then
print ==52== expect: false, actually: $data01
print ==52== expect: 0, actually: $data01
return -1
endi
sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false')
sql select tagname from st_bool_26
if $data23 != false then
print ==53== expect: false, actually: $data23
if $data00 != 0 then
print ==53== expect: 0, actually: $data00
return -1
endi
sql select * from st_bool_26
if $data01 != 0 then
print ==54== expect: false, actually: $data01
print ==54== expect: 0, actually: $data01
return -1
endi
sql insert into st_bool_27 using mt_bool tags (false) values (now, false)
sql select tagname from st_bool_27
if $data23 != false then
print ==55== expect: false, actually: $data23
if $data00 != 0 then
print ==55== expect: 0, actually: $data00
return -1
endi
sql select * from st_bool_27
if $data01 != 0 then
print ==56== expect: false, actually: $data01
print ==56== expect: 0, actually: $data01
return -1
endi
sql insert into st_bool_28 using mt_bool tags (0) values (now, 0)
sql select tagname from st_bool_28
if $data23 != false then
print ==57== expect: false, actually: $data23
if $data00 != 0 then
print ==57== expect: 0, actually: $data00
return -1
endi
sql select * from st_bool_28
if $data01 != 0 then
print ==58== expect: false, actually: $data01
print ==58== expect: 0, actually: $data01
return -1
endi
sql insert into st_bool_29 using mt_bool tags (1) values (now, 1)
sql select tagname from st_bool_29
if $data23 != true then
print ==59== expect: true, actually: $data23
if $data00 != 1 then
print ==59== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_29
if $data01 != 1 then
print ==60== expect: true, actually: $data01
print ==60== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9)
sql select tagname from st_bool_30
if $data23 != true then
print ==61== expect: true, actually: $data23
if $data00 != 1 then
print ==61== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_30
if $data01 != 1 then
print ==62== expect: true, actually: $data01
print ==62== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3)
sql select tagname from st_bool_31
if $data23 != true then
print ==63== expect: true, actually: $data23
if $data00 != 1 then
print ==63== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_31
if $data01 != 1 then
print ==64== expect: true, actually: $data01
print ==64== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300)
sql select tagname from st_bool_32
if $data23 != true then
print ==63== expect: true, actually: $data23
if $data00 != 1 then
print ==63== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_32
if $data01 != 1 then
print ==64== expect: true, actually: $data01
print ==64== expect: 1, actually: $data01
return -1
endi
sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890)
sql select tagname from st_bool_33
if $data23 != true then
print ==63== expect: true, actually: $data23
if $data00 != 1 then
print ==63== expect: 1, actually: $data00
return -1
endi
sql select * from st_bool_33
if $data01 != 1 then
print ==64== expect: true, actually: $data01
print ==64== expect: 1, actually: $data01
return -1
endi
......@@ -490,86 +490,86 @@ endi
## case 03: alter tag values
sql alter table st_bool_0 set tag tagname=true
sql select tagname from st_bool_0
if $data23 != true then
return -1
endi
sql alter table st_bool_0 set tag tagname=NULL
sql select tagname from st_bool_0
if $data23 != NULL then
return -1
endi
sql alter table st_bool_0 set tag tagname=false
sql select tagname from st_bool_0
if $data23 != false then
return -1
endi
sql alter table st_bool_0 set tag tagname=null
sql select tagname from st_bool_0
if $data23 != NULL then
return -1
endi
sql alter table st_bool_0 set tag tagname='true'
sql select tagname from st_bool_0
if $data23 != true then
return -1
endi
sql alter table st_bool_0 set tag tagname='null'
sql select tagname from st_bool_0
if $data23 != NULL then
return -1
endi
sql alter table st_bool_0 set tag tagname='false'
sql select tagname from st_bool_0
if $data23 != false then
return -1
endi
sql alter table st_bool_0 set tag tagname='NULL'
sql select tagname from st_bool_0
if $data23 != NULL then
return -1
endi
sql alter table st_bool_0 set tag tagname="true"
sql select tagname from st_bool_0
if $data23 != true then
return -1
endi
sql alter table st_bool_0 set tag tagname="null"
sql select tagname from st_bool_0
if $data23 != NULL then
return -1
endi
sql alter table st_bool_0 set tag tagname="false"
sql select tagname from st_bool_0
if $data23 != false then
return -1
endi
sql alter table st_bool_0 set tag tagname="NULL"
sql select tagname from st_bool_0
if $data23 != NULL then
return -1
endi
sql alter table st_bool_0 set tag tagname=1
sql select tagname from st_bool_0
if $data23 != true then
return -1
endi
sql alter table st_bool_0 set tag tagname=0
sql select tagname from st_bool_0
if $data23 != false then
return -1
endi
sql alter table st_bool_0 set tag tagname=6.9
sql select tagname from st_bool_0
if $data23 != true then
return -1
endi
sql alter table st_bool_0 set tag tagname=-3
sql select tagname from st_bool_0
if $data23 != true then
return -1
endi
#sql alter table st_bool_0 set tag tagname=true
#sql select tagname from st_bool_0
#if $data00 != true then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=NULL
#sql select tagname from st_bool_0
#if $data00 != NULL then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=false
#sql select tagname from st_bool_0
#if $data00 != false then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=null
#sql select tagname from st_bool_0
#if $data00 != NULL then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname='true'
#sql select tagname from st_bool_0
#if $data00 != true then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname='null'
#sql select tagname from st_bool_0
#if $data00 != NULL then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname='false'
#sql select tagname from st_bool_0
#if $data00 != false then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname='NULL'
#sql select tagname from st_bool_0
#if $data00 != NULL then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname="true"
#sql select tagname from st_bool_0
#if $data00 != true then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname="null"
#sql select tagname from st_bool_0
#if $data00 != NULL then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname="false"
#sql select tagname from st_bool_0
#if $data00 != false then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname="NULL"
#sql select tagname from st_bool_0
#if $data00 != NULL then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=1
#sql select tagname from st_bool_0
#if $data00 != true then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=0
#sql select tagname from st_bool_0
#if $data00 != false then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=6.9
#sql select tagname from st_bool_0
#if $data00 != true then
# return -1
#endi
#sql alter table st_bool_0 set tag tagname=-3
#sql select tagname from st_bool_0
#if $data00 != true then
# return -1
#endi
# case 04: illegal input
sql_error create table st_bool_e0 using mt_bool tags (123abc)
......
......@@ -11,145 +11,146 @@ print ========== double
sql create table mt_double (ts timestamp, c double) tags (tagname double)
## case 00: static create table for test tag values
sql create table st_double_0 using mt_double tags (null)
sql describe st_double_0
if $data23 != NULL then
sql create table st_double_0 using mt_double tags (NULL )
sql select tagname from st_double_0
if $data00 != NULL then
return -1
endi
sql create table st_double_1 using mt_double tags (NULL)
sql describe st_double_1
if $data23 != NULL then
sql select tagname from st_double_1
if $data00 != NULL then
return -1
endi
sql create table st_double_2 using mt_double tags ('null')
sql describe st_double_2
if $data23 != NULL then
sql create table st_double_2 using mt_double tags ('NULL')
sql select tagname from st_double_2
if $data00 != NULL then
return -1
endi
sql create table st_double_3 using mt_double tags ('NULL')
sql describe st_double_3
if $data23 != NULL then
sql select tagname from st_double_3
if $data00 != NULL then
return -1
endi
sql create table st_double_4 using mt_double tags ("null")
sql describe st_double_4
if $data23 != NULL then
sql create table st_double_4 using mt_double tags ("NULL")
sql select tagname from st_double_4
if $data00 != NULL then
return -1
endi
sql create table st_double_5 using mt_double tags ("NULL")
sql describe st_double_5
if $data23 != NULL then
sql select tagname from st_double_5
if $data00 != NULL then
return -1
endi
sql create table st_double_6 using mt_double tags (-123.321)
sql describe st_double_6
if $data23 != -123.321000 then
sql select tagname from st_double_6
if $data00 != -123.321000000 then
print expect -123.321000000, actual: $data00
return -1
endi
sql create table st_double_7 using mt_double tags (+1.567)
sql describe st_double_7
if $data23 != 1.567000 then
sql select tagname from st_double_7
if $data00 != 1.567000000 then
return -1
endi
sql create table st_double_8 using mt_double tags (379.001)
sql describe st_double_8
if $data23 != 379.001000 then
sql select tagname from st_double_8
if $data00 != 379.001000000 then
return -1
endi
sql create table st_double_9 using mt_double tags (1.5e+3)
sql describe st_double_9
if $data23 != 1500.000000 then
sql select tagname from st_double_9
if $data00 != 1500.000000000 then
return -1
endi
sql create table st_double_10 using mt_double tags (-1.5e-3)
sql describe st_double_10
if $data23 != -0.001500 then
sql select tagname from st_double_10
if $data00 != -0.001500000 then
return -1
endi
sql create table st_double_11 using mt_double tags (+1.5e+3)
sql describe st_double_11
if $data23 != 1500.000000 then
sql select tagname from st_double_11
if $data00 != 1500.000000000 then
return -1
endi
sql create table st_double_12 using mt_double tags (-1.5e+3)
sql describe st_double_12
if $data23 != -1500.000000 then
sql select tagname from st_double_12
if $data00 != -1500.000000000 then
return -1
endi
sql create table st_double_13 using mt_double tags (1.5e-3)
sql describe st_double_13
if $data23 != 0.001500 then
sql select tagname from st_double_13
if $data00 != 0.001500000 then
return -1
endi
sql create table st_double_14 using mt_double tags (1.5E-3)
sql describe st_double_14
if $data23 != 0.001500 then
sql select tagname from st_double_14
if $data00 != 0.001500000 then
return -1
endi
sql create table st_double_6_0 using mt_double tags ('-123.321')
sql describe st_double_6_0
if $data23 != -123.321000 then
sql select tagname from st_double_6_0
if $data00 != -123.321000000 then
return -1
endi
sql create table st_double_7_0 using mt_double tags ('+1.567')
sql describe st_double_7_0
if $data23 != 1.567000 then
sql select tagname from st_double_7_0
if $data00 != 1.567000000 then
return -1
endi
sql create table st_double_8_0 using mt_double tags ('379.001')
sql describe st_double_8_0
if $data23 != 379.001000 then
sql select tagname from st_double_8_0
if $data00 != 379.001000000 then
return -1
endi
sql create table st_double_9_0 using mt_double tags ('1.5e+3')
sql describe st_double_9_0
if $data23 != 1500.000000 then
sql select tagname from st_double_9_0
if $data00 != 1500.000000000 then
return -1
endi
sql create table st_double_10_0 using mt_double tags ('-1.5e-3')
sql describe st_double_10_0
if $data23 != -0.001500 then
sql select tagname from st_double_10_0
if $data00 != -0.001500000 then
return -1
endi
sql create table st_double_11_0 using mt_double tags ('+1.5e+3')
sql describe st_double_11_0
if $data23 != 1500.000000 then
sql select tagname from st_double_11_0
if $data00 != 1500.000000000 then
return -1
endi
sql create table st_double_12_0 using mt_double tags ('-1.5e+3')
sql describe st_double_12_0
if $data23 != -1500.000000 then
sql select tagname from st_double_12_0
if $data00 != -1500.000000000 then
return -1
endi
sql create table st_double_13_0 using mt_double tags ('1.5e-3')
sql describe st_double_13_0
if $data23 != 0.001500 then
sql select tagname from st_double_13_0
if $data00 != 0.001500000 then
return -1
endi
sql create table st_double_14_0 using mt_double tags ('1.5E-3')
sql describe st_double_14_0
if $data23 != 0.001500 then
sql select tagname from st_double_14_0
if $data00 != 0.001500000 then
return -1
endi
sql create table st_double_15_0 using mt_double tags (1.7976931348623157e+308)
sql describe st_double_15_0
#if $data23 != 0.001500 then
sql select tagname from st_double_15_0
#if $data00 != 0.001500000 then
# return -1
#endi
sql create table st_double_16_0 using mt_double tags (-1.7976931348623157e+308)
sql describe st_double_16_0
#if $data23 != 0.001500 then
sql select tagname from st_double_16_0
#if $data00 != 0.001500000 then
# return -1
#endi
## case 01: insert values for test column values
sql insert into st_double_0 values (now, null)
sql insert into st_double_0 values (now, NULL )
sql select * from st_double_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_1 values (now, NULL)
......@@ -157,15 +158,15 @@ sql select * from st_double_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_2 values (now, 'null')
sql insert into st_double_2 values (now, 'NULL')
sql select * from st_double_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_3 values (now, 'NULL')
......@@ -173,15 +174,15 @@ sql select * from st_double_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_4 values (now, "null")
sql insert into st_double_4 values (now, "NULL")
sql select * from st_double_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_5 values (now, "NULL")
......@@ -189,7 +190,7 @@ sql select * from st_double_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
......@@ -215,7 +216,7 @@ sql select * from st_double_8
if $rows != 1 then
return -1
endi
#if $data01 != 100.89000 then
#if $data01 != 100.89000000 then
# return -1
#endi
sql insert into st_double_9 values (now, "-0.98")
......@@ -223,7 +224,7 @@ sql select * from st_double_9
if $rows != 1 then
return -1
endi
#if $data01 != -0.980000 then
#if $data01 != -0.980000000 then
# return -1
#endi
sql insert into st_double_10 values (now, '0')
......@@ -231,7 +232,7 @@ sql select * from st_double_10
if $rows != 1 then
return -1
endi
#if $data01 != 0.00000 then # tsim only print 4 bits after dot
#if $data01 != 0.00000000 then # tsim only print 4 bits after dot
# return -1
#endi
sql insert into st_double_11 values (now, -0)
......@@ -239,7 +240,7 @@ sql select * from st_double_11
if $rows != 1 then
return -1
endi
#if $data01 != 0.00000 then
#if $data01 != 0.000000000 then
# return -1
#endi
sql insert into st_double_12 values (now, "+056")
......@@ -256,7 +257,7 @@ sql select * from st_double_13
if $rows != 1 then
return -1
endi
#if $data01 != 56.000000 then
#if $data01 != 56.000000000 then
# return -1
#endi
......@@ -270,64 +271,64 @@ endi
#endi
## case 02: dynamic create table for test tag values
sql insert into st_double_16 using mt_double tags (null) values (now, null)
sql describe st_double_16
if $data23 != NULL then
sql insert into st_double_16 using mt_double tags (NULL ) values (now, NULL )
sql select tagname from st_double_16
if $data00 != NULL then
return -1
endi
sql select * from st_double_16
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_17 using mt_double tags (NULL) values (now, NULL)
sql describe st_double_17
if $data23 != NULL then
sql select tagname from st_double_17
if $data00 != NULL then
return -1
endi
sql select * from st_double_17
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_18 using mt_double tags ('null') values (now, 'null')
sql describe st_double_18
if $data23 != NULL then
sql insert into st_double_18 using mt_double tags ('NULL') values (now, 'NULL')
sql select tagname from st_double_18
if $data00 != NULL then
return -1
endi
sql select * from st_double_18
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_19 using mt_double tags ('NULL') values (now, 'NULL')
sql describe st_double_19
if $data23 != NULL then
sql select tagname from st_double_19
if $data00 != NULL then
return -1
endi
sql select * from st_double_19
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_20 using mt_double tags ("null") values (now, "null")
sql describe st_double_20
if $data23 != NULL then
sql insert into st_double_20 using mt_double tags ("NULL") values (now, "NULL")
sql select tagname from st_double_20
if $data00 != NULL then
return -1
endi
sql select * from st_double_20
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_21 using mt_double tags ("NULL") values (now, "NULL")
sql describe st_double_21
if $data23 != NULL then
sql select tagname from st_double_21
if $data00 != NULL then
return -1
endi
sql select * from st_double_21
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_double_22 using mt_double tags (127) values (now, 1.7976931348623157e+308)
sql describe st_double_22
#if $data23 != 127 then
sql select tagname from st_double_22
#if $data00 != 127 then
# return -1
#endi
sql select * from st_double_22
......@@ -335,8 +336,8 @@ sql select * from st_double_22
# return -1
#endi
sql insert into st_double_23 using mt_double tags (-127) values (now, -1.7976931348623157e+308)
sql describe st_double_23
#if $data23 != -127 then
sql select tagname from st_double_23
#if $data00 != -127 then
# return -1
#endi
sql select * from st_double_23
......@@ -344,8 +345,8 @@ sql select * from st_double_23
# return -1
#endi
sql insert into st_double_24 using mt_double tags (10) values (now, 10)
sql describe st_double_24
#if $data23 != 10 then
sql select tagname from st_double_24
#if $data00 != 10 then
# return -1
#endi
sql select * from st_double_24
......@@ -353,8 +354,8 @@ sql select * from st_double_24
# return -1
#endi
sql insert into st_double_25 using mt_double tags ("-0") values (now, "-0")
sql describe st_double_25
#if $data23 != 0 then
sql select tagname from st_double_25
#if $data00 != 0 then
# return -1
#endi
sql select * from st_double_25
......@@ -362,8 +363,8 @@ sql select * from st_double_25
# return -1
#endi
sql insert into st_double_26 using mt_double tags ('123') values (now, '12.3')
sql describe st_double_26
#if $data23 != 123 then
sql select tagname from st_double_26
#if $data00 != 123 then
# return -1
#endi
sql select * from st_double_26
......@@ -371,8 +372,8 @@ sql select * from st_double_26
# return -1
#endi
sql insert into st_double_27 using mt_double tags (+056) values (now, +0005.6)
sql describe st_double_27
#if $data23 != 56 then
sql select tagname from st_double_27
#if $data00 != 56 then
# return -1
#endi
sql select * from st_double_27
......@@ -380,8 +381,8 @@ sql select * from st_double_27
# return -1
#endi
sql insert into st_double_28 using mt_double tags (-056) values (now, -005.6)
sql describe st_double_28
#if $data23 != -56 then
sql select tagname from st_double_28
#if $data00 != -56 then
# return -1
#endi
sql select * from st_double_28
......@@ -389,47 +390,47 @@ sql select * from st_double_28
# return -1
#endi
## case 03: alter tag values
sql alter table st_double_0 set tag tagname=1.7976931348623157e+308
sql describe st_double_0
#if $data23 != 127 then
# return -1
#endi
sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308
sql describe st_double_0
#if $data23 != -127 then
# return -1
#endi
sql alter table st_double_0 set tag tagname=+10.340
sql describe st_double_0
#if $data23 != 100 then
# return -1
#endi
sql alter table st_double_0 set tag tagname=-33.87
sql describe st_double_0
#if $data23 != -33 then
# return -1
#endi
sql alter table st_double_0 set tag tagname='+9.8'
sql describe st_double_0
#if $data23 != 98 then
# return -1
#endi
sql alter table st_double_0 set tag tagname='-07.6'
sql describe st_double_0
#if $data23 != -76 then
# return -1
#endi
sql alter table st_double_0 set tag tagname=+0012.871
sql describe st_double_0
#if $data23 != 12 then
# return -1
#endi
sql alter table st_double_0 set tag tagname=-00063.582
sql describe st_double_0
#if $data23 != -63 then
# return -1
#endi
### case 03: alter tag values
#sql alter table st_double_0 set tag tagname=1.7976931348623157e+308
#sql select tagname from st_double_0
##if $data00 != 127 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308
#sql select tagname from st_double_0
##if $data00 != -127 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname=+10.340
#sql select tagname from st_double_0
##if $data00 != 100 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname=-33.87
#sql select tagname from st_double_0
##if $data00 != -33 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname='+9.8'
#sql select tagname from st_double_0
##if $data00 != 98 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname='-07.6'
#sql select tagname from st_double_0
##if $data00 != -76 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname=+0012.871
#sql select tagname from st_double_0
##if $data00 != 12 then
## return -1
##endi
#sql alter table st_double_0 set tag tagname=-00063.582
#sql select tagname from st_double_0
##if $data00 != -63 then
## return -1
##endi
## case 04: illegal input
sql_error create table st_double_e0 using mt_double tags (1.8976931348623157e+308)
......
......@@ -11,145 +11,163 @@ print ========== float
sql create table mt_float (ts timestamp, c float) tags (tagname float)
## case 00: static create table for test tag values
sql create table st_float_0 using mt_float tags (null)
sql describe st_float_0
if $data23 != NULL then
sql create table st_float_0 using mt_float tags (NULL)
sql select tagname from st_float_0
if $data00 != NULL then
return -1
endi
sql create table st_float_1 using mt_float tags (NULL)
sql describe st_float_1
if $data23 != NULL then
sql select tagname from st_float_1
if $data00 != NULL then
return -1
endi
sql create table st_float_2 using mt_float tags ('null')
sql describe st_float_2
if $data23 != NULL then
sql create table st_float_2 using mt_float tags ('NULL')
sql select tagname from st_float_2
if $data00 != NULL then
return -1
endi
sql create table st_float_3 using mt_float tags ('NULL')
sql describe st_float_3
if $data23 != NULL then
sql select tagname from st_float_3
if $data00 != NULL then
return -1
endi
sql create table st_float_4 using mt_float tags ("null")
sql describe st_float_4
if $data23 != NULL then
sql create table st_float_4 using mt_float tags ("NULL")
sql select tagname from st_float_4
if $data00 != NULL then
return -1
endi
sql create table st_float_5 using mt_float tags ("NULL")
sql describe st_float_5
if $data23 != NULL then
sql select tagname from st_float_5
if $data00 != NULL then
return -1
endi
sql create table st_float_6 using mt_float tags (-123.321)
sql describe st_float_6
if $data23 != -123.320999 then
sql select tagname from st_float_6
if $data00 != -123.32100 then
print expect -123.32100, actual: $data00
return -1
endi
sql create table st_float_7 using mt_float tags (+1.567)
sql describe st_float_7
if $data23 != 1.567000 then
sql select tagname from st_float_7
if $data00 != 1.56700 then
print expect 1.56700, actual: $data00
return -1
endi
sql create table st_float_8 using mt_float tags (379.001)
sql describe st_float_8
if $data23 != 379.001007 then
sql select tagname from st_float_8
if $data00 != 379.00101 then
print expect 379.00101, actual: $data00
return -1
endi
sql create table st_float_9 using mt_float tags (1.5e+3)
sql describe st_float_9
if $data23 != 1500.000000 then
sql select tagname from st_float_9
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
endi
sql create table st_float_10 using mt_float tags (-1.5e-3)
sql describe st_float_10
if $data23 != -0.001500 then
sql select tagname from st_float_10
if $data00 != -0.00150 then
print expect -0.00150, actual: $data00
return -1
endi
sql create table st_float_11 using mt_float tags (+1.5e+3)
sql describe st_float_11
if $data23 != 1500.000000 then
sql select tagname from st_float_11
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
endi
sql create table st_float_12 using mt_float tags (-1.5e+3)
sql describe st_float_12
if $data23 != -1500.000000 then
sql select tagname from st_float_12
if $data00 != -1500.00000 then
print expect -1500.00000, actual: $data00
return -1
endi
sql create table st_float_13 using mt_float tags (1.5e-3)
sql describe st_float_13
if $data23 != 0.001500 then
sql select tagname from st_float_13
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
endi
sql create table st_float_14 using mt_float tags (1.5E-3)
sql describe st_float_14
if $data23 != 0.001500 then
sql select tagname from st_float_14
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
endi
sql create table st_float_6_0 using mt_float tags ('-123.321')
sql describe st_float_6_0
if $data23 != -123.320999 then
sql select tagname from st_float_6_0
if $data00 != -123.32100 then
print expect -123.32100, actual: $data00
return -1
endi
sql create table st_float_7_0 using mt_float tags ('+1.567')
sql describe st_float_7_0
if $data23 != 1.567000 then
sql select tagname from st_float_7_0
if $data00 != 1.56700 then
print expect 1.56700, actual: $data00
return -1
endi
sql create table st_float_8_0 using mt_float tags ('379.001')
sql describe st_float_8_0
if $data23 != 379.001007 then
sql select tagname from st_float_8_0
if $data00 != 379.00101 then
print expect 379.00101, actual: $data00
return -1
endi
sql create table st_float_9_0 using mt_float tags ('1.5e+3')
sql describe st_float_9_0
if $data23 != 1500.000000 then
sql select tagname from st_float_9_0
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
endi
sql create table st_float_10_0 using mt_float tags ('-1.5e-3')
sql describe st_float_10_0
if $data23 != -0.001500 then
sql select tagname from st_float_10_0
if $data00 != -0.00150 then
print expect -0.00150, actual: $data00
return -1
endi
sql create table st_float_11_0 using mt_float tags ('+1.5e+3')
sql describe st_float_11_0
if $data23 != 1500.000000 then
sql select tagname from st_float_11_0
if $data00 != 1500.00000 then
print expect 1500.00000, actual: $data00
return -1
endi
sql create table st_float_12_0 using mt_float tags ('-1.5e+3')
sql describe st_float_12_0
if $data23 != -1500.000000 then
sql select tagname from st_float_12_0
if $data00 != -1500.00000 then
print expect -1500.00000, actual: $data00
return -1
endi
sql create table st_float_13_0 using mt_float tags ('1.5e-3')
sql describe st_float_13_0
if $data23 != 0.001500 then
sql select tagname from st_float_13_0
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
endi
sql create table st_float_14_0 using mt_float tags ('1.5E-3')
sql describe st_float_14_0
if $data23 != 0.001500 then
sql select tagname from st_float_14_0
if $data00 != 0.00150 then
print expect 0.00150, actual: $data00
return -1
endi
sql create table st_float_15_0 using mt_float tags (3.40282347e+38)
sql describe st_float_15_0
#if $data23 != 0.001500 then
sql select tagname from st_float_15_0
#if $data00 != 0.001500 then
# return -1
#endi
sql create table st_float_16_0 using mt_float tags (-3.40282347e+38)
sql describe st_float_16_0
#if $data23 != 0.001500 then
sql select tagname from st_float_16_0
#if $data00 != 0.001500 then
# return -1
#endi
## case 01: insert values for test column values
sql insert into st_float_0 values (now, null)
sql insert into st_float_0 values (now, NULL)
sql select * from st_float_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_1 values (now, NULL)
......@@ -157,15 +175,15 @@ sql select * from st_float_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_2 values (now, 'null')
sql insert into st_float_2 values (now, 'NULL')
sql select * from st_float_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_3 values (now, 'NULL')
......@@ -173,15 +191,15 @@ sql select * from st_float_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_4 values (now, "null")
sql insert into st_float_4 values (now, "NULL")
sql select * from st_float_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_5 values (now, "NULL")
......@@ -189,7 +207,7 @@ sql select * from st_float_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
......@@ -270,64 +288,64 @@ endi
#endi
## case 02: dynamic create table for test tag values
sql insert into st_float_16 using mt_float tags (null) values (now, null)
sql describe st_float_16
if $data23 != NULL then
sql insert into st_float_16 using mt_float tags (NULL) values (now, NULL)
sql select tagname from st_float_16
if $data00 != NULL then
return -1
endi
sql select * from st_float_16
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_17 using mt_float tags (NULL) values (now, NULL)
sql describe st_float_17
if $data23 != NULL then
sql select tagname from st_float_17
if $data00 != NULL then
return -1
endi
sql select * from st_float_17
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_18 using mt_float tags ('null') values (now, 'null')
sql describe st_float_18
if $data23 != NULL then
sql insert into st_float_18 using mt_float tags ('NULL') values (now, 'NULL')
sql select tagname from st_float_18
if $data00 != NULL then
return -1
endi
sql select * from st_float_18
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_19 using mt_float tags ('NULL') values (now, 'NULL')
sql describe st_float_19
if $data23 != NULL then
sql select tagname from st_float_19
if $data00 != NULL then
return -1
endi
sql select * from st_float_19
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_20 using mt_float tags ("null") values (now, "null")
sql describe st_float_20
if $data23 != NULL then
sql insert into st_float_20 using mt_float tags ("NULL") values (now, "NULL")
sql select tagname from st_float_20
if $data00 != NULL then
return -1
endi
sql select * from st_float_20
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_21 using mt_float tags ("NULL") values (now, "NULL")
sql describe st_float_21
if $data23 != NULL then
sql select tagname from st_float_21
if $data00 != NULL then
return -1
endi
sql select * from st_float_21
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql describe st_float_22
#if $data23 != 127 then
sql select tagname from st_float_22
#if $data00 != 127 then
# return -1
#endi
sql select * from st_float_22
......@@ -335,8 +353,8 @@ sql select * from st_float_22
# return -1
#endi
sql insert into st_float_23 using mt_float tags (-127) values (now, -3.40282347e+38)
sql describe st_float_23
#if $data23 != -127 then
sql select tagname from st_float_23
#if $data00 != -127 then
# return -1
#endi
sql select * from st_float_23
......@@ -344,8 +362,8 @@ sql select * from st_float_23
# return -1
#endi
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql describe st_float_24
#if $data23 != 10 then
sql select tagname from st_float_24
#if $data00 != 10 then
# return -1
#endi
sql select * from st_float_24
......@@ -353,8 +371,8 @@ sql select * from st_float_24
# return -1
#endi
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql describe st_float_25
#if $data23 != 0 then
sql select tagname from st_float_25
#if $data00 != 0 then
# return -1
#endi
sql select * from st_float_25
......@@ -362,8 +380,8 @@ sql select * from st_float_25
# return -1
#endi
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql describe st_float_26
#if $data23 != 123 then
sql select tagname from st_float_26
#if $data00 != 123 then
# return -1
#endi
sql select * from st_float_26
......@@ -371,8 +389,8 @@ sql select * from st_float_26
# return -1
#endi
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql describe st_float_27
#if $data23 != 56 then
sql select tagname from st_float_27
#if $data00 != 56 then
# return -1
#endi
sql select * from st_float_27
......@@ -380,8 +398,8 @@ sql select * from st_float_27
# return -1
#endi
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql describe st_float_28
#if $data23 != -56 then
sql select tagname from st_float_28
#if $data00 != -56 then
# return -1
#endi
sql select * from st_float_28
......@@ -389,47 +407,47 @@ sql select * from st_float_28
# return -1
#endi
## case 03: alter tag values
sql alter table st_float_0 set tag tagname=3.40282347e+38
sql describe st_float_0
#if $data23 != 127 then
# return -1
#endi
sql alter table st_float_0 set tag tagname=-3.40282347e+38
sql describe st_float_0
#if $data23 != -127 then
# return -1
#endi
sql alter table st_float_0 set tag tagname=+10.340
sql describe st_float_0
#if $data23 != 100 then
# return -1
#endi
sql alter table st_float_0 set tag tagname=-33.87
sql describe st_float_0
#if $data23 != -33 then
# return -1
#endi
sql alter table st_float_0 set tag tagname='+9.8'
sql describe st_float_0
#if $data23 != 98 then
# return -1
#endi
sql alter table st_float_0 set tag tagname='-07.6'
sql describe st_float_0
#if $data23 != -76 then
# return -1
#endi
sql alter table st_float_0 set tag tagname=+0012.871
sql describe st_float_0
#if $data23 != 12 then
# return -1
#endi
sql alter table st_float_0 set tag tagname=-00063.582
sql describe st_float_0
#if $data23 != -63 then
# return -1
#endi
### case 03: alter tag values
#sql alter table st_float_0 set tag tagname=3.40282347e+38
#sql select tagname from st_float_0
##if $data00 != 127 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=-3.40282347e+38
#sql select tagname from st_float_0
##if $data00 != -127 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=+10.340
#sql select tagname from st_float_0
##if $data00 != 100 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=-33.87
#sql select tagname from st_float_0
##if $data00 != -33 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname='+9.8'
#sql select tagname from st_float_0
##if $data00 != 98 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname='-07.6'
#sql select tagname from st_float_0
##if $data00 != -76 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=+0012.871
#sql select tagname from st_float_0
##if $data00 != 12 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=-00063.582
#sql select tagname from st_float_0
##if $data00 != -63 then
## return -1
##endi
## case 04: illegal input
sql_error create table st_float_e0 using mt_float tags (3.50282347e+38)
......
......@@ -10,89 +10,89 @@ print ========== int
sql create table mt_int (ts timestamp, c int) tags (tagname int)
## case 00: static create table for test tag values
sql create table st_int_0 using mt_int tags (null)
sql describe st_int_0
if $data23 != NULL then
sql create table st_int_0 using mt_int tags (NULL)
sql select tagname from st_int_0
if $data00 != NULL then
return -1
endi
sql create table st_int_1 using mt_int tags (NULL)
sql describe st_int_1
if $data23 != NULL then
sql select tagname from st_int_1
if $data00 != NULL then
return -1
endi
sql create table st_int_2 using mt_int tags ('null')
sql describe st_int_2
if $data23 != NULL then
sql create table st_int_2 using mt_int tags ('NULL')
sql select tagname from st_int_2
if $data00 != NULL then
return -1
endi
sql create table st_int_3 using mt_int tags ('NULL')
sql describe st_int_3
if $data23 != NULL then
sql select tagname from st_int_3
if $data00 != NULL then
return -1
endi
sql create table st_int_4 using mt_int tags ("null")
sql describe st_int_4
if $data23 != NULL then
sql create table st_int_4 using mt_int tags ("NULL")
sql select tagname from st_int_4
if $data00 != NULL then
return -1
endi
sql create table st_int_5 using mt_int tags ("NULL")
sql describe st_int_5
if $data23 != NULL then
sql select tagname from st_int_5
if $data00 != NULL then
return -1
endi
sql create table st_int_6 using mt_int tags (-2147483647)
sql describe st_int_6
if $data23 != -2147483647 then
sql select tagname from st_int_6
if $data00 != -2147483647 then
return -1
endi
sql create table st_int_7 using mt_int tags (2147483647)
sql describe st_int_7
if $data23 != 2147483647 then
sql select tagname from st_int_7
if $data00 != 2147483647 then
return -1
endi
sql create table st_int_8 using mt_int tags (37)
sql describe st_int_8
if $data23 != 37 then
sql select tagname from st_int_8
if $data00 != 37 then
return -1
endi
sql create table st_int_9 using mt_int tags (-100)
sql describe st_int_9
if $data23 != -100 then
sql select tagname from st_int_9
if $data00 != -100 then
return -1
endi
sql create table st_int_10 using mt_int tags (+113)
sql describe st_int_10
if $data23 != 113 then
sql select tagname from st_int_10
if $data00 != 113 then
return -1
endi
sql create table st_int_11 using mt_int tags ('-100')
sql describe st_int_11
if $data23 != -100 then
sql select tagname from st_int_11
if $data00 != -100 then
return -1
endi
sql create table st_int_12 using mt_int tags ("+78")
sql describe st_int_12
if $data23 != 78 then
sql select tagname from st_int_12
if $data00 != 78 then
return -1
endi
sql create table st_int_13 using mt_int tags (+0078)
sql describe st_int_13
if $data23 != 78 then
sql select tagname from st_int_13
if $data00 != 78 then
return -1
endi
sql create table st_int_14 using mt_int tags (-00078)
sql describe st_int_14
if $data23 != -78 then
sql select tagname from st_int_14
if $data00 != -78 then
return -1
endi
## case 01: insert values for test column values
sql insert into st_int_0 values (now, null)
sql insert into st_int_0 values (now, NULL)
sql select * from st_int_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_1 values (now, NULL)
......@@ -100,15 +100,15 @@ sql select * from st_int_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_2 values (now, 'null')
sql insert into st_int_2 values (now, 'NULL')
sql select * from st_int_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_3 values (now, 'NULL')
......@@ -116,15 +116,15 @@ sql select * from st_int_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_4 values (now, "null")
sql insert into st_int_4 values (now, "NULL")
sql select * from st_int_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_5 values (now, "NULL")
......@@ -132,7 +132,7 @@ sql select * from st_int_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_6 values (now, 2147483647)
......@@ -211,64 +211,64 @@ if $data01 != -56 then
endi
## case 02: dynamic create table for test tag values
sql insert into st_int_16 using mt_int tags (null) values (now, null)
sql describe st_int_16
if $data23 != NULL then
sql insert into st_int_16 using mt_int tags (NULL) values (now, NULL)
sql select tagname from st_int_16
if $data00 != NULL then
return -1
endi
sql select * from st_int_16
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_17 using mt_int tags (NULL) values (now, NULL)
sql describe st_int_17
if $data23 != NULL then
sql select tagname from st_int_17
if $data00 != NULL then
return -1
endi
sql select * from st_int_17
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_18 using mt_int tags ('null') values (now, 'null')
sql describe st_int_18
if $data23 != NULL then
sql insert into st_int_18 using mt_int tags ('NULL') values (now, 'NULL')
sql select tagname from st_int_18
if $data00 != NULL then
return -1
endi
sql select * from st_int_18
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_19 using mt_int tags ('NULL') values (now, 'NULL')
sql describe st_int_19
if $data23 != NULL then
sql select tagname from st_int_19
if $data00 != NULL then
return -1
endi
sql select * from st_int_19
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_20 using mt_int tags ("null") values (now, "null")
sql describe st_int_20
if $data23 != NULL then
sql insert into st_int_20 using mt_int tags ("NULL") values (now, "NULL")
sql select tagname from st_int_20
if $data00 != NULL then
return -1
endi
sql select * from st_int_20
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_21 using mt_int tags ("NULL") values (now, "NULL")
sql describe st_int_21
if $data23 != NULL then
sql select tagname from st_int_21
if $data00 != NULL then
return -1
endi
sql select * from st_int_21
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_int_22 using mt_int tags (2147483647) values (now, 2147483647)
sql describe st_int_22
if $data23 != 2147483647 then
sql select tagname from st_int_22
if $data00 != 2147483647 then
return -1
endi
sql select * from st_int_22
......@@ -276,8 +276,8 @@ if $data01 != 2147483647 then
return -1
endi
sql insert into st_int_23 using mt_int tags (-2147483647) values (now, -2147483647)
sql describe st_int_23
if $data23 != -2147483647 then
sql select tagname from st_int_23
if $data00 != -2147483647 then
return -1
endi
sql select * from st_int_23
......@@ -285,8 +285,8 @@ if $data01 != -2147483647 then
return -1
endi
sql insert into st_int_24 using mt_int tags (10) values (now, 10)
sql describe st_int_24
if $data23 != 10 then
sql select tagname from st_int_24
if $data00 != 10 then
return -1
endi
sql select * from st_int_24
......@@ -294,8 +294,8 @@ if $data01 != 10 then
return -1
endi
sql insert into st_int_25 using mt_int tags ("-0") values (now, "-0")
sql describe st_int_25
if $data23 != 0 then
sql select tagname from st_int_25
if $data00 != 0 then
return -1
endi
sql select * from st_int_25
......@@ -303,8 +303,8 @@ if $data01 != 0 then
return -1
endi
sql insert into st_int_26 using mt_int tags ('123') values (now, '123')
sql describe st_int_26
if $data23 != 123 then
sql select tagname from st_int_26
if $data00 != 123 then
return -1
endi
sql select * from st_int_26
......@@ -312,8 +312,8 @@ if $data01 != 123 then
return -1
endi
sql insert into st_int_27 using mt_int tags (+056) values (now, +00056)
sql describe st_int_27
if $data23 != 56 then
sql select tagname from st_int_27
if $data00 != 56 then
return -1
endi
sql select * from st_int_27
......@@ -321,8 +321,8 @@ if $data01 != 56 then
return -1
endi
sql insert into st_int_28 using mt_int tags (-056) values (now, -0056)
sql describe st_int_28
if $data23 != -56 then
sql select tagname from st_int_28
if $data00 != -56 then
return -1
endi
sql select * from st_int_28
......@@ -330,47 +330,47 @@ if $data01 != -56 then
return -1
endi
## case 03: alter tag values
sql alter table st_int_0 set tag tagname=2147483647
sql describe st_int_0
if $data23 != 2147483647 then
return -1
endi
sql alter table st_int_0 set tag tagname=-2147483647
sql describe st_int_0
if $data23 != -2147483647 then
return -1
endi
sql alter table st_int_0 set tag tagname=+100
sql describe st_int_0
if $data23 != 100 then
return -1
endi
sql alter table st_int_0 set tag tagname=-33
sql describe st_int_0
if $data23 != -33 then
return -1
endi
sql alter table st_int_0 set tag tagname='+98'
sql describe st_int_0
if $data23 != 98 then
return -1
endi
sql alter table st_int_0 set tag tagname='-076'
sql describe st_int_0
if $data23 != -76 then
return -1
endi
sql alter table st_int_0 set tag tagname=+0012
sql describe st_int_0
if $data23 != 12 then
return -1
endi
sql alter table st_int_0 set tag tagname=-00063
sql describe st_int_0
if $data23 != -63 then
return -1
endi
### case 03: alter tag values
#sql alter table st_int_0 set tag tagname=2147483647
#sql select tagname from st_int_0
#if $data00 != 2147483647 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname=-2147483647
#sql select tagname from st_int_0
#if $data00 != -2147483647 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname=+100
#sql select tagname from st_int_0
#if $data00 != 100 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname=-33
#sql select tagname from st_int_0
#if $data00 != -33 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname='+98'
#sql select tagname from st_int_0
#if $data00 != 98 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname='-076'
#sql select tagname from st_int_0
#if $data00 != -76 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname=+0012
#sql select tagname from st_int_0
#if $data00 != 12 then
# return -1
#endi
#sql alter table st_int_0 set tag tagname=-00063
#sql select tagname from st_int_0
#if $data00 != -63 then
# return -1
#endi
## case 04: illegal input
sql_error create table st_int_e0 using mt_int tags (2147483648)
......
......@@ -10,89 +10,89 @@ print ========== smallint
sql create table mt_smallint (ts timestamp, c smallint) tags (tagname smallint)
## case 00: static create table for test tag values
sql create table st_smallint_0 using mt_smallint tags (null)
sql describe st_smallint_0
if $data23 != NULL then
sql create table st_smallint_0 using mt_smallint tags (NULL)
sql select tagname from st_smallint_0
if $data00 != NULL then
return -1
endi
sql create table st_smallint_1 using mt_smallint tags (NULL)
sql describe st_smallint_1
if $data23 != NULL then
sql select tagname from st_smallint_1
if $data00 != NULL then
return -1
endi
sql create table st_smallint_2 using mt_smallint tags ('null')
sql describe st_smallint_2
if $data23 != NULL then
sql create table st_smallint_2 using mt_smallint tags ('NULL')
sql select tagname from st_smallint_2
if $data00 != NULL then
return -1
endi
sql create table st_smallint_3 using mt_smallint tags ('NULL')
sql describe st_smallint_3
if $data23 != NULL then
sql select tagname from st_smallint_3
if $data00 != NULL then
return -1
endi
sql create table st_smallint_4 using mt_smallint tags ("null")
sql describe st_smallint_4
if $data23 != NULL then
sql create table st_smallint_4 using mt_smallint tags ("NULL")
sql select tagname from st_smallint_4
if $data00 != NULL then
return -1
endi
sql create table st_smallint_5 using mt_smallint tags ("NULL")
sql describe st_smallint_5
if $data23 != NULL then
sql select tagname from st_smallint_5
if $data00 != NULL then
return -1
endi
sql create table st_smallint_6 using mt_smallint tags (-32767)
sql describe st_smallint_6
if $data23 != -32767 then
sql select tagname from st_smallint_6
if $data00 != -32767 then
return -1
endi
sql create table st_smallint_7 using mt_smallint tags (32767)
sql describe st_smallint_7
if $data23 != 32767 then
sql select tagname from st_smallint_7
if $data00 != 32767 then
return -1
endi
sql create table st_smallint_8 using mt_smallint tags (37)
sql describe st_smallint_8
if $data23 != 37 then
sql select tagname from st_smallint_8
if $data00 != 37 then
return -1
endi
sql create table st_smallint_9 using mt_smallint tags (-100)
sql describe st_smallint_9
if $data23 != -100 then
sql select tagname from st_smallint_9
if $data00 != -100 then
return -1
endi
sql create table st_smallint_10 using mt_smallint tags (+113)
sql describe st_smallint_10
if $data23 != 113 then
sql select tagname from st_smallint_10
if $data00 != 113 then
return -1
endi
sql create table st_smallint_11 using mt_smallint tags ('-100')
sql describe st_smallint_11
if $data23 != -100 then
sql select tagname from st_smallint_11
if $data00 != -100 then
return -1
endi
sql create table st_smallint_12 using mt_smallint tags ("+78")
sql describe st_smallint_12
if $data23 != 78 then
sql select tagname from st_smallint_12
if $data00 != 78 then
return -1
endi
sql create table st_smallint_13 using mt_smallint tags (+0078)
sql describe st_smallint_13
if $data23 != 78 then
sql select tagname from st_smallint_13
if $data00 != 78 then
return -1
endi
sql create table st_smallint_14 using mt_smallint tags (-00078)
sql describe st_smallint_14
if $data23 != -78 then
sql select tagname from st_smallint_14
if $data00 != -78 then
return -1
endi
## case 01: insert values for test column values
sql insert into st_smallint_0 values (now, null)
sql insert into st_smallint_0 values (now, NULL)
sql select * from st_smallint_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_1 values (now, NULL)
......@@ -100,15 +100,15 @@ sql select * from st_smallint_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_2 values (now, 'null')
sql insert into st_smallint_2 values (now, 'NULL')
sql select * from st_smallint_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_3 values (now, 'NULL')
......@@ -116,15 +116,15 @@ sql select * from st_smallint_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_4 values (now, "null")
sql insert into st_smallint_4 values (now, "NULL")
sql select * from st_smallint_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_5 values (now, "NULL")
......@@ -132,7 +132,7 @@ sql select * from st_smallint_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_6 values (now, 32767)
......@@ -211,64 +211,64 @@ if $data01 != -56 then
endi
## case 02: dynamic create table for test tag values
sql insert into st_smallint_16 using mt_smallint tags (null) values (now, null)
sql describe st_smallint_16
if $data23 != NULL then
sql insert into st_smallint_16 using mt_smallint tags (NULL) values (now, NULL)
sql select tagname from st_smallint_16
if $data00 != NULL then
return -1
endi
sql select * from st_smallint_16
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_17 using mt_smallint tags (NULL) values (now, NULL)
sql describe st_smallint_17
if $data23 != NULL then
sql select tagname from st_smallint_17
if $data00 != NULL then
return -1
endi
sql select * from st_smallint_17
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_18 using mt_smallint tags ('null') values (now, 'null')
sql describe st_smallint_18
if $data23 != NULL then
sql insert into st_smallint_18 using mt_smallint tags ('NULL') values (now, 'NULL')
sql select tagname from st_smallint_18
if $data00 != NULL then
return -1
endi
sql select * from st_smallint_18
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_19 using mt_smallint tags ('NULL') values (now, 'NULL')
sql describe st_smallint_19
if $data23 != NULL then
sql select tagname from st_smallint_19
if $data00 != NULL then
return -1
endi
sql select * from st_smallint_19
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_20 using mt_smallint tags ("null") values (now, "null")
sql describe st_smallint_20
if $data23 != NULL then
sql insert into st_smallint_20 using mt_smallint tags ("NULL") values (now, "NULL")
sql select tagname from st_smallint_20
if $data00 != NULL then
return -1
endi
sql select * from st_smallint_20
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_21 using mt_smallint tags ("NULL") values (now, "NULL")
sql describe st_smallint_21
if $data23 != NULL then
sql select tagname from st_smallint_21
if $data00 != NULL then
return -1
endi
sql select * from st_smallint_21
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_22 using mt_smallint tags (32767) values (now, 32767)
sql describe st_smallint_22
if $data23 != 32767 then
sql select tagname from st_smallint_22
if $data00 != 32767 then
return -1
endi
sql select * from st_smallint_22
......@@ -276,8 +276,8 @@ if $data01 != 32767 then
return -1
endi
sql insert into st_smallint_23 using mt_smallint tags (-32767) values (now, -32767)
sql describe st_smallint_23
if $data23 != -32767 then
sql select tagname from st_smallint_23
if $data00 != -32767 then
return -1
endi
sql select * from st_smallint_23
......@@ -285,8 +285,8 @@ if $data01 != -32767 then
return -1
endi
sql insert into st_smallint_24 using mt_smallint tags (10) values (now, 10)
sql describe st_smallint_24
if $data23 != 10 then
sql select tagname from st_smallint_24
if $data00 != 10 then
return -1
endi
sql select * from st_smallint_24
......@@ -294,8 +294,8 @@ if $data01 != 10 then
return -1
endi
sql insert into st_smallint_25 using mt_smallint tags ("-0") values (now, "-0")
sql describe st_smallint_25
if $data23 != 0 then
sql select tagname from st_smallint_25
if $data00 != 0 then
return -1
endi
sql select * from st_smallint_25
......@@ -303,8 +303,8 @@ if $data01 != 0 then
return -1
endi
sql insert into st_smallint_26 using mt_smallint tags ('123') values (now, '123')
sql describe st_smallint_26
if $data23 != 123 then
sql select tagname from st_smallint_26
if $data00 != 123 then
return -1
endi
sql select * from st_smallint_26
......@@ -312,8 +312,8 @@ if $data01 != 123 then
return -1
endi
sql insert into st_smallint_27 using mt_smallint tags (+056) values (now, +00056)
sql describe st_smallint_27
if $data23 != 56 then
sql select tagname from st_smallint_27
if $data00 != 56 then
return -1
endi
sql select * from st_smallint_27
......@@ -321,8 +321,8 @@ if $data01 != 56 then
return -1
endi
sql insert into st_smallint_28 using mt_smallint tags (-056) values (now, -0056)
sql describe st_smallint_28
if $data23 != -56 then
sql select tagname from st_smallint_28
if $data00 != -56 then
return -1
endi
sql select * from st_smallint_28
......@@ -331,46 +331,46 @@ if $data01 != -56 then
endi
## case 03: alter tag values
sql alter table st_smallint_0 set tag tagname=32767
sql describe st_smallint_0
if $data23 != 32767 then
return -1
endi
sql alter table st_smallint_0 set tag tagname=-32767
sql describe st_smallint_0
if $data23 != -32767 then
return -1
endi
sql alter table st_smallint_0 set tag tagname=+100
sql describe st_smallint_0
if $data23 != 100 then
return -1
endi
sql alter table st_smallint_0 set tag tagname=-33
sql describe st_smallint_0
if $data23 != -33 then
return -1
endi
sql alter table st_smallint_0 set tag tagname='+98'
sql describe st_smallint_0
if $data23 != 98 then
return -1
endi
sql alter table st_smallint_0 set tag tagname='-076'
sql describe st_smallint_0
if $data23 != -76 then
return -1
endi
sql alter table st_smallint_0 set tag tagname=+0012
sql describe st_smallint_0
if $data23 != 12 then
return -1
endi
sql alter table st_smallint_0 set tag tagname=-00063
sql describe st_smallint_0
if $data23 != -63 then
return -1
endi
#sql alter table st_smallint_0 set tag tagname=32767
#sql select tagname from st_smallint_0
#if $data00 != 32767 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname=-32767
#sql select tagname from st_smallint_0
#if $data00 != -32767 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname=+100
#sql select tagname from st_smallint_0
#if $data00 != 100 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname=-33
#sql select tagname from st_smallint_0
#if $data00 != -33 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname='+98'
#sql select tagname from st_smallint_0
#if $data00 != 98 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname='-076'
#sql select tagname from st_smallint_0
#if $data00 != -76 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname=+0012
#sql select tagname from st_smallint_0
#if $data00 != 12 then
# return -1
#endi
#sql alter table st_smallint_0 set tag tagname=-00063
#sql select tagname from st_smallint_0
#if $data00 != -63 then
# return -1
#endi
## case 04: illegal input
sql_error create table st_smallint_e0 using mt_smallint tags (32768)
......
......@@ -10,89 +10,90 @@ print ========== tinyint
sql create table mt_tinyint (ts timestamp, c tinyint) tags (tagname tinyint)
## case 00: static create table for test tag values
sql create table st_tinyint_0 using mt_tinyint tags (null)
sql describe st_tinyint_0
if $data23 != NULL then
sql create table st_tinyint_0 using mt_tinyint tags (NULL)
sql select tagname from st_tinyint_0
if $data00 != NULL then
print expect NULL, actually: $data00
return -1
endi
sql create table st_tinyint_1 using mt_tinyint tags (NULL)
sql describe st_tinyint_1
if $data23 != NULL then
sql select tagname from st_tinyint_1
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_2 using mt_tinyint tags ('null')
sql describe st_tinyint_2
if $data23 != NULL then
sql create table st_tinyint_2 using mt_tinyint tags ('NULL')
sql select tagname from st_tinyint_2
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_3 using mt_tinyint tags ('NULL')
sql describe st_tinyint_3
if $data23 != NULL then
sql select tagname from st_tinyint_3
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_4 using mt_tinyint tags ("null")
sql describe st_tinyint_4
if $data23 != NULL then
sql create table st_tinyint_4 using mt_tinyint tags ("NULL")
sql select tagname from st_tinyint_4
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_5 using mt_tinyint tags ("NULL")
sql describe st_tinyint_5
if $data23 != NULL then
sql select tagname from st_tinyint_5
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_6 using mt_tinyint tags (-127)
sql describe st_tinyint_6
if $data23 != -127 then
sql select tagname from st_tinyint_6
if $data00 != -127 then
return -1
endi
sql create table st_tinyint_7 using mt_tinyint tags (127)
sql describe st_tinyint_7
if $data23 != 127 then
sql select tagname from st_tinyint_7
if $data00 != 127 then
return -1
endi
sql create table st_tinyint_8 using mt_tinyint tags (37)
sql describe st_tinyint_8
if $data23 != 37 then
sql select tagname from st_tinyint_8
if $data00 != 37 then
return -1
endi
sql create table st_tinyint_9 using mt_tinyint tags (-100)
sql describe st_tinyint_9
if $data23 != -100 then
sql select tagname from st_tinyint_9
if $data00 != -100 then
return -1
endi
sql create table st_tinyint_10 using mt_tinyint tags (+113)
sql describe st_tinyint_10
if $data23 != 113 then
sql select tagname from st_tinyint_10
if $data00 != 113 then
return -1
endi
sql create table st_tinyint_11 using mt_tinyint tags ('-100')
sql describe st_tinyint_11
if $data23 != -100 then
sql select tagname from st_tinyint_11
if $data00 != -100 then
return -1
endi
sql create table st_tinyint_12 using mt_tinyint tags ("+78")
sql describe st_tinyint_12
if $data23 != 78 then
sql select tagname from st_tinyint_12
if $data00 != 78 then
return -1
endi
sql create table st_tinyint_13 using mt_tinyint tags (+0078)
sql describe st_tinyint_13
if $data23 != 78 then
sql select tagname from st_tinyint_13
if $data00 != 78 then
return -1
endi
sql create table st_tinyint_14 using mt_tinyint tags (-00078)
sql describe st_tinyint_14
if $data23 != -78 then
sql select tagname from st_tinyint_14
if $data00 != -78 then
return -1
endi
## case 01: insert values for test column values
sql insert into st_tinyint_0 values (now, null)
sql insert into st_tinyint_0 values (now, NULL)
sql select * from st_tinyint_0
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_1 values (now, NULL)
......@@ -100,15 +101,15 @@ sql select * from st_tinyint_1
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_2 values (now, 'null')
sql insert into st_tinyint_2 values (now, 'NULL')
sql select * from st_tinyint_2
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_3 values (now, 'NULL')
......@@ -116,15 +117,15 @@ sql select * from st_tinyint_3
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_4 values (now, "null")
sql insert into st_tinyint_4 values (now, "NULL")
sql select * from st_tinyint_4
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_5 values (now, "NULL")
......@@ -132,7 +133,7 @@ sql select * from st_tinyint_5
if $rows != 1 then
return -1
endi
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_6 values (now, 127)
......@@ -211,64 +212,64 @@ if $data01 != -56 then
endi
## case 02: dynamic create table for test tag values
sql insert into st_tinyint_16 using mt_tinyint tags (null) values (now, null)
sql describe st_tinyint_16
if $data23 != NULL then
sql insert into st_tinyint_16 using mt_tinyint tags (NULL) values (now, NULL)
sql select tagname from st_tinyint_16
if $data00 != NULL then
return -1
endi
sql select * from st_tinyint_16
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_17 using mt_tinyint tags (NULL) values (now, NULL)
sql describe st_tinyint_17
if $data23 != NULL then
sql select tagname from st_tinyint_17
if $data00 != NULL then
return -1
endi
sql select * from st_tinyint_17
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_18 using mt_tinyint tags ('null') values (now, 'null')
sql describe st_tinyint_18
if $data23 != NULL then
sql insert into st_tinyint_18 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql select tagname from st_tinyint_18
if $data00 != NULL then
return -1
endi
sql select * from st_tinyint_18
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_19 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql describe st_tinyint_19
if $data23 != NULL then
sql select tagname from st_tinyint_19
if $data00 != NULL then
return -1
endi
sql select * from st_tinyint_19
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_20 using mt_tinyint tags ("null") values (now, "null")
sql describe st_tinyint_20
if $data23 != NULL then
sql insert into st_tinyint_20 using mt_tinyint tags ("NULL") values (now, "NULL")
sql select tagname from st_tinyint_20
if $data00 != NULL then
return -1
endi
sql select * from st_tinyint_20
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_21 using mt_tinyint tags ("NULL") values (now, "NULL")
sql describe st_tinyint_21
if $data23 != NULL then
sql select tagname from st_tinyint_21
if $data00 != NULL then
return -1
endi
sql select * from st_tinyint_21
if $data01 != null then
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_22 using mt_tinyint tags (127) values (now, 127)
sql describe st_tinyint_22
if $data23 != 127 then
sql select tagname from st_tinyint_22
if $data00 != 127 then
return -1
endi
sql select * from st_tinyint_22
......@@ -276,8 +277,8 @@ if $data01 != 127 then
return -1
endi
sql insert into st_tinyint_23 using mt_tinyint tags (-127) values (now, -127)
sql describe st_tinyint_23
if $data23 != -127 then
sql select tagname from st_tinyint_23
if $data00 != -127 then
return -1
endi
sql select * from st_tinyint_23
......@@ -285,8 +286,8 @@ if $data01 != -127 then
return -1
endi
sql insert into st_tinyint_24 using mt_tinyint tags (10) values (now, 10)
sql describe st_tinyint_24
if $data23 != 10 then
sql select tagname from st_tinyint_24
if $data00 != 10 then
return -1
endi
sql select * from st_tinyint_24
......@@ -294,8 +295,8 @@ if $data01 != 10 then
return -1
endi
sql insert into st_tinyint_25 using mt_tinyint tags ("-0") values (now, "-0")
sql describe st_tinyint_25
if $data23 != 0 then
sql select tagname from st_tinyint_25
if $data00 != 0 then
return -1
endi
sql select * from st_tinyint_25
......@@ -303,8 +304,8 @@ if $data01 != 0 then
return -1
endi
sql insert into st_tinyint_26 using mt_tinyint tags ('123') values (now, '123')
sql describe st_tinyint_26
if $data23 != 123 then
sql select tagname from st_tinyint_26
if $data00 != 123 then
return -1
endi
sql select * from st_tinyint_26
......@@ -312,8 +313,8 @@ if $data01 != 123 then
return -1
endi
sql insert into st_tinyint_27 using mt_tinyint tags (+056) values (now, +00056)
sql describe st_tinyint_27
if $data23 != 56 then
sql select tagname from st_tinyint_27
if $data00 != 56 then
return -1
endi
sql select * from st_tinyint_27
......@@ -321,8 +322,8 @@ if $data01 != 56 then
return -1
endi
sql insert into st_tinyint_28 using mt_tinyint tags (-056) values (now, -0056)
sql describe st_tinyint_28
if $data23 != -56 then
sql select tagname from st_tinyint_28
if $data00 != -56 then
return -1
endi
sql select * from st_tinyint_28
......@@ -331,46 +332,46 @@ if $data01 != -56 then
endi
## case 03: alter tag values
sql alter table st_tinyint_0 set tag tagname=127
sql describe st_tinyint_0
if $data23 != 127 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname=-127
sql describe st_tinyint_0
if $data23 != -127 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname=+100
sql describe st_tinyint_0
if $data23 != 100 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname=-33
sql describe st_tinyint_0
if $data23 != -33 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname='+98'
sql describe st_tinyint_0
if $data23 != 98 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname='-076'
sql describe st_tinyint_0
if $data23 != -76 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname=+0012
sql describe st_tinyint_0
if $data23 != 12 then
return -1
endi
sql alter table st_tinyint_0 set tag tagname=-00063
sql describe st_tinyint_0
if $data23 != -63 then
return -1
endi
#sql alter table st_tinyint_0 set tag tagname=127
#sql select tagname from st_tinyint_0
#if $data00 != 127 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname=-127
#sql select tagname from st_tinyint_0
#if $data00 != -127 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname=+100
#sql select tagname from st_tinyint_0
#if $data00 != 100 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname=-33
#sql select tagname from st_tinyint_0
#if $data00 != -33 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname='+98'
#sql select tagname from st_tinyint_0
#if $data00 != 98 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname='-076'
#sql select tagname from st_tinyint_0
#if $data00 != -76 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname=+0012
#sql select tagname from st_tinyint_0
#if $data00 != 12 then
# return -1
#endi
#sql alter table st_tinyint_0 set tag tagname=-00063
#sql select tagname from st_tinyint_0
#if $data00 != -63 then
# return -1
#endi
## case 04: illegal input
sql_error create table st_tinyint_e0 using mt_tinyint tags (128)
......
......@@ -23,7 +23,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db rows 255 ablocks 1024 tblocks 512 tables 100 ctime 3600
sql create database $db maxrows 255 maxtables 100 ctime 3600
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
......
......@@ -3,8 +3,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3
system sh/exec.sh -n dnode1 -s start
sleep 3000
......
......@@ -2,8 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 5
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
......
......@@ -7,6 +7,7 @@
#run general/parser/auto_create_tb.sim
#sleep 2000
#run general/parser/auto_create_tb_drop_tb.sim
sleep 2000
run general/parser/col_arithmetic_operation.sim
sleep 2000
......
......@@ -14,12 +14,10 @@ system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode2 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 5
system sh/cfg.sh -n dnode2 -c meterMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5
system sh/cfg.sh -n dnode2 -c metricMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 5
system sh/cfg.sh -n dnode2 -c tableMetaKeepTimer -v 5
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
......
......@@ -688,7 +688,7 @@ bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) {
}
if (row[i] == 0) {
strcpy(value, "null");
strcpy(value, TSDB_DATA_NULL_STR);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册