InnoDB Plugin  1.0
Public Member Functions | Data Fields
ib_sequence_t Struct Reference

#include <handler0alter.h>

Public Member Functions

 ib_sequence_t (THD *thd, ulonglong start_value, ulonglong max_value)
ulonglong operator++ (int) UNIV_NOTHROW
bool eof () const UNIV_NOTHROW
ulonglong last () const UNIV_NOTHROW

Data Fields

const ulonglong m_max_value
ulong m_increment
ulong m_offset
ulonglong m_next_value
bool m_eof

Detailed Description

Generate the next autoinc based on a snapshot of the session

auto_increment_increment and auto_increment_offset variables.

Constructor & Destructor Documentation

ib_sequence_t::ib_sequence_t ( THD *  thd,
ulonglong  start_value,
ulonglong  max_value 
)
Parameters
thd- the session
start_value- the lower bound
max_value- the upper bound (inclusive)

Member Function Documentation

bool ib_sequence_t::eof ( ) const
inline
Check if the autoinc "sequence" is exhausted.
Returns
true if the sequence is exhausted
ulonglong ib_sequence_t::last ( ) const
inline
Returns
the next value in the sequence
ulonglong ib_sequence_t::operator++ ( int  )

Postfix increment

Returns
the value to insert

Field Documentation

bool ib_sequence_t::m_eof

true if no more values left in the sequence

ulong ib_sequence_t::m_increment

Value of auto_increment_increment

const ulonglong ib_sequence_t::m_max_value
Maximum calumn value if adding an AUTOINC column else 0. Once

we reach the end of the sequence it will be set to ~0.

ulonglong ib_sequence_t::m_next_value

Next value in the sequence

ulong ib_sequence_t::m_offset

Value of auto_increment_offset


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