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 "Saurabh Kejriwal (JIRA)" <ji...@apache.org> on 2012/06/14 13:55:42 UTC

[jira] [Created] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Saurabh Kejriwal created DERBY-5818:
---------------------------------------

             Summary: values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
                 Key: DERBY-5818
                 URL: https://issues.apache.org/jira/browse/DERBY-5818
             Project: Derby
          Issue Type: Bug
            Reporter: Saurabh Kejriwal


Details 
------------
$ ./sysinfo 
------------------ Java Information ------------------
Java Version:    1.6.0
Java Vendor:     Sun Microsystems Inc.
Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
OS name:         Linux
OS architecture: i386
OS version:      2.6.18-164.0.0.0.1.el5xen
Java user name:  ansverma
Java user home:  /home/ansverma
Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
java.runtime.version: 1.6.0-b09
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0

[/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
[/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
[/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
[/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale :  [English/United States [en_US]]
Found support for locale: [cs]
         version: 10.8.2.2 - (1181258)
Found support for locale: [de_DE]
         version: 10.8.2.2 - (1181258)
Found support for locale: [es]
         version: 10.8.2.2 - (1181258)
Found support for locale: [fr]
         version: 10.8.2.2 - (1181258)
Found support for locale: [hu]
         version: 10.8.2.2 - (1181258)
Found support for locale: [it]
         version: 10.8.2.2 - (1181258)
Found support for locale: [ja_JP]
         version: 10.8.2.2 - (1181258)
Found support for locale: [ko_KR]
         version: 10.8.2.2 - (1181258)
Found support for locale: [pl]
         version: 10.8.2.2 - (1181258)
Found support for locale: [pt_BR]
         version: 10.8.2.2 - (1181258)
Found support for locale: [ru]
         version: 10.8.2.2 - (1181258)
Found support for locale: [zh_CN]
         version: 10.8.2.2 - (1181258)
Found support for locale: [zh_TW]
         version: 10.8.2.2 - (1181258)
------------------------------------------------------




Description
-----------------

I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 


$ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
ij version 10.8
ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
1                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------
10.8                                                                                                                            

1 row selected


It did not return full version information (10.8.2.2) for Derby. 

Expected result =  10.8.2.2
Actual result = 10.8

I want the version details through SQL query.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5818:
---------------------------------

    Issue & fix info: Patch Available
    
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Saurabh Kejriwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400508#comment-13400508 ] 

Saurabh Kejriwal commented on DERBY-5818:
-----------------------------------------

Sorry for delay. I am trying to discover the full version string for (2). 
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404679#comment-13404679 ] 

Bryan Pendleton commented on DERBY-5818:
----------------------------------------

I like the general approach, and the proposed new functionality seems useful.

The term "dictionary_version" doesn't seem ideal to me, as "dictionary" seems
like an internal word, not one which immediately conveys how a user might
think about this version information.

What about something like "database_creation_version" or "persistent_database_version"?

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295833#comment-13295833 ] 

Kathey Marsden commented on DERBY-5818:
---------------------------------------

Note. DERBY-4259  has been logged to provide a publicly documented property for the database format version.  If implemented, the naming convention would be more in line with the other properties, but I think still it would just return 10.8.

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Saurabh Kejriwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404427#comment-13404427 ] 

Saurabh Kejriwal commented on DERBY-5818:
-----------------------------------------

Hi Rick,

Thanks for comments. We got this requirement from other team for Apache Derby prerequisite check. They allow creation, deletion etc of schema based on this prerequisite check. I am checking with them further for more details. In the meantime I have one query. Is it possible to provide backward compatible and pure SQL solution if we go for option 1? Do we have any system table, property etc which stores the version level (4 part or 2 part version id) of derby jar? 

Thanks,
Saurabh
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13403073#comment-13403073 ] 

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

I guess as long as the stored dictionary version in many cases consists of the two most significant digits only, the dictionary_version() function couldn't be relied on to provide the full version number, so it's not that much more useful than reading the property value.

I'd be curious to know what the use case is for getting the full version number of the data dictionary. The usefulness of getting the full version number of the product I can understand, but I have a harder time figuring out what an application could use the last two digits in the dictionary version for, as the dictionary format stays the same when only fixpack or point version is changed.
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405620#comment-13405620 ] 

Bryan Pendleton commented on DERBY-5818:
----------------------------------------

Hi Rick, thanks for explaining the situation so clearly!

I think it would be fine to start by documenting the existing technique (Solution B).

It seems straightforward to include a warning in that documentation saying something
like: "You should only get the DataDictionaryVersion property; you should never try
to set the property to a different value, for that could lead to database corruption."

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13395864#comment-13395864 ] 

Rick Hillegas commented on DERBY-5818:
--------------------------------------

Hi Saurabh,

Knut has explained how to obtain the Derby version string purely via SQL. If this solution does not work for you, could you explain why? That will help us track down or spec a solution which does work. Thanks.
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Saurabh Kejriwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397439#comment-13397439 ] 

Saurabh Kejriwal commented on DERBY-5818:
-----------------------------------------

Thanks for comments. Yes, it would be a pure SQL solution.   

Scenario 
I am adding Derby version prerequisites for our product. I have the option of adding only SQL queries in an xml file. I check queries result and set corresponding error messages based on the result in the same xml file. This xml file will be parsed by some other team. 

Backward compatibility of the solution
Is it possible to update some property say DataDictionaryVersion or any other existing property for complete version string? This way solution will be independent of Derby version.
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404138#comment-13404138 ] 

Rick Hillegas commented on DERBY-5818:
--------------------------------------

Hi Saurabh,

Can you clarify why you need a 4 part version id for the on-disk data rather than the 2 part version id returned by "values syscs_util.syscs_get_database_property('DataDictionaryVersion')"?

Thanks,
-Rick
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396917#comment-13396917 ] 

Dag H. Wanvik commented on DERBY-5818:
--------------------------------------

At least then, I for one, would label it a pure SQL solution :)
What do you think, Saurabh?

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Saurabh Kejriwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13395475#comment-13395475 ] 

Saurabh Kejriwal commented on DERBY-5818:
-----------------------------------------

Thanks for comments. So there is no way to get the complete version string (both major and minor version say 10.8.2.2) in current Apache Derby DB through SQL?
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13395751#comment-13395751 ] 

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

DERBY-3973 shows code that allows you to access DatabaseMetaData methods through SQL. It does require you to add one Java class to your application, though, so it's not a pure SQL solution. Once installed, you can get the database version like this:

ij> values getDatabaseProductVersion();
1                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------
10.8.2.2 - (1181258)                                                                                                            

1 row selected

or

ij> values substr(getDatabaseProductVersion(), 1, locate(' ', getDatabaseProductVersion()));
1                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------
10.8.2.2                                                                                                                        

1 row selected
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5818:
---------------------------------

    Attachment: derby-5818-01-aa-dictionaryVersionFunction.diff

Attaching derby-5818-01-aa-dictionaryVersionFunction.diff. This is a possible approach to adding a supported mechanism to the public api for querying the version level of the on-disk data. If this seems like a useful approach, I can add tests.

The patch adds a new builtin method: dictionary_version(). This method reverses the tricky encoding which DD_Version performs. The decoding is likely to be wrong for databases created with development versions of Derby which are beta but not alpha. I am not convinced that the encoding is a 1-1 mapping when the beta flag is set and I don't think that this edge case is worth puzzling through at this time.

I decided to make dictionary_version() a builtin, schema-less function rather than a function in SYSCS_UTIL. No metadata changes are needed for the first kind of function. That means that you do not have to hard-upgrade to use it. Requiring hard-upgrade in order to determine the version of a database would be self-defeating.

For a newly created 10.10.0.0 database, dictionary_version() returns the string "10.10.0.0 alpha".

I have created databases at many version levels, both read-write versions and read-only versions stored in jar files. See below for the list of versions I hand-tested. For all these versions, I have observed the following when I boot them with this patch:

1) For the read-write databases, dictionary_version() returns the string X.Y

2) For the read-only databases, dictionary_version() returns the string X.Y.Z.W, where X = major, Y = minor, Z = fixpack, and W = point.

These are the versions I hand-tested:

10.0.2.1
10.1.1.0
10.1.2.1
10.1.3.1
10.2.1.6
10.2.2.0
10.2.2.1
10.3.1.4
10.3.2.1
10.3.3.0
10.4.1.3
10.4.2.0
10.4.2.1
10.5.1.1
10.5.2.0
10.5.3.0
10.6.1.0
10.6.2.1
10.7.1.1
10.8.1.2
10.8.1.6
10.8.2.1
10.8.2.2
10.9.1.0

Here, for instance, is a fragment of the result:

ij(CONNECTION20)> connect 'jdbc:derby:db10.4.1.3';
ij(CONNECTION21)> values dictionary_version();
1                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------
10.4                                                                                                                            

1 row selected
ij(CONNECTION21)> connect 'jdbc:derby:jar:(db10.4.1.3.jar)db10.4.1.3';
ij(CONNECTION22)> values dictionary_version();
1                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------
10.4.1.3                                                                                                                        
1 row selected

I would appreciate feedback on whether this approach is worth pursuing.


Touches the following files:

----------

M       java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java

Added a new method to decode a DD_Version into a full version string.

----------

M       java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
M       java/engine/org/apache/derby/catalog/SystemProcedures.java

Added a builtin, schema-less function to call the new DD_Version code.

----------

M       java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
M       java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java

Interface boilerplate.

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396446#comment-13396446 ] 

Dag H. Wanvik commented on DERBY-5818:
--------------------------------------

I guess there are scenarios where adding a stored method to the class path to get this info may be awkward. I think Knut is correct in calling it "not pure SQL".
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396722#comment-13396722 ] 

Rick Hillegas commented on DERBY-5818:
--------------------------------------

Perhaps the issue with this solution is that it is not built into Derby. There was some discussion on DERBY-3973 about shipping DBMDWrapper with the product. Then all of the DatabaseMetaData methods could be called via SQL. Would that be adequate?
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397494#comment-13397494 ] 

Rick Hillegas commented on DERBY-5818:
--------------------------------------

Hi Saurabh,

Thanks for explaining more about the problem. Adding DBMDWrapper to Derby will only help you if the Derby code is at a rev level greater than 10.9.1. The SQL functions you need won't be built into Derby in 10.8.2.2. If you could tolerate shipping DBMDWrapper with your application, then you could get around this issue.

I'm not sure that I understand the problem completely, though. There are two version numbers which you have to be concerned about when you use Derby:

1) The version level of derby.jar. This determines the capabilities of newly created databases.

