MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

Public Attributes

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.

Definition at line 70 of file handler0alter.h.

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

Definition at line 85 of file handler0alter.h.

ulonglong ib_sequence_t::last ( ) const
inline
Returns
the next value in the sequence

Definition at line 92 of file handler0alter.h.

UNIV_INTERN ulonglong ib_sequence_t::operator++ ( int  )

Postfix increment

Returns
the value to insert

Postfix increment

Returns
the next value to insert

Definition at line 5835 of file handler0alter.cc.

Here is the call graph for this function:

Member Data Documentation

bool ib_sequence_t::m_eof

true if no more values left in the sequence

Definition at line 113 of file handler0alter.h.

ulong ib_sequence_t::m_increment

Value of auto_increment_increment

Definition at line 104 of file handler0alter.h.

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.

Definition at line 101 of file handler0alter.h.

ulonglong ib_sequence_t::m_next_value

Next value in the sequence

Definition at line 110 of file handler0alter.h.

ulong ib_sequence_t::m_offset

Value of auto_increment_offset

Definition at line 107 of file handler0alter.h.


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