MySQL 9.1.0
Source Code Documentation
|
Unique_on_insert – similar to above, but rejects duplicates on insert, not just on read of the final result. More...
#include <uniques.h>
Public Member Functions | |
Unique_on_insert (uint size) | |
bool | unique_add (void *ptr) |
Add row id to the filter. More... | |
bool | init () |
Initialize duplicate filter - allocate duplicate weedout tmp table. More... | |
void | reset (bool reinit) |
Reset filter - drop all rowid records. More... | |
void | cleanup () |
Cleanup unique filter. More... | |
Private Attributes | |
uint | m_size |
Element size. More... | |
TABLE * | m_table {nullptr} |
Duplicate weedout tmp table. More... | |
Unique_on_insert – similar to above, but rejects duplicates on insert, not just on read of the final result.
To achieve this values are inserted into mem tmp table which uses index to detect duplicate keys. When memory buffer is full, tmp table is dumped to a disk-based tmp table.
|
inline |
void Unique_on_insert::cleanup | ( | void | ) |
Cleanup unique filter.
bool Unique_on_insert::init | ( | void | ) |
Initialize duplicate filter - allocate duplicate weedout tmp table.
void Unique_on_insert::reset | ( | bool | reinit | ) |
Reset filter - drop all rowid records.
reinit | Whether to restart index scan |
bool Unique_on_insert::unique_add | ( | void * | ptr | ) |
Add row id to the filter.
ptr | pointer to the rowid |
|
private |
Element size.