2) The version level of your particular database. This could be lower than the version level of newly created databases.

Because of soft-upgrade, it is possible that your derby.jar can be at version level 10.9.1 even though your database is still at version 10.2.1. Some 10.9.1 features and bug fixes will be available in your database, but some won't. The ones which won't be available are the ones which require changes to Derby metadata, stored in the database catalogs. That metadata is only changed when you do a hard-upgrade, bringing your database version up to the version of derby.jar.

Are you trying to discover the full version string for (1), (2), or both?

Thanks,
-Rick
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402305#comment-13402305 ] 

Rick Hillegas commented on DERBY-5818:
--------------------------------------

What Saurabh needs is the version level of the on-disk data, not the version level of derby.jar. Note that DatabaseMetaData.getDatabaseProductVersion() returns the version level of derby.jar, not the version level of the on-disk data.

Before continuing this discussion, people may want to read the description of Derby version identifiers found here: http://db.apache.org/derby/papers/versionupgrade.html.

At database creation time, Derby does save the on-disk version as a DD_Version object in the properties conglomerate. This object can be looked up with the key 'DataDictionaryVersion'. The DD_Version object preserves almost all of the version information, although in a tricky encoded format. More specifically, the DD_Version object preserves the full four part major.minor.fixpack.point id plus the beta flag. However, the subversion codeline stamp is not preserved.

