diff --git a/tests/pytest/table/boundary.py b/tests/pytest/table/boundary.py index a1bf096499d7c3c4f3ad5ec3e57878a510935f5c..a6d88a31ca43af735877960eddfe34cc9e95f366 100644 --- a/tests/pytest/table/boundary.py +++ b/tests/pytest/table/boundary.py @@ -144,9 +144,9 @@ class TDTestCase: maxRowSize = self.getLimitFromSourceCode('TSDB_MAX_BYTES_PER_ROW') - 8 maxCols = self.getLimitFromSourceCode('TSDB_MAX_COLUMNS') - 1 - # for binary cols, 2 bytes are used for length - colLen = (maxRowSize - maxCols * 2) // maxCols - firstColLen = maxRowSize - 2 * maxCols - colLen * (maxCols - 1) + # for binary cols, 2 bytes are used for length, 4 bytes are used for VarDataOffsetT + colLen = (maxRowSize - maxCols * 6) // maxCols + firstColLen = maxRowSize - 6 * maxCols - colLen * (maxCols - 1) sql = "create table cars (ts timestamp, c0 binary(%d)" % firstColLen for i in range(1, maxCols): diff --git a/tests/pytest/tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json b/tests/pytest/tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json index 37714edc74e4469dcceb13934459d3d0df13c6a4..6e2b66c60e2d29b767038e58acf5e0e9b188bae4 100644 --- a/tests/pytest/tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json +++ b/tests/pytest/tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json @@ -54,7 +54,7 @@ "sample_format": "csv", "sample_file": "./sample.csv", "tags_file": "", - "columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}], + "columns": [{"type": "BINARY", "len": 65514, "count":1}], "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] }, { @@ -80,7 +80,7 @@ "sample_format": "csv", "sample_file": "./sample.csv", "tags_file": "", - "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}], + "columns": [{"type": "BINARY", "len": 21831, "count":3},{"type": "INT","count":2},{"type": "TINYINT"}], "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] }] }] diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py index 7403ad60a4a5ee2b257d44bcbaf5a849cdff581d..9b64a5272ddc74f0b165ea6744362d24475ae40a 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py @@ -215,7 +215,7 @@ class TDTestCase: # taosdemo error # too max length - sql = "%s -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \ + sql = "%s -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(16379\) \ -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath, cfgPath) tdLog.info("%s" % sql) diff --git a/tests/system-test/5-taos-tools/taosbenchmark/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json b/tests/system-test/5-taos-tools/taosbenchmark/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json index 37714edc74e4469dcceb13934459d3d0df13c6a4..6e2b66c60e2d29b767038e58acf5e0e9b188bae4 100644 --- a/tests/system-test/5-taos-tools/taosbenchmark/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json +++ b/tests/system-test/5-taos-tools/taosbenchmark/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json @@ -54,7 +54,7 @@ "sample_format": "csv", "sample_file": "./sample.csv", "tags_file": "", - "columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}], + "columns": [{"type": "BINARY", "len": 65514, "count":1}], "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] }, { @@ -80,7 +80,7 @@ "sample_format": "csv", "sample_file": "./sample.csv", "tags_file": "", - "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}], + "columns": [{"type": "BINARY", "len": 21831, "count":3},{"type": "INT","count":2},{"type": "TINYINT"}], "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] }] }] diff --git a/tests/system-test/5-taos-tools/taosbenchmark/taosdemoTestInsertShell.py b/tests/system-test/5-taos-tools/taosbenchmark/taosdemoTestInsertShell.py index a872d8566fa83a95c1c47519fd391a69c34b78d5..25bbc871639a2153cc5981c6e3642d18345d316f 100644 --- a/tests/system-test/5-taos-tools/taosbenchmark/taosdemoTestInsertShell.py +++ b/tests/system-test/5-taos-tools/taosbenchmark/taosdemoTestInsertShell.py @@ -203,7 +203,7 @@ class TDTestCase: # taosdemo error # too max length - sql = "%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \ + sql = "%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(16379\) \ -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,cfgPath) tdLog.info("%s" % sql ) assert os.system("%s" % sql ) != 0