db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r694954 [4/4] - in /db/derby/code/trunk/java: testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/j9_13/ testing/org/apache/derbyTesting/functionTests/master/j9_foundation/ testing/org/...
Date Sat, 13 Sep 2008 14:26:18 GMT
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerBeforeTrig.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerBeforeTrig.out?rev=694954&r1=694953&r2=694954&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerBeforeTrig.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerBeforeTrig.out
Sat Sep 13 07:26:16 2008
@@ -28,25 +28,55 @@
 ------------------------------------
 create trigger tbad NO CASCADE before insert on x for each statement drop table x;
 ERROR 42X01: Syntax error: Encountered "drop" at line 4, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement drop index x;
 ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement alter table x
add column y int;
 ERROR 42X01: Syntax error: Encountered "alter" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement alter table x
add constraint ck2 check(x > 0);
 ERROR 42X01: Syntax error: Encountered "alter" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement alter table x
drop constraint ck;
 ERROR 42X01: Syntax error: Encountered "alter" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement create index
x2 on x (x);
 ERROR 42X01: Syntax error: Encountered "create" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement create index
xunrelated on unrelated(x);
 ERROR 42X01: Syntax error: Encountered "create" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement drop index xunrelated;
 ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement drop trigger
tbad;
 ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement 
 	create trigger tbad2 NO CASCADE before insert on x for each statement values 1;
 ERROR 42X01: Syntax error: Encountered "create" at line 2, column 9.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tokv1 NO CASCADE before insert on x for each statement values 1;
 0 rows inserted/updated/deleted
 ij> insert into x values 1;
@@ -62,8 +92,14 @@
 ------------------------------------
 create trigger tbad NO CASCADE before insert on x for each statement set isolation to rr;
 ERROR 42X01: Syntax error: Encountered "set" at line 4, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger tbad NO CASCADE before insert on x for each statement lock table x
in share mode;
 ERROR 42X01: Syntax error: Encountered "lock" at line 1, column 70.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> ------------------------------------
 -- DML, cannot perform dml on same
 -- table for before trigger, of for
@@ -80,8 +116,14 @@
 -- syntax
 create trigger t1 NO CASCADE before update on x referencing badtoken as oldtable for each
row values 1;
 ERROR 42X01: Syntax error: Encountered "badtoken" at line 3, column 61.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> create trigger t1 NO CASCADE before update on x referencing old as oldrow new for
each row values 1;
 ERROR 42X01: Syntax error: Encountered "for" at line 1, column 79.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- dup names
 create trigger t1 NO CASCADE before update on x referencing old as oldrow new as newrow old
as oldrow2 
 	for each row values 1;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out?rev=694954&r1=694953&r2=694954&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
Sat Sep 13 07:26:16 2008
@@ -71,6 +71,9 @@
 ij> -- no params in column list
 create trigger tr NO CASCADE before update of x, ? on x for each row values 1;
 ERROR 42X01: Syntax error: Encountered "?" at line 2, column 50.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- invalid column
 create trigger tr NO CASCADE before update of doesnotexist on x for each row values 1;
 ERROR 42X14: 'DOESNOTEXIST' is not a column in table or VTI 'X'.
@@ -80,9 +83,15 @@
 ij> -- error to use table qualifier
 create trigger tr NO CASCADE before update of x.x on x for each row values 1;
 ERROR 42X01: Syntax error: Encountered "." at line 2, column 48.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- error to use schema.table qualifier
 create trigger tr NO CASCADE before update of app.x.x on x for each row values 1;
 ERROR 42X01: Syntax error: Encountered "." at line 2, column 50.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- no params in trigger action
 -- bad
 create trigger tr NO CASCADE before delete on x for each row select * from x where x = ?;
@@ -1115,6 +1124,9 @@
 ij(USER1)> -- expect error
 create trigger tropt after insert on topt1 for each mode db2sql insert into topt2 values
1;
 ERROR 42X01: Syntax error: Encountered "mode" at line 2, column 53.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij(USER1)> -- ok
 create trigger tropt after insert on topt1 insert into topt2 values 1;
 0 rows inserted/updated/deleted

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out?rev=694954&r1=694953&r2=694954&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
Sat Sep 13 07:26:16 2008
@@ -49,6 +49,9 @@
 ij> -- empty values clause
 values();
 ERROR 42X01: Syntax error: Encountered ")" at line 2, column 8.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- positive tests
 
 -- single value
