~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/command.cc

  • Committer: Mark Atwood
  • Date: 2011-11-20 08:50:16 UTC
  • mfrom: (2461.1.2 drizzle-build)
  • Revision ID: me@mark.atwood.name-20111120085016-2o4no5btx18x2gws
mergeĀ lp:~brianaker/drizzle/libdrizzle-refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
  con->buffer_size-= con->command_size;
121
121
 
122
122
  if (con->command_offset == con->command_total)
 
123
  {
123
124
    drizzle_state_pop(con);
 
125
  }
124
126
  else
 
127
  {
125
128
    return DRIZZLE_RETURN_PAUSE;
 
129
  }
126
130
 
127
131
  return DRIZZLE_RETURN_OK;
128
132
}
159
163
                    + strlen(con->user) + 1
160
164
                    + 1  /* Scramble size */
161
165
                    + DRIZZLE_MAX_SCRAMBLE_SIZE
162
 
                    + strlen(con->db) + 1;
 
166
                    + strlen(con->schema) +1;
163
167
 
164
168
    /* Flush buffer if there is not enough room. */
165
169
    free_size= (size_t)DRIZZLE_MAX_BUFFER_SIZE - (size_t)(start - con->buffer);
174
178
    ptr= start;
175
179
    ptr[3]= 0;
176
180
    if (con->options & DRIZZLE_CON_MYSQL)
177
 
      ptr[4]= (uint8_t)(con->command);
 
181
    {
 
182
      ptr[4]= uint8_t(con->command);
 
183
    }
178
184
    else
179
 
      ptr[4]= (uint8_t)(_command_drizzle_map[con->command]);
 
185
    {
 
186
      ptr[4]= uint8_t(_command_drizzle_map[con->command]);
 
187
    }
180
188
    ptr+= 5;
181
189
 
182
190
    if (con->command == DRIZZLE_COMMAND_CHANGE_USER)