1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

RB-Tree indexes support in HEAP tables

Renamed _hp_func  ->  hp_func
mi_key_cmp moved to /mysys/my_handler.c
New tests for HEAP tables
This commit is contained in:
bar@gw.udmsearch.izhnet.ru
2002-04-25 13:36:55 +05:00
parent c917658988
commit eab2893dac
54 changed files with 2361 additions and 748 deletions

View File

@ -309,10 +309,10 @@ void field_str::add()
{
if (res != &s)
s.copy(*res);
if (!tree_search(&tree, (void*) &s)) // If not in tree
if (!tree_search(&tree, (void*) &s, tree.custom_arg)) // If not in tree
{
s.copy(); // slow, when SAFE_MALLOC is in use
if (!tree_insert(&tree, (void*) &s, 0))
if (!tree_insert(&tree, (void*) &s, 0, tree.custom_arg))
{
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);
@ -411,7 +411,7 @@ void field_real::add()
if (room_in_tree)
{
if (!(element = tree_insert(&tree, (void*) &num, 0)))
if (!(element = tree_insert(&tree, (void*) &num, 0, tree.custom_arg)))
{
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);
@ -464,7 +464,7 @@ void field_longlong::add()
if (room_in_tree)
{
if (!(element = tree_insert(&tree, (void*) &num, 0)))
if (!(element = tree_insert(&tree, (void*) &num, 0, tree.custom_arg)))
{
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);
@ -518,7 +518,7 @@ void field_ulonglong::add()
if (room_in_tree)
{
if (!(element = tree_insert(&tree, (void*) &num, 0)))
if (!(element = tree_insert(&tree, (void*) &num, 0, tree.custom_arg)))
{
room_in_tree = 0; // Remove tree, out of RAM ?
delete_tree(&tree);