From 4d39f7ff0c6201a24805c08e48f4bfdf4fa89747 Mon Sep 17 00:00:00 2001 From: prabatuty Date: Sat, 4 Jun 2011 16:39:14 +0000 Subject: [PATCH] test script fixes --- test/tools/csql/default_timeval_nontime.sql | 14 ++++++++++++-- test/tools/csql/exp.test001.ksh | 4 ++-- test/tools/csql/exp.test012.ksh | 12 +++--------- test/tools/csql/exp.test132.ksh | 4 ++-- test/tools/csql/exp.test140.ksh | 15 ++++++++++++--- test/tools/csql/exp.testnw001.ksh | 4 ++-- test/tools/csql/exp.testnw009.ksh | 12 +++--------- test/tools/csql/test140.ksh | 3 --- 8 files changed, 36 insertions(+), 32 deletions(-) rewrite test/tools/csql/default_timeval_nontime.sql (100%) rewrite test/tools/csql/exp.test140.ksh (87%) diff --git a/test/tools/csql/default_timeval_nontime.sql b/test/tools/csql/default_timeval_nontime.sql dissimilarity index 100% index d54c81c1..1dcfb246 100644 --- a/test/tools/csql/default_timeval_nontime.sql +++ b/test/tools/csql/default_timeval_nontime.sql @@ -1,2 +1,12 @@ -echo CREATE TABLE t1(f1 INT DEFAULT '2009-07-29 01:01:01', f2 SMALLINT DEFAULT '2009-07-29 01:01:01', f3 TINYINT DEFAULT '2009-07-29 01:01:01', f4 BIGINT DEFAULT '2009-07-29 01:01:01', f5 FLOAT DEFAULT '2009-07-29 01:01:01', f6 DOUBLE DEFAULT '2009-07-29 01:01:01'); -CREATE TABLE t1(f1 INT DEFAULT '2009-07-29 01:01:01', f2 SMALLINT DEFAULT '2009-07-29 01:01:01', f3 TINYINT DEFAULT '2009-07-29 01:01:01', f4 BIGINT DEFAULT '2009-07-29 01:01:01', f5 FLOAT DEFAULT '2009-07-29 01:01:01', f6 DOUBLE DEFAULT '2009-07-29 01:01:01'); +echo CREATE TABLE t1(f1 INT DEFAULT '2009-07-29 01:01:01' ); +CREATE TABLE t1(f1 INT DEFAULT '2009-07-29 01:01:01' ); +echo create table t2(f2 SMALLINT DEFAULT '2009-07-29 01:01:01'); +create table t2(f2 SMALLINT DEFAULT '2009-07-29 01:01:01'); +echo create table t3(f3 TINYINT DEFAULT '2009-07-29 01:01:01'); +create table t3(f3 TINYINT DEFAULT '2009-07-29 01:01:01'); +echo create table t4(f4 BIGINT DEFAULT '2009-07-29 01:01:01'); +create table t4(f4 BIGINT DEFAULT '2009-07-29 01:01:01'); +echo create table t5(f5 FLOAT DEFAULT '2009-07-29 01:01:01'); +create table t5(f5 FLOAT DEFAULT '2009-07-29 01:01:01'); +echo create table t6(f6 DOUBLE DEFAULT '2009-07-29 01:01:01'); +create table t6(f6 DOUBLE DEFAULT '2009-07-29 01:01:01'); diff --git a/test/tools/csql/exp.test001.ksh b/test/tools/csql/exp.test001.ksh index a30ce1f8..ebb65c22 100644 --- a/test/tools/csql/exp.test001.ksh +++ b/test/tools/csql/exp.test001.ksh @@ -1,5 +1,5 @@ Case 1: With no option: -[?1034hCSQL>quit; +CSQL>quit; Case 2: With ? option: Usage: csql [ [-u username] [-p passwd] ] [ [-H hostname] [-P port] ] [-s sqlfile] @@ -15,5 +15,5 @@ Failed Case 5: With wrong password : failed Case 6: With correct user name and password : -[?1034hCSQL>quit; +CSQL>quit; passed diff --git a/test/tools/csql/exp.test012.ksh b/test/tools/csql/exp.test012.ksh index 63a8846f..146da3a7 100644 --- a/test/tools/csql/exp.test012.ksh +++ b/test/tools/csql/exp.test012.ksh @@ -3,11 +3,11 @@ Statement Executed echo insert into t1 values(1,'2008-10-29'); Statement Executed: Rows Affected = 1 echo insert into t1 values(2,'28-12-2008'); -Statement Executed: Rows Affected = 1 +Statement prepare failed with error -16 echo insert into t1 values(3,'2008-2-30'); -Statement Executed: Rows Affected = 1 +Statement prepare failed with error -16 echo insert into t1 values(4,'2008-3- -20'); -Statement Executed: Rows Affected = 1 +Statement prepare failed with error -16 echo insert into t1 values(5,NULL); Statement Executed: Rows Affected = 1 echo insert into t1 values(6,'2007-05-05'); @@ -17,9 +17,6 @@ echo select * from t1; t1.f1 t1.f2 --------------------------------------------------------- 1 2008/10/29 - 2 0/0/0 - 3 0/0/0 - 4 0/0/0 5 NULL 6 2007/5/5 @@ -27,9 +24,6 @@ echo select * from t1 where f2<='2007-05-05'; --------------------------------------------------------- t1.f1 t1.f2 --------------------------------------------------------- - 2 0/0/0 - 3 0/0/0 - 4 0/0/0 6 2007/5/5 echo select * from t1 where f2>='2007-05-05'; diff --git a/test/tools/csql/exp.test132.ksh b/test/tools/csql/exp.test132.ksh index ebd4af28..07d01c2d 100644 --- a/test/tools/csql/exp.test132.ksh +++ b/test/tools/csql/exp.test132.ksh @@ -1,4 +1,4 @@ -[?1034hCSQL>create table t1(f1 int,f2 int); +CSQL>create table t1(f1 int,f2 int); Statement Executed CSQL>insert into t1 values(12,23); Statement Executed: Rows Affected = 1 @@ -111,4 +111,4 @@ CSQL>drop table t1; Statement Executed CSQL> Statement prepare failed with error -19 -CSQL> \ No newline at end of file +CSQL> diff --git a/test/tools/csql/exp.test140.ksh b/test/tools/csql/exp.test140.ksh dissimilarity index 87% index de3653eb..d5adc76c 100644 --- a/test/tools/csql/exp.test140.ksh +++ b/test/tools/csql/exp.test140.ksh @@ -1,3 +1,12 @@ -echo CREATE TABLE t1(f1 INT DEFAULT '2009-07-29 01:01:01', f2 SMALLINT DEFAULT '2009-07-29 01:01:01', f3 TINYINT DEFAULT '2009-07-29 01:01:01', f4 BIGINT DEFAULT '2009-07-29 01:01:01', f5 FLOAT DEFAULT '2009-07-29 01:01:01', f6 DOUBLE DEFAULT '2009-07-29 01:01:01'); -Statement prepare failed with error -19 -Statement Executed +echo CREATE TABLE t1(f1 INT DEFAULT '2009-07-29 01:01:01' ); +Statement prepare failed with error -19 +echo create table t2(f2 SMALLINT DEFAULT '2009-07-29 01:01:01'); +Statement prepare failed with error -19 +echo create table t3(f3 TINYINT DEFAULT '2009-07-29 01:01:01'); +Statement prepare failed with error -19 +echo create table t4(f4 BIGINT DEFAULT '2009-07-29 01:01:01'); +Statement prepare failed with error -19 +echo create table t5(f5 FLOAT DEFAULT '2009-07-29 01:01:01'); +Statement prepare failed with error -19 +echo create table t6(f6 DOUBLE DEFAULT '2009-07-29 01:01:01'); +Statement prepare failed with error -19 diff --git a/test/tools/csql/exp.testnw001.ksh b/test/tools/csql/exp.testnw001.ksh index 12840330..bd75d0c6 100644 --- a/test/tools/csql/exp.testnw001.ksh +++ b/test/tools/csql/exp.testnw001.ksh @@ -1,5 +1,5 @@ Case 1: With no option: -[?1034hCSQL>quit; +CSQL>quit; Case 2: With ? option: Usage: csql [ [-u username] [-p passwd] ] [ [-H hostname] [-P port] ] [-s sqlfile] @@ -16,5 +16,5 @@ Case 5: With wrong password : failed Case 6: With correct user name and password : Network CSql -[?1034hCSQL>quit; +CSQL>quit; passed diff --git a/test/tools/csql/exp.testnw009.ksh b/test/tools/csql/exp.testnw009.ksh index 1dade294..3cbd11f3 100644 --- a/test/tools/csql/exp.testnw009.ksh +++ b/test/tools/csql/exp.testnw009.ksh @@ -4,11 +4,11 @@ Statement Executed echo insert into t1 values(1,'2008-10-29'); Statement Executed: Rows Affected = 1 echo insert into t1 values(2,'28-12-2008'); -Statement Executed: Rows Affected = 1 +Statement prepare failed with error -16 echo insert into t1 values(3,'2008-2-30'); -Statement Executed: Rows Affected = 1 +Statement prepare failed with error -16 echo insert into t1 values(4,'2008-3- -20'); -Statement Executed: Rows Affected = 1 +Statement prepare failed with error -16 echo insert into t1 values(5,NULL); Statement Executed: Rows Affected = 1 echo insert into t1 values(6,'2007-05-05'); @@ -18,9 +18,6 @@ echo select * from t1; t1.f1 t1.f2 --------------------------------------------------------- 1 2008/10/29 - 2 0/0/0 - 3 0/0/0 - 4 0/0/0 5 NULL 6 2007/5/5 @@ -28,9 +25,6 @@ echo select * from t1 where f2<='2007-05-05'; --------------------------------------------------------- t1.f1 t1.f2 --------------------------------------------------------- - 2 0/0/0 - 3 0/0/0 - 4 0/0/0 6 2007/5/5 echo select * from t1 where f2>='2007-05-05'; diff --git a/test/tools/csql/test140.ksh b/test/tools/csql/test140.ksh index 556109d6..c583028d 100755 --- a/test/tools/csql/test140.ksh +++ b/test/tools/csql/test140.ksh @@ -14,9 +14,6 @@ if [ $? -ne 0 ] then $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop.sql exit 1; -else - $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop.sql - exit 1; fi exit 0; -- 2.11.4.GIT