code: func (key *pstmtPlanCacheKey) Hash() []byte {
  	if len(key.hash) == 0 {
  		var (
  			dbBytes    = hack.Slice(key.database)
  			bufferSize = len(dbBytes) + 8*6
  		)
  		if key.hash == nil {
  			key.hash = make([]byte, 0, bufferSize)
  		}
  		key.hash = append(key.hash, dbBytes...)
  		key.hash = codec.EncodeInt(key.hash, int64(key.connID))
  		key.hash = codec.EncodeInt(key.hash, int64(key.pstmtID))
  		key.hash = codec.EncodeInt(key.hash, int64(key.snapshot))
  		key.hash = codec.EncodeInt(key.hash, key.schemaVersion)
  		key.hash = codec.EncodeInt(key.hash, int64(key.sqlMode))
  		key.hash = codec.EncodeInt(key.hash, int64(key.timezoneOffset))
  	}
  	return key.hash
  }
docs: // Hash implements Key interface.