@@ -183,21 +186,39 @@
 ij> -- type precedence tests. tinyint not supported by DB2 Cloudscape
 values (1 = 1.2);
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (1.2 = 1);
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 13.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (1 = cast(1 as bigint));
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (1 = cast(1 as smallint));
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (cast(1 as bigint) = 1);
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (cast(1 as smallint) = 1);
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 29.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- inserts
 create table insert_test1 (c1 int);
 0 rows inserted/updated/deleted
@@ -414,12 +435,21 @@
 select *
 from  table target;
 ERROR 42X01: Syntax error: Encountered "target" at line 3, column 13.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> select *
 from  table (target);
 ERROR 42X01: Syntax error: Encountered ")" at line 2, column 20.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> select *
 from  table (target as q);
 ERROR 42X01: Syntax error: Encountered "as" at line 2, column 21.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> drop table sub;
 0 rows inserted/updated/deleted
 ij> drop table target;
@@ -432,122 +462,239 @@
 ij> -- boolean expression IS disallowed in values or select clause
 select nullif(c1, 1) is null from t1;
 ERROR 42X01: Syntax error: Encountered "is" at line 2, column 22.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 1 is null;
 ERROR 42X01: Syntax error: Encountered "is" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- boolean expression =, >, >=, <, <= disallowed in values or select clause
 values 1 = 1;
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select 1 = 1 from t1;
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (nullif('abc','a') = 'abc');
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select (nullif('abc','a') = 'abc') from t1;
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select c11 = any (select c11 from t1) from t1;
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 12.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 2 > 1;
 ERROR 42X01: Syntax error: Encountered ">" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select 2 > 1 from t1;
 ERROR 42X01: Syntax error: Encountered ">" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 2 >= 1;
 ERROR 42X01: Syntax error: Encountered ">=" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select 2 >= 1 from t1;
 ERROR 42X01: Syntax error: Encountered ">=" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 1 < 2;
 ERROR 42X01: Syntax error: Encountered "<" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select 1 < 2 from t1;
 ERROR 42X01: Syntax error: Encountered "<" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 1 <= 2;
 ERROR 42X01: Syntax error: Encountered "<=" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select 1 <= 2 from t1;
 ERROR 42X01: Syntax error: Encountered "<=" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (1>1);
 ERROR 42X01: Syntax error: Encountered ">" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select (c1 < 2) from t1;
 ERROR 42X01: Syntax error: Encountered "<" at line 2, column 12.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values (1 between 2 and 5);
 ERROR 42X01: Syntax error: Encountered "between" at line 2, column 11.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select (c1 between 1 and 3) from t1;
 ERROR 42X01: Syntax error: Encountered "between" at line 2, column 12.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- boolean expression LIKE disallowed in values and select clause
 prepare ll1 as 'values ''asdf'' like ?';
 ERROR 42X01: Syntax error: Encountered "like" at line 1, column 15.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> prepare ll1 as 'select ''asdf'' like ? from t1';
 ERROR 42X01: Syntax error: Encountered "like" at line 1, column 15.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> prepare ll15 as 'values ''%foobar'' like ''Z%foobar'' escape ?';
 ERROR 42X01: Syntax error: Encountered "like" at line 1, column 18.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> prepare ll15 as 'select ''%foobar'' like ''Z%foobar'' escape ? from t1';
 ERROR 42X01: Syntax error: Encountered "like" at line 1, column 18.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values '%foobar' like '%%foobar' escape '%';
 ERROR 42X01: Syntax error: Encountered "like" at line 2, column 18.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select '_foobar' like '__foobar' escape '_' from t1;
 ERROR 42X01: Syntax error: Encountered "like" at line 2, column 18.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> prepare ll4 as 'values org.apache.derbyTesting.functionTests.tests.lang.CharUTF8::getMaxDefinedCharAsString()
