db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [PATCH] re jira 45 - test master updates...
Date Sat, 13 Nov 2004 01:58:08 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
I would appreciate if you can post this patch as as attachment...
Extracting in-lined patches doesn't work well ...

Satheesh

myrnap wrote:

> Now that there are tests, and svn 57487 was committed for jira 45, 2
master files need to be updated.
>
> As of now, updates to tests and masters will go with the patch that
changes functionality, but in this case there was a timing problem...
>
> Index: java/testing/org/apache/derbyTesting/functionTests/master/LOB.out
> ===================================================================
> ---
java/testing/org/apache/derbyTesting/functionTests/master/LOB.out   
(revision 57534)
> +++
java/testing/org/apache/derbyTesting/functionTests/master/LOB.out   
(working copy)
> @@ -239,7 +239,13 @@
> ij> select * from b where b like cast('0102%' as blob(10));
> ERROR 42846: Cannot convert types 'CHAR' to 'BLOB'.
> ij> select * from c where c like cast('12%' as clob(10));
> -ERROR 42884: No authorized routine named 'LIKE' of type 'FUNCTION'
having compatible arguments was found.
> +C   +-----
> +1234
> +12345
> +1234
> +12345
> +1234&
> ij> select * from n where n like cast('12%' as nclob(10));
> ERROR 0A000: Feature not implemented: NCLOB.
> ij> -- cleanup
> Index:
java/testing/org/apache/derbyTesting/functionTests/master/dynamicLikeOptimization.out
> ===================================================================
> ---
java/testing/org/apache/derbyTesting/functionTests/master/dynamicLikeOptimization.out   
(revision 57534)
> +++
java/testing/org/apache/derbyTesting/functionTests/master/dynamicLikeOptimization.out   
(working copy)
> @@ -86,7 +86,7 @@
> 1         ij> -- match
> select 1 from t1  where 'asdf' like 'a%' escape cast(null as char);
> -ERROR 42884: No authorized routine named 'LIKE' of type 'FUNCTION'
having compatible arguments was found.
> +ERROR 22501: An ESCAPE clause of NULL returns undefined results and
is not allowed.
> ij> -- error NULL escape
> prepare ll2 as 'select 1 from t1 where ''%foobar'' like ? escape ?';
> ij> execute ll2 using 'values (''Z%foobar'', ''Z'') ';
>
>
>-------------------------
>
>Index:
java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
>===================================================================
>---
java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java   
(revision 57450)
>+++
java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java   
(working copy)
>@@ -157,7 +157,8 @@
>             throw
StandardException.newException(SQLState.LANG_DB2_LIKE_SYNTAX_ERROR);
>
>         // pattern must be a string or a parameter
>-        if (!(leftOperand instanceof CharConstantNode) &&
!(leftOperand.isParameterNode()))
>+
>+        if (!(leftOperand.isParameterNode()) &&
!(leftOperand.getTypeId().isStringTypeId()))
>             throw
StandardException.newException(SQLState.LANG_DB2_FUNCTION_INCOMPATIBLE,
>                                                      "LIKE", "FUNCTION");
>
>@@ -169,7 +170,9 @@
>         }
>
>         // escape must be a string or a parameter
>-        if (rightOperand != null && !(rightOperand instanceof
CharConstantNode) && !(rightOperand.isParameterNode()))
>+        if ((rightOperand != null) &&
>+            !(rightOperand.isParameterNode()) &&
>+            !(rightOperand.getTypeId().isStringTypeId()))
>         {
>             throw
StandardException.newException(SQLState.LANG_DB2_FUNCTION_INCOMPATIBLE,
>                                          "LIKE", "FUNCTION");
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFBlWovENVNIY6DZ7ERAlRAAJ90z0sOpC7K8gNYSO5aW6vuE11J+gCghKqq
6zY9IGLPR+yNK7Uss37Pqv4=
=wfxh
-----END PGP SIGNATURE-----


Mime
View raw message