~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

  • Committer: Monty Taylor
  • Date: 2008-12-08 20:28:18 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208202818-lridvunkav8c2hii
Fixed a my_strndup -> strdup oops.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2226
2226
    memset(tmp, 0, sizeof(statement));
2227
2227
    count++;
2228
2228
    tmp->length= (size_t)(retstr - ptr);
2229
 
    tmp->string= strdup(ptr);
 
2229
    tmp->string= (char *)malloc(tmp->length + 1);
 
2230
    memcpy(tmp->string, ptr, tmp->length);
 
2231
    tmp->string[tmp->length]= 0;
2230
2232
    ptr+= retstr - ptr + 1;
2231
2233
    if (isspace(*ptr))
2232
2234
      ptr++;
2235
2237
  if (ptr != script+length)
2236
2238
  {
2237
2239
    tmp->length= (size_t)((script + length) - ptr);
2238
 
    tmp->string= strdup(ptr);
 
2240
    tmp->string= (char *)malloc(tmp->length + 1);
 
2241
    memcpy(tmp->string, ptr, tmp->length);
 
2242
    tmp->string[tmp->length]= 0;
2239
2243
    count++;
2240
2244
  }
2241
2245