docs: @Override
    public ServerPrepareResult prepare(String sql, boolean executeOnMaster) throws SQLException {
  
      cmdPrologue();
      lock.lock();
      try {
        if (options.cachePrepStmts && options.useServerPrepStmts) {
  
          ServerPrepareResult pr = serverPrepareStatementCache.get(database + "-" + sql);
  
          if (pr != null && pr.incrementShareCounter()) {
            return pr;
          }
  
        }
        writer.startPacket(0);
        writer.write(COM_STMT_PREPARE);
        writer.write(sql);
        writer.flush();
  
        ComStmtPrepare comStmtPrepare = new ComStmtPrepare(this, sql);
        return comStmtPrepare.read(reader, eofDeprecated);
      } catch (IOException e) {
        throw handleIoException(e);
      } finally {
        lock.unlock();
      }
    }