![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
Generate the next autoinc based on a snapshot of the session auto_increment_increment and auto_increment_offset variables. More...
#include <ddl0ddl.h>
Public Member Functions | |
| Sequence (THD *thd, ulonglong start_value, ulonglong max_value) noexcept | |
| Constructor.  More... | |
| ~Sequence ()=default | |
| Destructor.  More... | |
| ulonglong | operator++ (int) noexcept | 
| Postfix increment.  More... | |
| bool | eof () const noexcept | 
| Check if the autoinc "sequence" is exhausted.  More... | |
| ddl::Sequence & | operator= (const ddl::Sequence &rhs) noexcept | 
| Assignment operator to copy the sequence values.  More... | |
| ulonglong | last () const noexcept | 
Public Attributes | |
| const ulonglong | m_max_value {} | 
| Maximum column value if adding an AUTOINC column else 0.  More... | |
| ulong | m_increment {} | 
| Value of auto_increment_increment.  More... | |
| ulong | m_offset {} | 
| Value of auto_increment_offset.  More... | |
| ulonglong | m_next_value {} | 
| Next value in the sequence.  More... | |
| bool | m_eof {} | 
| true if no more values left in the sequence  More... | |
Generate the next autoinc based on a snapshot of the session auto_increment_increment and auto_increment_offset variables.
Assignment operator would be used during the inplace_alter_table() phase only
Constructor.
| [in,out] | thd | The session | 
| [in] | start_value | The lower bound | 
| [in] | max_value | The upper bound (inclusive) | 
      
  | 
  default | 
Destructor.
      
  | 
  inlinenoexcept | 
Check if the autoinc "sequence" is exhausted.
      
  | 
  inlinenoexcept | 
      
  | 
  noexcept | 
Postfix increment.
      
  | 
  inlinenoexcept | 
Assignment operator to copy the sequence values.
| [in] | rhs | Sequence to copy from | 
| bool ddl::Sequence::m_eof {} | 
true if no more values left in the sequence
| ulong ddl::Sequence::m_increment {} | 
Value of auto_increment_increment.
| const ulonglong ddl::Sequence::m_max_value {} | 
Maximum column value if adding an AUTOINC column else 0.
Once we reach the end of the sequence it will be set to ~0.
| ulonglong ddl::Sequence::m_next_value {} | 
Next value in the sequence.
| ulong ddl::Sequence::m_offset {} | 
Value of auto_increment_offset.