MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PFS_scan Struct Reference

#include <pfs_instr.h>

Public Member Functions

void init (uint random, uint max_size)
bool has_pass () const
void next_pass ()
uint first () const
uint last () const

Detailed Description

Helper to scan circular buffers. Given a buffer of size [0, max_size - 1], and a random starting point in the buffer, this helper returns up to two [first, last -1] intervals that:

  • fit into the [0, max_size - 1] range,
  • have a maximum combined length of at most PFS_MAX_ALLOC_RETRY.

Definition at line 320 of file pfs_instr.h.

Member Function Documentation

uint PFS_scan::first ( ) const
inline

First index for this pass.

Definition at line 344 of file pfs_instr.h.

bool PFS_scan::has_pass ( ) const
inline

Predicate, has a next pass.

Returns
true if there is a next pass to perform.

Definition at line 334 of file pfs_instr.h.

uint PFS_scan::last ( ) const
inline

Last index for this pass.

Definition at line 348 of file pfs_instr.h.

void PFS_scan::next_pass ( )
inline

Iterator, proceed to the next pass.

Definition at line 340 of file pfs_instr.h.


The documentation for this struct was generated from the following files: