~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/update_hash.cc

  • Committer: Monty Taylor
  • Date: 2008-12-07 23:42:51 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081207234251-yxtbg06jpylwej29
Finally removed all of the my_malloc stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
      /* Allocate variable */
78
78
      if (entry->length != length)
79
79
      {
80
 
        char *pos= (char*) entry+ ALIGN_SIZE(sizeof(user_var_entry));
81
 
        if (entry->value == pos)
82
 
          entry->value=0;
83
 
        entry->value= (char*) my_realloc(entry->value, length,
84
 
                                         MYF(MY_ALLOW_ZERO_PTR | MY_WME |
85
 
                                             ME_FATALERROR));
86
 
        if (!entry->value)
87
 
          return 1;
 
80
        char *pos= (char*) entry+ ALIGN_SIZE(sizeof(user_var_entry));
 
81
        if (entry->value == pos)
 
82
          entry->value=0;
 
83
        if (!entry->value)
 
84
          entry->value= (char *)malloc(length);
 
85
        else
 
86
          entry->value= (char *)realloc(entry->value, length);
 
87
        if (!entry->value)
 
88
          return 1;
88
89
      }
89
90
    }
90
91
    if (type == STRING_RESULT)