|
|
@@ -195,7 +195,16 @@ func NewSession(cfg ClusterConfig) (*Session, error) {
|
|
|
return nil, ErrNoConnectionsStarted
|
|
|
}
|
|
|
|
|
|
- s.useSystemSchema = hosts[0].Version().Major >= 3
|
|
|
+ // If we disable the initial host lookup, we need to still check if the
|
|
|
+ // cluster is using the newer system schema or not... however, if control
|
|
|
+ // connection is disable, we really have no choice, so we just make our
|
|
|
+ // best guess...
|
|
|
+ if !cfg.disableControlConn && cfg.DisableInitialHostLookup {
|
|
|
+ newer, _ := checkSystemSchema(s.control)
|
|
|
+ s.useSystemSchema = newer
|
|
|
+ } else {
|
|
|
+ s.useSystemSchema = hosts[0].Version().Major >= 3
|
|
|
+ }
|
|
|
|
|
|
return s, nil
|
|
|
}
|