~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/include/ha0ha.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
31
31
#include "hash0hash.h"
32
32
#include "page0types.h"
33
33
#include "buf0types.h"
 
34
#include "rem0types.h"
34
35
 
35
36
/*************************************************************//**
36
37
Looks for an element in a hash table.
37
38
@return pointer to the data of the first hash table node in chain
38
39
having the fold number, NULL if not found */
39
40
UNIV_INLINE
40
 
void*
 
41
const rec_t*
41
42
ha_search_and_get_data(
42
43
/*===================*/
43
44
        hash_table_t*   table,  /*!< in: hash table */
51
52
/*===============================*/
52
53
        hash_table_t*   table,  /*!< in/out: hash table */
53
54
        ulint           fold,   /*!< in: folded value of the searched data */
54
 
        void*           data,   /*!< in: pointer to the data */
 
55
        const rec_t*    data,   /*!< in: pointer to the data */
55
56
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
56
57
        buf_block_t*    new_block,/*!< in: block containing new_data */
57
58
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
58
 
        void*           new_data);/*!< in: new pointer to the data */
 
59
        const rec_t*    new_data);/*!< in: new pointer to the data */
59
60
 
60
61
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
61
62
/** Looks for an element when we know the pointer to the data and
114
115
#endif /* UNIV_SYNC_DEBUG */
115
116
 
116
117
/*************************************************************//**
117
 
Empties a hash table and frees the memory heaps. */
118
 
UNIV_INTERN
119
 
void
120
 
ha_clear(
121
 
/*=====*/
122
 
        hash_table_t*   table); /*!< in, own: hash table */
123
 
 
124
 
/*************************************************************//**
125
118
Inserts an entry into a hash table. If an entry with the same fold number
126
119
is found, its node is updated to point to the new data, and no new node
127
120
is inserted.
138
131
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
139
132
        buf_block_t*    block,  /*!< in: buffer block containing the data */
140
133
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
141
 
        void*           data);  /*!< in: data, must not be NULL */
 
134
        const rec_t*    data);  /*!< in: data, must not be NULL */
142
135
 
143
136
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
144
137
/**
174
167
/*==========================*/
175
168
        hash_table_t*   table,  /*!< in: hash table */
176
169
        ulint           fold,   /*!< in: folded value of the searched data */
177
 
        void*           data);  /*!< in: pointer to the data */
 
170
        const rec_t*    data);  /*!< in: pointer to the data */
178
171
#ifndef UNIV_HOTBACKUP
179
172
/*****************************************************************//**
180
173
Removes from the chain determined by fold all nodes whose data pointer
217
210
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
218
211
        buf_block_t*    block;  /*!< buffer block containing the data, or NULL */
219
212
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
220
 
        void*           data;   /*!< pointer to the data */
 
213
        const rec_t*    data;   /*!< pointer to the data */
221
214
        ulint           fold;   /*!< fold value for the data */
222
215
};
223
216