~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Monty Taylor
  • Date: 2009-06-09 20:24:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1060.
  • Revision ID: mordred@inaugust.com-20090609202400-66bk0d9pvc605ndp
Went to 4 byte encoding instead of three.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
      }
120
120
      /* We've found an escaped char - skip the @ */
121
121
      from++;
122
 
      /* There will be a three-position hex-char version of the char */
123
 
      for (int x=2; x >= 0; x--)
 
122
      /* There will be a four-position hex-char version of the char */
 
123
      for (int x=3; x >= 0; x--)
124
124
      {
125
125
        if (*from >= '0' && *from <= '9')
126
126
          to[length] += ((*from++ - '0') << (4 * x));
165
165
      continue;
166
166
    }
167
167
   
168
 
    if (length + 4 >= to_length)
 
168
    if (length + 5 >= to_length)
169
169
      return true;
170
170
 
171
171
    /* We need to escape this char in a way that can be reversed */
172
172
    to[length++]= '@';
 
173
    to[length++]= hexchars[(*from >> 12) & 15];
173
174
    to[length++]= hexchars[(*from >> 8) & 15];
174
175
    to[length++]= hexchars[(*from >> 4) & 15];
175
176
    to[length]= hexchars[(*from) & 15];