From fd9fa7bf2ded21de19e4d506aace94999f661f0c Mon Sep 17 00:00:00 2001 From: kishoramballi Date: Sat, 3 Jan 2009 05:11:53 +0000 Subject: [PATCH] IDENTIFIER_LENGTH is modified to have 64 bytes. and Binary datatype input string will have 512 bytes length to accommodate 256 bytes max. --- include/TableImpl.h | 2 +- include/os.h | 2 +- src/storage/DataType.cxx | 2 +- test/tools/catalog/exp.test005.ksh | 36 +++++++++++------------ test/tools/catalog/exp.test006.ksh | 60 +++++++++++++++++++------------------- 5 files changed, 51 insertions(+), 51 deletions(-) diff --git a/include/TableImpl.h b/include/TableImpl.h index 99341357..e8932632 100644 --- a/include/TableImpl.h +++ b/include/TableImpl.h @@ -133,7 +133,7 @@ class TableImpl:public Table idxInfo = NULL; indexPtr_ = NULL; scanType_ = unknownScan; pred_ = NULL; useIndex_ = -1; numFlds_ = 0; iNullInfo = 0; cNullInfo = NULL; isIntUsedForNULL = true; - iNotNullInfo = 0; cNotNullInfo = NULL; + iNotNullInfo = 0; cNotNullInfo = NULL; curTuple_ = NULL; isPlanCreated = false; undoFlag = true;} ~TableImpl(); diff --git a/include/os.h b/include/os.h index a88e1f50..9a90f8cd 100644 --- a/include/os.h +++ b/include/os.h @@ -82,7 +82,7 @@ enum MapMode }; #define MAX_FILE_LEN 1024 -#define IDENTIFIER_LENGTH 128 +#define IDENTIFIER_LENGTH 64 #define ERROR_STRING_LENGTH 128 #define DEFAULT_VALUE_BUF_LENGTH 32 #define SYSTEMDB "SYSTEMDB" diff --git a/src/storage/DataType.cxx b/src/storage/DataType.cxx index 34278dce..9c91ea9f 100644 --- a/src/storage/DataType.cxx +++ b/src/storage/DataType.cxx @@ -1258,7 +1258,7 @@ void* AllDataType::alloc(DataType type, int length) dest = malloc(length); break; case typeBinary: - if (length == 0 || length > 256 ) return NULL; + if (length == 0 || length > 512) return NULL; dest = malloc(length); memset(dest, 0, length); break; diff --git a/test/tools/catalog/exp.test005.ksh b/test/tools/catalog/exp.test005.ksh index 25da27c2..ea1bf369 100644 --- a/test/tools/catalog/exp.test005.ksh +++ b/test/tools/catalog/exp.test005.ksh @@ -41,37 +41,37 @@ Case 1: With -D chunk option with empty database 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 0 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 0 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 0 - 168 + 104 FixedSizeAllocator 16 1 @@ -138,37 +138,37 @@ Case 2: With -D chunk option after table creation: 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 1 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 2 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 0 - 168 + 104 FixedSizeAllocator 16 1 @@ -232,37 +232,37 @@ Case 3: With -D chunk option after drop t1 : 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 0 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 0 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 0 - 168 + 104 FixedSizeAllocator 16 1 diff --git a/test/tools/catalog/exp.test006.ksh b/test/tools/catalog/exp.test006.ksh index ff176173..dd7b1ce7 100644 --- a/test/tools/catalog/exp.test006.ksh +++ b/test/tools/catalog/exp.test006.ksh @@ -45,37 +45,37 @@ Case 1: With -D chunk option after table creation: 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 1 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 3 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 2 - 168 + 104 FixedSizeAllocator 16 1 @@ -182,37 +182,37 @@ Case 2: With -D chunk option after insert 20 tuples: 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 1 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 3 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 2 - 168 + 104 FixedSizeAllocator 16 1 @@ -300,37 +300,37 @@ Case 3: With -D chunk option after deleting 10 tuples : 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 1 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 3 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 2 - 168 + 104 FixedSizeAllocator 16 1 @@ -418,37 +418,37 @@ Case 4: With -D chunk option after Index droped : 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 1 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 3 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 1 - 168 + 104 FixedSizeAllocator 16 1 @@ -524,37 +524,37 @@ Case 5: With -D chunk option after drop t2 : 1 DatabaseTableId 0 - 148 + 84 FixedSizeAllocator 11 1 UserTableId 1 - 260 + 132 FixedSizeAllocator 12 1 TableTableId 0 - 152 + 88 FixedSizeAllocator 13 1 FieldTableId 0 - 196 + 132 FixedSizeAllocator 14 1 AccessTableId 0 - 260 + 132 FixedSizeAllocator 15 1 IndexTableId 0 - 168 + 104 FixedSizeAllocator 16 1 -- 2.11.4.GIT