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

Knut Anders Hatlen commented on DERBY-4490:
-------------------------------------------

Thanks for tracking down this bug, Mamta!

It looks like the patch introduces a small asymmetry between 
set_database_property and get_database_property. I don't know if it matters, 
but I thought I should raise the issue. Currently, you can do this:

ij> call syscs_util.syscs_set_database_property('abc   ', 'def');
0 rows inserted/updated/deleted
ij> values syscs_util.syscs_get_database_property('abc   ');
1                                                                               
                                                
--------------------------------------------------------------------------------------------------------------------------------
def                                                                             
                                                

1 row selected

With the patch, the latter statement will return NULL, and there's no way of 
retrieving the value of the property. We could perhaps make the same changes to 
set_database_property so that they continue to be symmetric. Then there's of 
course the compatibility issue that it was previously possible to have one 
property named 'abc ' and another one named 'abc', whereas it won't if we apply 
this fix. I cannot imagine that this incompatibility would bite anyone, though.

> 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
>            Assignee: Mamta A. Satoor
>         Attachments: DERBY4490_null_database_property_diff_patch1.txt, 
> DERBY4490_null_database_property_stat_patch1.txt
>
>
> 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.

Reply via email to