~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_extra.c

  • Committer: Monty Taylor
  • Date: 2008-08-22 04:35:12 UTC
  • mto: (365.1.2 drizzle)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: monty@inaugust.com-20080822043512-3vafw99x3vv97d39
INT32_MAX stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Extra functions we want to do with a database */
17
17
/* - Set flags for quicker databasehandler */
18
18
/* - Set databasehandler to normal */
19
19
/* - Reset recordpointers as after open database */
20
20
 
21
 
#include "heap_priv.h"
22
 
 
23
 
using namespace drizzled;
 
21
#include "heapdef.h"
24
22
 
25
23
static void heap_extra_keyflag(register HP_INFO *info,
26
24
                               enum ha_extra_function function);
53
51
int heap_reset(HP_INFO *info)
54
52
{
55
53
  info->lastinx= -1;
56
 
  info->current_record= UINT32_MAX;
 
54
  info->current_record= (uint32_t) ~0L;
57
55
  info->current_hash_ptr=0;
58
56
  info->update=0;
59
57
  info->next_block=0;
67
65
static void heap_extra_keyflag(register HP_INFO *info,
68
66
                               enum ha_extra_function function)
69
67
{
70
 
  for (uint32_t idx= 0; idx< info->getShare()->keys; idx++)
 
68
  uint  idx;
 
69
 
 
70
  for (idx= 0; idx< info->s->keys; idx++)
71
71
  {
72
72
    switch (function) {
73
73
    case HA_EXTRA_CHANGE_KEY_TO_UNIQUE:
74
 
      info->getShare()->keydef[idx].flag|= HA_NOSAME;
 
74
      info->s->keydef[idx].flag|= HA_NOSAME;
75
75
      break;
76
76
    case HA_EXTRA_CHANGE_KEY_TO_DUP:
77
 
      info->getShare()->keydef[idx].flag&= ~(HA_NOSAME);
 
77
      info->s->keydef[idx].flag&= ~(HA_NOSAME);
78
78
      break;
79
79
    default:
80
80
      break;