~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_connect.cc

Merged fix from andrey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
    return 1; /* The error is set by alloc(). */
331
331
 
332
332
  thd->client_capabilities= uint2korr(net->read_pos);
333
 
  if (thd->client_capabilities & CLIENT_PROTOCOL_41)
334
 
  {
335
 
    thd->client_capabilities|= ((ulong) uint2korr(net->read_pos+2)) << 16;
336
 
    thd->max_client_packet_length= uint4korr(net->read_pos+4);
337
 
    thd_init_client_charset(thd, (uint) net->read_pos[8]);
338
 
    thd->update_charset();
339
 
    end= (char*) net->read_pos+32;
340
 
  }
341
 
  else
342
 
  {
343
 
    thd->max_client_packet_length= uint3korr(net->read_pos+2);
344
 
    end= (char*) net->read_pos+5;
345
 
  }
 
333
 
 
334
 
 
335
  thd->client_capabilities|= ((ulong) uint2korr(net->read_pos+2)) << 16;
 
336
  thd->max_client_packet_length= uint4korr(net->read_pos+4);
 
337
  thd_init_client_charset(thd, (uint) net->read_pos[8]);
 
338
  thd->update_charset();
 
339
  end= (char*) net->read_pos+32;
 
340
 
346
341
  /*
347
342
    Disable those bits which are not supported by the server.
348
343
    This is a precautionary measure, if the client lies. See Bug#27944.