File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed 
src/main/java/org/mariadb/jdbc/client/impl Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,11 @@ public static long initializeClientCapabilities(
147147 | Capabilities .CLIENT_SESSION_TRACK 
148148 | Capabilities .MARIADB_CLIENT_EXTENDED_TYPE_INFO ;
149149
150-  if  (Boolean .parseBoolean (configuration .nonMappedOptions ().getProperty ("enableSkipMeta" , "true" ))
150+  // since skipping metadata is only available when using binary protocol, 
151+  // only set it when server permit it and using binary protocol 
152+  if  (configuration .useServerPrepStmts ()
153+  && Boolean .parseBoolean (
154+  configuration .nonMappedOptions ().getProperty ("enableSkipMeta" , "true" ))
151155 && (serverCapabilities  & Capabilities .MARIADB_CLIENT_CACHE_METADATA ) != 0 ) {
152156 capabilities  |= Capabilities .MARIADB_CLIENT_CACHE_METADATA ;
153157 }
                                 You can’t perform that action at this time. 
               
                  
0 commit comments