diffstat and detailed patch comments (derby-5357-2):
impl/sql/execute/JarUtil.java | 153 +++++++++++++++++++++--
impl/sql/catalog/DataDictionaryImpl.java | 85 ++++++++++++
impl/store/raw/RawStore.java | 57 ++++++--
iapi/sql/dictionary/DataDescriptorGenerator.java | 38 +++--
iapi/services/io/FileUtil.java | 16 ++
iapi/store/access/FileResource.java | 5
impl/db/BasicDatabase.java | 3
impl/sql/catalog/DD_Version.java | 7 +
impl/store/raw/data/RFResource.java | 8 +
mkExternalName now always takes uuid as argument.
- mkExternalNameInternal: used during upgrade to be able to construct both old an new style names
- upgradeJar: upgrade one jar file to new style (>= 10.9)
- removeOldDirs: Upgrade code: Remove the old directories names with contents (pre-10.9 style).
- getAllSysfileDescriptors: used by upgrade code: Return a list of all
s in SYSFILES scan.
- upgradeJarStorage: used by upgrade code. Called by the upgrade code to upgrade the way we store jar files in the database. We now use UUID as part of the file name and sanitize the SQL (schema, schema object) parts of the file name to avoid problems with path delimiters. Also, we henceforth use no schema subdirectories since there is no chance of name collision with the UUID.
Modified backup code to handle new as well as old scheme (in soft
- sanitizeSqlIdAsFilename: Since quoted SQL identifiers may contain any character, we cannot use an SQL identifier as a file name unconditionally. Return a safe (unexploitable) file name by replacing '/' or '\' with underscore, so one can't access a non-intended directory. <em>Note</em>: we need to replace both to make database portable from Windows to *nix or vice versa.
- getAsFile(String name) to be able to delete old directories during upgrade.
Add a line to call upgradeJarStorage when hard upgrading