273
620
if (searchNode(prevNode->second)) {
621
if (prevNode->second) {
622
deleteRowFromAllIndexedColumns(prevNode->second);
623
deleteNodeFromSLL();
624
}
625
}
626
}
627
}
628
}
629
stats.records--;
630
631
DBUG_RETURN(0);
632 }
Listing 13-12 shows how the deleteRowFromAllIndexedColumns() function deletes
the value from the index containers using the deleteRow() method.
Listing 13-12. ha_pmdk.cc – Deletes an entry from the index containers
634 void ha_pmdk::deleteRowFromAllIndexedColumns(const persistent_ptr
&row)
635 {
...
643
if (db->getTable(table->s->table_name.str, &tab)) {
644
if (tab->getKeys(field->field_name.str, &k)) {
645
k->deleteRow(row);
646
}
...
The deleteNodeFromSLL() method deletes the object from the linked list residing on
persistent memory using libpmemobj transactions, as shown in Listing 13-13.
Chapter 13 enabling persistenCe Using a real-World appliCation
Précédent

- 297/457

Suivant