like ?';
 ERROR 42X01: Syntax error: Encountered "like" at line 1, column 95.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- boolean expression INSTANCEOF disallowed in values and select clause
 values 1 instanceof int;
 ERROR 42X01: Syntax error: Encountered "instanceof" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 1 instanceof java.lang.Integer between false and true;
 ERROR 42X01: Syntax error: Encountered "instanceof" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- boolean expression EXISTS disallowed in values and select clause
 select exists (values 1) from t1;
 ERROR 42X01: Syntax error: Encountered "exists" at line 2, column 8.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> values exists (values 2);
 ERROR 42X80: VALUES clause must contain at least one element. Empty elements are not allowed.

 ij> -- boolean expression EXISTS diallowed in update set clause too
 update t1 set c11 = exists(values 1);
 ERROR 42X01: Syntax error: Encountered "exists" at line 2, column 21.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- ?: not supported anymore
 values not true ? false : true;
 ERROR 42X80: VALUES clause must contain at least one element. Empty elements are not allowed.

 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select not true ? false : true from t1;
 ERROR 42X01: Syntax error: Encountered "not" at line 2, column 8.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values 1 ? 2 : 3;
 ERROR 42X01: Syntax error: Encountered "?" at line 2, column 10.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select c1 is null ? true : false from t1;
 ERROR 42X01: Syntax error: Encountered "is" at line 2, column 11.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select new java.lang.Integer(c1 is null ? 0 : c1) from t1;
 ERROR 42X01: Syntax error: Encountered "is" at line 2, column 33.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select c1, (c1=1? cast(null as int) : c1) is null from t1;
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 15.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- try few tests in cloudscape mode for boolean expressions in values or select clause
 -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get
correct column number in error message in both SPS and non-SPS mode
 values new java.lang.String() = '';
 ERROR 42X01: Syntax error: java.lang.String.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 values new java.lang.String('asdf') = 'asdf';
 ERROR 42X01: Syntax error: java.lang.String.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select new java.lang.String() = '' from t1;
 ERROR 42X01: Syntax error: java.lang.String.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so
we get correct column number in error message in both SPS and non-SPS mode
 select new java.lang.String('asdf') = 'asdf' from t1;
 ERROR 42X01: Syntax error: java.lang.String.
+Issue the 'help' command for general information on IJ command syntax.
+Any unrecognized commands are treated as potential SQL commands and executed directly.
+Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
 ij> -- DERBY-1587
 VALUES INTEGER(1.5);
 1          
@@ -580,4 +727,4 @@
 ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
 ij> drop table t3;
 0 rows inserted/updated/deleted
-ij> 
\ No newline at end of file
+ij> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij2.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij2.sql?rev=694954&r1=694953&r2=694954&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij2.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij2.sql
Sat Sep 13 07:26:16 2008
@@ -126,4 +126,8 @@
 
 show connections;
 
+-- DERBY-3408: Unknown command error should suggest referring to server docs:
+show schema;
+xxx;
+
 

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java?rev=694954&r1=694953&r2=694954&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java Sat Sep 13
07:26:16 2008
@@ -554,8 +554,12 @@
 			errorCode = "";
 		}
 
+		boolean syntaxErrorOccurred = false;
 		for (; e!=null; e=e.getNextException())
 		{
+			sqlState = e.getSQLState();
+			if ("42X01".equals(sqlState))
+				syntaxErrorOccurred = true;
 			/*
 			** If we are to throw errors, then throw the exceptions
 			** that aren't in the ignoreErrors list.  If
@@ -564,7 +568,6 @@
 			*/
 		 	if (ignoreErrors != null) 
 			{
-				sqlState = e.getSQLState();
 				if ((sqlState != null) &&
 					(ignoreErrors.get(sqlState) != null))
 				{
@@ -585,6 +588,8 @@
 		{
 			throw new ijFatalException(fatalException);
 		}
+		if (syntaxErrorOccurred)
+			out.println(langUtil.getTextMessage("IJ_SuggestHelp"));
 	}
 
 	/**

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties?rev=694954&r1=694953&r2=694954&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties Sat Sep 13
07:26:16 2008
@@ -185,6 +185,7 @@
 IJ_EncoAtLineColu=Encountered "{0}" at line {1}, column {2}
 # From TokenMgrError.java
 IJ_LexiErroAtLine0Colu1=Lexical error at line {0}, column {1}.  Encountered: {2}after :"{3}"
+IJ_SuggestHelp=Issue the 'help' command for general information on IJ command syntax.\nAny
unrecognized commands are treated as potential SQL commands and executed directly.\nConsult
your DBMS server reference documentation for details of the SQL syntax supported by your server.
 TL_incorCase=Case of the Derby attribute is incorrect.
 TL_unknownAtt=Attribute is unknown to Derby.
 TL_trueFalse=Value should be set to true/false.



Mime
View raw message