You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2010/01/07 23:22:54 UTC

[jira] Commented: (DERBY-4490) SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY unexpectedly returns NULL when used in SELECT

    [ https://issues.apache.org/jira/browse/DERBY-4490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797812#action_12797812 ] 

Mamta A. Satoor commented on DERBY-4490:
----------------------------------------

I did little more testing with this and it appears that the select works when there is only one row in the values table. eg
ij> select p, syscs_util.syscs_get_database_property(p) from (values 'DataDictionaryVersion') props(p);
P                    |2
------------------------------------------------------------------------------------------------------------------------------------------------------
DataDictionaryVersion|10.6

It also works when there is more than one row but they are the same property ''DataDictionaryVersion'' eg
ij> select p, syscs_util.syscs_get_database_property(p) from (values 'DataDictionaryVersion', 'DataDictionaryVersion') props(p);
P                    |2
------------------------------------------------------------------------------------------------------------------------------------------------------
DataDictionaryVersion|10.6
DataDictionaryVersion|10.6

But as Knut pointed out, when there are 2 rows (irrespective of the order of the rows), we do not get correct value for 'DataDictionaryVersion'. eg
ij> select p, syscs_util.syscs_get_database_property(p) from (values 'DataDictionaryVersion', 'derby.database.collation') props(p);
P                       |2
---------------------------------------------------------------------------------------------------------------------------------------------------------
DataDictionaryVersion   |NULL
derby.database.collation|UCS_BASIC
ij> select p, syscs_util.syscs_get_database_property(p) from (values 'derby.database.collation', 'DataDictionaryVersion') props(p);
P                       |2
---------------------------------------------------------------------------------------------------------------------------------------------------------
derby.database.collation|UCS_BASIC
DataDictionaryVersion   |NULL



> SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY unexpectedly returns NULL when used in SELECT
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-4490
>                 URL: https://issues.apache.org/jira/browse/DERBY-4490
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>
> I see the following values returned when invoking SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY on its own:
> ij> values syscs_util.syscs_get_database_property('derby.database.collation');
> 1
> --------------------
> UCS_BASIC
> 1 row selected
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');
> 1
> ---------------------
> 10.6
> 1 row selected
> But when I query both properties at the same time, DataDictionaryVersion comes out as NULL:
> ij> select p, syscs_util.syscs_get_database_property(p) from (values 'derby.database.collation', 'DataDictionaryVersion') props(p);
> P                       |2
> ------------------------------------------------------------
> derby.database.collation|UCS_BASIC
> DataDictionaryVersion   |NULL
> 2 rows selected

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.