Unfortunately, most of this information is clobbered if you boot the database with a higher version than the one which created it. Only the major.minor part of the id is preserved. The fixpack, point, and beta information are lost. The clobbering is done by the following code block in DD_Version.handleMinorRevisionChange(). This code has been part of Derby since it was open-sourced:

			if (softUpgradeRun)
			{
				// log a version that will cause a minor revision change
				// for any subsequent re-boot, including an old Cloudscape version
				fromVersion.minorVersionNumber = 1; // see getJBMSMinorVersionNumber
				lastRun = fromVersion;
			}

            ...

			tc.setProperty(DataDictionary.CORE_DATA_DICTIONARY_VERSION, fromVersion, true);

So if you boot a 10.5.1.1 database using a 10.8.2.2 derby.jar, the database will be silently transformed from the 10.5.1.1 format into a generic 10.5 format. Derby itself will not be able to figure out if the database was created by 10.5.1.1 or 10.5.2.0 or 10.5.3.0.

Note the following additional subtlety: If you boot a database with a lower version of derby.jar than the one which created the database (but still in the same major.minor release family), then the DD_Version information is NOT clobbered. E.g., if you boot a 10.8.2.2 database with 10.8.1.2, then the on-disk version of the data remains at level 10.8.2.2.

An additional subtletly is that the DD_Version object is also not clobbered in a read-only database. So if you create a database with version 10.5.1.1, put it in a jar file, and then boot the jar'd database using 10.8.2.2, the jar'd database remains at version 10.5.1.1.

To summarize:

a) If you boot a read/write database with a later version of Derby than the one used to create the database, then the database is silently transformed to a generic on-disk format, losing all version information other than the generic major.minor number returned by "values syscs_util.syscs_get_database_property('DataDictionaryVersion')".

b) This transformation does not happen if you boot the database with an earlier version of Derby than the one used to create the database. The transformation is also not performed on read-only databases.

But, in general, the very act of inspecting a database may transform it into a generic format. There is no general solution to the problem posed by Saurabh. You cannot count on the on-disk format being anything more specific than the generic major.minor version returned by  "values syscs_util.syscs_get_database_property('DataDictionaryVersion')".

Follow-on questions for Saurabh would be:

i) Why is the 2 part version level (major.minor) of the on-disk data not adequate?

ii) What breaks if you only have a 2 part data version rather than a four part data version (major.minor.fixpack.point)?

Thanks,
-Rick

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295819#comment-13295819 ] 

Dag H. Wanvik commented on DERBY-5818:
--------------------------------------

The reason for this is that the data dictionary format is only changed at major versions. Minor releases are bug fix releases and would not normally change the data dictionary format.
cf http://db.apache.org/derby/papers/versionupgrade.html#Version+Upgrade+Mechanism

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Saurabh Kejriwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13395827#comment-13395827 ] 

Saurabh Kejriwal commented on DERBY-5818:
-----------------------------------------

Thanks Knut for information. Actually my requirement is to have a pure SQL solution for getting the complete version information. For pure SQL solution, Should I file an Enhancement request against Apache Derby?
                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5818) values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405145#comment-13405145 ] 

Rick Hillegas commented on DERBY-5818:
--------------------------------------

Thanks for the feedback, Saurabh and Bryan. If we decide to add a new builtin function, how about calling it something a little shorter, like "database_version()"?

Suppose the new function returns exactly the same information as "values syscs_util.syscs_get_database_property( 'DataDictionaryVersion' )". Then, as Knut notes, does the new function add much value? Maybe we should just document the existing technique of invoking "values syscs_util.syscs_get_database_property( 'DataDictionaryVersion' )".

Here are pro's and con's of the two approaches:

A) Introduce a new database_version() builtin function, which returns a two part major.minor version string:

+ Short and sweet.
- Won't work for old versions of derby.jar (versions before 10.10.1).


B) Document existing syscs_util.syscs_get_database_property( 'DataDictionaryVersion' ) behavior:

+ Works for all versions of derby.jar.
- Exposes an internal key whose name awkwardly violates Derby's conventions for property names.
- Increases (slightly) the risk that someone will accidentally corrupt their database as described by DERBY-5838.


Here are responses to Saurabh's other questions:

Saurabh> Is it possible to provide backward compatible and pure SQL solution if we go for option 1?

Solutions (A) and (B) are both backward compatible, pure SQL approaches which will work with a derby.jar at version 10.10.1 and return the database version as a two part major.minor id. Solution (B) will also work with previous versions of derby.jar.

Saurabh?> Do we have any system table, property etc which stores the version level (4 part or 2 part version id) of derby jar? 

The version of derby.jar isn't stored in any system table or property. You can't query it via any builtin SQL mechanism. The DBMDWrapper solution can be used with old versions of derby.jar (back to 10.4.1). A simpler variation of the DBMDWrapper solution, limited to just the getDatabaseProductVersion(), could be used on older versions of derby.jar. These solutions are SQL-based but not builtin.

What are your thoughts?


Thanks,
-Rick

                
> values syscs_util.syscs_get_database_property('DataDictionaryVersion' ) does not return full version information
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5818
>                 URL: https://issues.apache.org/jira/browse/DERBY-5818
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Saurabh Kejriwal
>         Attachments: derby-5818-01-aa-dictionaryVersionFunction.diff
>
>
> Details 
> ------------
> $ ./sysinfo 
> ------------------ Java Information ------------------
> Java Version:    1.6.0
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> Java classpath:  /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar:/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar
> OS name:         Linux
> OS architecture: i386
> OS version:      2.6.18-164.0.0.0.1.el5xen
> Java user name:  ansverma
> Java user home:  /home/ansverma
> Java user dir:   /scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0-b09
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derby.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbytools.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbynet.jar] 10.8.2.2 - (1181258)
> [/scratch/ansverma/JavaDBnew/db-derby-10.8.2.2-bin/lib/derbyclient.jar] 10.8.2.2 - (1181258)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/United States [en_US]]
> Found support for locale: [cs]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [de_DE]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [es]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [fr]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [hu]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [it]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ja_JP]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ko_KR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pl]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [pt_BR]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [ru]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_CN]
>          version: 10.8.2.2 - (1181258)
> Found support for locale: [zh_TW]
>          version: 10.8.2.2 - (1181258)
> ------------------------------------------------------
> Description
> -----------------
> I am using Derby 10.8.2.2. I want to get derby version details through SQL. I ran following query to retrieve version information. 
> $ java -jar /scratch/ansverma/JavaDBnew//db-derby-10.8.2.2-bin/lib/derbyrun.jar ij
> ij version 10.8
> ij> CONNECT 'jdbc:derby:test2;user=test2;password=test2';
> ij> values syscs_util.syscs_get_database_property('DataDictionaryVersion');    
> 1                                                                                                                               
> --------------------------------------------------------------------------------------------------------------------------------
> 10.8                                                                                                                            
> 1 row selected
> It did not return full version information (10.8.2.2) for Derby. 
> Expected result =  10.8.2.2
> Actual result = 10.8
> I want the version details through SQL query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira