[
http://issues.apache.org/jira/browse/DERBY-1547?page=comments#action_12429383 ]
V.Narayanan commented on DERBY-1547:
------------------------------------
The four kinds of pattern strings that need to be searched for in the tests
output while solving this are the following
1) JDBC Driver 'Apache Derby Embedded JDBC Driver', version 10.3 (10.3.0.0
alpha - (433210M))
2) Apache Derby Network Server - 10.3.0.0 - (433210M) alpha started and ready
to accept connections
on port 20000 at xxxxxxFILTERED-TIMESTAMPxxxxxGMT
3) Apache Derby Network Server - 10.3.0.0 - (433210M) alpha shutdown at
xxxxxxFILTERED
-TIMESTAMPxxxxxGMT
4) getDatabaseProductVersion(): 10.3.0.0 - (433210M) alpha
5) getDriverVersion(): 10.3.0.0 - (433210M) alpha
2) and 3) are the log messages printed by NetworkServerControlImpl class upon
server startup and shutdown. The start method of the NetworkServerControlImpl
class accepts a PrintWriter object to which it writes the log message.
1) , 4) and 5) are built from the
getDatabaseProductVersion(),getDriverVersion,getDriverMajorVersion(),getDriverMinorVersion().
Solution Steps
--------------
1) To write a util class VersionInformationParser in the
org.apache.derbyTesting.functionTests.util
package.
2) To add a properties file to the same package with the following contents
major=10
minor=3
version=10.3.0.0\ alpha
3) The VersionInformationParser will have 4 verification functions and 4
replace functions
3.a) verification functions
3.a.1) verifyJDBCDriverVersionString - for string type 1)
3.a.2) verifyApacheDerbyNetworkServerString - for types 2) and 3)
3.a.3) verifyProductVersion - for type 4)
3.a.4) verifyDriverVersion - for type 5)
3.b) The replace functions will replace the version information
for e.g.
10.3 (10.3.0.0 alpha - (433210M)) will be replaced by
XXXXXEXPECTED VERSION INFOXXXXXXX
4) The above util class will be used in the tests that print the version
information ,to verify and
mask the version information if it is found to be correct.
5) I will implement the verification and replace functions using substring and
strcmp functions.
The above solution has been based on the suggestions received for this issue in
using a property file as the point where the version information will be stored
so that we no more need to update multiple master files when bumping version
information but only replace one property file.
> Add svn version number to DatabaseMetaData getDatabaseProductVersion and
> getDriverVersion() to improve supportability
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1547
> URL: http://issues.apache.org/jira/browse/DERBY-1547
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.1.3.2
> Reporter: Kathey Marsden
> Assigned To: V.Narayanan
> Priority: Minor
> Fix For: 10.2.1.0
>
> Attachments: DERBY-1547_v1.diff, DERBY-1547_v1.stat
>
>
> getDatabaseProductVersion and getDriverVersion() report only the four digit
> Derby version number and not the svn build number. It would be useful to
> return the full version including the build number as sysinfo does: e.g.
> "10.1.2.4 - (392472)", That way it will be clear from application logs that
> collect this information exactly what revision level they are running if they
> are using rolled up fixes on the maintenance branch between releases.
> There may be risk in doing this however if applications are parsing the
> version information, but hopefully they will use getDatabaseMajorVersion() ,
> getDatbaseMinorVersion, getDriverMajorVersion, and getDriverMinorVersion for
> such proccessing.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira