~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_clear.cc

  • Committer: Brian Aker
  • Date: 2010-02-11 22:43:58 UTC
  • Revision ID: brian@gaz-20100211224358-y0gdvnat2ahg4c1e
Disabling support for memcached plugins until we can test for version of
memcached.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  database remains open.
20
20
*/
21
21
 
22
 
#include "heapdef.h"
 
22
#include "heap_priv.h"
 
23
 
 
24
using namespace drizzled;
 
25
 
 
26
static void hp_clear_keys(HP_SHARE *info);
23
27
 
24
28
void heap_clear(HP_INFO *info)
25
29
{
36
40
  return;
37
41
}
38
42
 
39
 
 
40
 
/*
41
 
  Clear all keys.
42
 
 
43
 
  SYNOPSIS
44
 
    heap_clear_keys()
45
 
    info      A pointer to the heap storage engine HP_INFO struct.
46
 
 
47
 
  DESCRIPTION
48
 
    Delete all trees of all indexes and leave them empty.
49
 
 
50
 
  RETURN
51
 
    void
52
 
*/
53
 
 
54
 
void heap_clear_keys(HP_INFO *info)
55
 
{
56
 
  hp_clear(info->s);
57
 
}
58
 
 
59
 
 
60
43
/*
61
44
  Clear all keys.
62
45
 
71
54
    void
72
55
*/
73
56
 
74
 
void hp_clear_keys(HP_SHARE *info)
 
57
static void hp_clear_keys(HP_SHARE *info)
75
58
{
76
 
  uint key;
 
59
  uint32_t key;
77
60
 
78
61
  for (key=0 ; key < info->keys ; key++)
79
62
  {
86
69
    {
87
70
      HP_BLOCK *block= &keyinfo->block;
88
71
      if (block->levels)
89
 
        VOID(hp_free_level(block,block->levels,block->root,(uchar*) 0));
 
72
        hp_free_level(block,block->levels,block->root,(unsigned char*) 0);
90
73
      block->levels=0;
91
74
      block->last_allocated=0;
92
75
      keyinfo->hash_buckets= 0;