~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/mysql_protocol.cc

  • Committer: Andrew Hutchings
  • Date: 2010-09-08 19:03:09 UTC
  • mfrom: (1750 staging)
  • mto: (1750.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1751.
  • Revision ID: andrew@linuxjedi.co.uk-20100908190309-mya1nu7xvo1fpvk8
Merge trunk into branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
#define PROTOCOL_VERSION 10
41
41
 
42
 
namespace drizzled
43
 
{
44
 
extern uint32_t global_thread_id;
45
 
}
46
 
 
47
42
static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024;
48
43
static uint32_t port;
49
44
static uint32_t connect_timeout;
678
673
    *end= 0;
679
674
    end++;
680
675
 
681
 
    int4store((unsigned char*) end, global_thread_id);
 
676
    int4store((unsigned char*) end, session->variables.pseudo_thread_id);
682
677
    end+= 4;
683
678
 
684
679
    /* We don't use scramble anymore. */
887
882
  uint32_t pointer_seed;
888
883
  memcpy(&pointer_seed, &pointer, 4);
889
884
  uint32_t random1= (seed + pointer_seed) % random_max;
890
 
  uint32_t random2= (seed + global_thread_id + net.vio->sd) % random_max;
 
885
  uint32_t random2= (seed + session->variables.pseudo_thread_id + net.vio->sd) % random_max;
891
886
 
892
887
  for (char *end= scramble + SCRAMBLE_LENGTH; scramble != end; scramble++)
893
888
  {