thswlsqls opened a new issue, #39101:
URL: https://github.com/apache/shardingsphere/issues/39101

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master @ 620e40a33c3 / 5.5.4-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Both (kernel-level)
   
   ### Expected behavior
   On Oracle 18c and later the metadata loader should select the 
`IDENTITY_COLUMN` and `COLLATION` columns, mark identity columns as generated, 
and mark `_CS` collated columns as case sensitive.
   
   ### Actual behavior
   On those versions both columns are omitted from the SELECT, identity columns 
load as `generated=false`, and every column loads as `caseSensitive=false`.
   
   ### Reason analyze (If you can)
   `OracleMetaDataLoader.versionContainsCollation()` and 
`versionContainsIdentityColumn()` 
(metadata/data/loader/OracleMetaDataLoader.java) compare major and minor 
independently: `getDatabaseMajorVersion() >= 12 && getDatabaseMinorVersion() >= 
N`. Oracle 18c and later report `getDatabaseMinorVersion() = 0`, so the minor 
check is always false and the version gate never passes. A lexicographic 
comparison (`major > 12 || major == 12 && minor >= N`) is required, matching 
the major-based gating already used by 
`SQLServerMetaDataLoader.versionContainsHiddenColumn()`.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   Load table metadata from an Oracle 19c database; identity and collation 
attributes are missing on the loaded columns.
   
   ### Example codes for reproduce this issue (such as a github link).
   N/A
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to