📄 test001.ksh
字号:
#!/bin/sh# TestCase:# create table with two fields and index on first field# insert 1 tuple# check number of tuples, totalPagesused# check pagesUsed for storing hash bucket# check number of index nodes, pagesUsed for storing index nodes# delete 1 tuple# check number of tuples, totalPagesused# check pagesUsed for storing hash bucket# check number of index nodes, pagesUsed for storing index nodes# Note: spaceused for table = noOfDataNodes * sizeofTuple + noOfPages * sizeofPageInfo#Note:Thats why we see spaceused as 16 even when no tuple exist#Run this test only under csql/test or on this directory.#Otherwise, it may failEXECUTABLE=${PWD}/system/Allocator/createREL_PATH=.if [ -s "$EXECUTABLE" ]then REL_PATH=${PWD}/system/Allocatorfi${REL_PATH}/createif [ $? -ne 0 ]then exit 100;fiecho "Tables and Indexes are created"${REL_PATH}/insert1if [ $? -ne 1 ]then exit 100;fiecho "Tuples inserted into table"echo "Case 1: -T option for t1: with 1 tuple"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t1if [ $? -ne 0 ]then exit 1;fiecho "Case 2: -I option for idx1 of t1, with 1 tuple"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I t1idx1if [ $? -ne 0 ]then exit 2;fi${REL_PATH}/delete1if [ $? -ne 1 ]then exit 100;fiecho "Tuples deleted from table"echo "Case 3: -T option for t1: after removing 1 tuple"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t1if [ $? -ne 0 ]then exit 3;fiecho "Case 4: -I option for idx1 of t1, after removing 1 tuple"$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I t1idx1if [ $? -ne 0 ]then exit 4;fi${REL_PATH}/dropif [ $? -ne 0 ]then exit 100;fiecho "Tables and Indexes are dropped"exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -