Merge lp:~linuxjedi/drizzle/drizzle-couple-of-fixes into lp:~drizzle-trunk/drizzle/development

Proposed by Andrew Hutchings
Status: Merged
Approved by: Brian Aker
Approved revision: 1726
Merged at revision: 1728
Proposed branch: lp:~linuxjedi/drizzle/drizzle-couple-of-fixes
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 71 lines (+6/-12)
3 files modified
drizzled/session.cc (+3/-0)
plugin/drizzle_protocol/drizzle_protocol.cc (+1/-5)
plugin/mysql_protocol/mysql_protocol.cc (+2/-7)
To merge this branch: bzr merge lp:~linuxjedi/drizzle/drizzle-couple-of-fixes
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+33309@code.launchpad.net

Description of the change

Fix for:

bug#617537 re-connect connectionID is wrong
bug#617534 incorrect error when reconnecting

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/session.cc'
2--- drizzled/session.cc 2010-08-13 18:47:12 +0000
3+++ drizzled/session.cc 2010-08-21 22:37:44 +0000
4@@ -647,6 +647,9 @@
5 if (client->readCommand(&l_packet, &packet_length) == false)
6 return false;
7
8+ if (killed == KILL_CONNECTION)
9+ return false;
10+
11 if (packet_length == 0)
12 return true;
13
14
15=== modified file 'plugin/drizzle_protocol/drizzle_protocol.cc'
16--- plugin/drizzle_protocol/drizzle_protocol.cc 2010-08-12 06:10:25 +0000
17+++ plugin/drizzle_protocol/drizzle_protocol.cc 2010-08-21 22:37:44 +0000
18@@ -36,10 +36,6 @@
19
20 #define PROTOCOL_VERSION 10
21
22-namespace drizzled
23-{
24-extern uint32_t global_thread_id;
25-}
26 namespace po= boost::program_options;
27 using namespace drizzled;
28 using namespace std;
29@@ -678,7 +674,7 @@
30 *end= 0;
31 end++;
32
33- int4store((unsigned char*) end, global_thread_id);
34+ int4store((unsigned char*) end, session->variables.pseudo_thread_id);
35 end+= 4;
36
37 /* We don't use scramble anymore. */
38
39=== modified file 'plugin/mysql_protocol/mysql_protocol.cc'
40--- plugin/mysql_protocol/mysql_protocol.cc 2010-08-12 06:10:25 +0000
41+++ plugin/mysql_protocol/mysql_protocol.cc 2010-08-21 22:37:44 +0000
42@@ -38,11 +38,6 @@
43
44 #define PROTOCOL_VERSION 10
45
46-namespace drizzled
47-{
48-extern uint32_t global_thread_id;
49-}
50-
51 static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024;
52 static uint32_t port;
53 static uint32_t connect_timeout;
54@@ -667,7 +662,7 @@
55 *end= 0;
56 end++;
57
58- int4store((unsigned char*) end, global_thread_id);
59+ int4store((unsigned char*) end, session->variables.pseudo_thread_id);
60 end+= 4;
61
62 /* We don't use scramble anymore. */
63@@ -876,7 +871,7 @@
64 uint32_t pointer_seed;
65 memcpy(&pointer_seed, &pointer, 4);
66 uint32_t random1= (seed + pointer_seed) % random_max;
67- uint32_t random2= (seed + global_thread_id + net.vio->sd) % random_max;
68+ uint32_t random2= (seed + session->variables.pseudo_thread_id + net.vio->sd) % random_max;
69
70 for (char *end= scramble + SCRAMBLE_LENGTH; scramble != end; scramble++)
71 {