Merge lp://staging/~diego-fmpwizard/drizzle/bug-fixes into lp://staging/~drizzle-trunk/drizzle/development

Proposed by fmpwizard
Status: Superseded
Proposed branch: lp://staging/~diego-fmpwizard/drizzle/bug-fixes
Merge into: lp://staging/~drizzle-trunk/drizzle/development
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~diego-fmpwizard/drizzle/bug-fixes
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+11140@code.staging.launchpad.net

This proposal supersedes a proposal from 2009-08-27.

This proposal has been superseded by a proposal from 2009-09-04.

To post a comment you must log in.
Revision history for this message
fmpwizard (diego-fmpwizard) wrote : Posted in a previous version of this proposal

* Fixed bug* #377826 "Failure to detect error in allocating transcation_prealloc_size"

* I converted transaction_prealloc_size to a uint64_t.

That eliminated the strange values that ended up assigned to "transcation_prealloc_size" when you tried to set it to a value of 1024*1024*1024*4 or higher.

* To get a warning on those same cases, I had to add:

throw_bounds_warning(session, true, true, getName(), (int64_t) tmp);

to

set_var.cc:

bool sys_var_session_uint64_t::update(Session *session, set_var *var)

* I also enabled the test suite under big/t/variables-big.test
* Had to modify a test case for
    set @@max_heap_table_size= 4294967296;
  ** Because it now returns a warning about the value being truncated (truncated to 4294966272 ) (This is different than what MySQL does, MySQL accepts a value of 4294967296)

1130. By Diego Medina <email address hidden>

*Fixed test case
  Expect warnings only on 32bit machines and disable warnings on 64bit machines
  (Not sure what SPARC will do)

1131. By Diego Medina <email address hidden>

reverted transaction_prealloc_size to an uint32_t
fixed test case

1132. By Diego Medina <email address hidden>

Fixes lp bug#432210
* Only call com_rehash(NULL, NULL) if we are connected to a server and if the option to rehash is enabled.

1133. By Diego Medina <email address hidden>

Fixed a crash that came after fixing lp bug#432210 if you call use <db_name> twice on a
disconnected session.

1134. By Diego Medina <email address hidden>

* Fixed LP bug#435619
** Protect error_message(code) from retrieving a negative index which causes a crash

* When a new session starts, initialize query_length (this was another
crash on the logging_* plugins)(timing dependant)

1135. By Diego Medina <email address hidden>

Enabled a hack to account for 32-bit vs 64-bit tests results

1136. By Diego Medina <email address hidden>

finally fixed the 64-bit vs 32-bit test case

1137. By Diego Medina <email address hidden>

* Fixes bug#438852
** variables test fails as of build 1144 on linux 32 bit machines
** Some linux systems use i686 to indicate they are 32-bit

1138. By Diego Medina <email address hidden>

* On certain UPDATE and DELETE statements, drizzled failed an assert() in
   Diagnostic_area.
** Fixed by resetting m_status after "delete select"
* Fixed LP bug#439719
* Added test case

1139. By Diego Medina <email address hidden>

resolved small merge issue

1140. By Diego Medina <email address hidden>

uncommented a call to reset_diagnostics_area()

Unmerged revisions

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 2009-08-16 14:14:39 +0000
3+++ drizzled/session.cc 2009-09-03 04:00:45 +0000
4@@ -223,6 +223,7 @@
5 thread_id= 0;
6 file_id = 0;
7 query_id= 0;
8+ query= NULL;
9 warn_id= 0;
10 memset(ha_data, 0, sizeof(ha_data));
11 replication_data= 0;
12
13=== modified file 'drizzled/session.h'
14--- drizzled/session.h 2009-08-17 21:30:20 +0000
15+++ drizzled/session.h 2009-08-31 03:15:47 +0000
16@@ -158,7 +158,7 @@
17 uint32_t query_alloc_block_size;
18 uint32_t query_prealloc_size;
19 uint32_t trans_alloc_block_size;
20- uint32_t trans_prealloc_size;
21+ uint64_t trans_prealloc_size;
22 uint64_t group_concat_max_len;
23 /* TODO: change this to my_thread_id - but have to fix set_var first */
24 uint64_t pseudo_thread_id;
25@@ -783,7 +783,10 @@
26 /** Returns the length of the current query text */
27 inline size_t getQueryLength() const
28 {
29- return strlen(query);
30+ if (query != NULL)
31+ return strlen(query);
32+ else
33+ return 0;
34 }
35
36 /** Accessor method returning the server's ID. */
37
38=== modified file 'drizzled/set_var.cc'
39--- drizzled/set_var.cc 2009-08-13 21:55:13 +0000
40+++ drizzled/set_var.cc 2009-08-27 16:31:13 +0000
41@@ -194,9 +194,8 @@
42 static sys_var_session_uint32_t sys_trans_alloc_block_size(&vars, "transaction_alloc_block_size",
43 &SV::trans_alloc_block_size,
44 false, fix_trans_mem_root);
45-static sys_var_session_uint32_t sys_trans_prealloc_size(&vars, "transaction_prealloc_size",
46- &SV::trans_prealloc_size,
47- false, fix_trans_mem_root);
48+static sys_var_session_uint64_t sys_trans_prealloc_size(&vars, "transaction_prealloc_size",
49+ &SV::trans_prealloc_size);
50
51 static sys_var_const_str_ptr sys_secure_file_priv(&vars, "secure_file_priv",
52 &opt_secure_file_priv);
53@@ -743,7 +742,10 @@
54 uint64_t tmp= var->save_result.uint64_t_value;
55
56 if (tmp > max_system_variables.*offset)
57+ {
58+ throw_bounds_warning(session, true, true, getName(), (int64_t) tmp);
59 tmp= max_system_variables.*offset;
60+ }
61
62 if (option_limits)
63 tmp= fix_unsigned(session, tmp, option_limits);
64
65=== modified file 'tests/r/variables.result'
66--- tests/r/variables.result 2009-06-16 05:02:45 +0000
67+++ tests/r/variables.result 2009-08-27 18:57:16 +0000
68@@ -544,14 +544,20 @@
69 set @@global.error_count=1;
70 ERROR HY000: Variable 'error_count' is a read only variable
71 set @@max_heap_table_size= 4294967296;
72+Warnings:
73+Error 1292 Truncated incorrect max_heap_table_size value: '4294967296'
74 select @@max_heap_table_size > 0;
75 @@max_heap_table_size > 0
76 1
77 set global max_heap_table_size= 4294967296;
78+Warnings:
79+Error 1292 Truncated incorrect max_heap_table_size value: '4294967296'
80 select @@max_heap_table_size > 0;
81 @@max_heap_table_size > 0
82 1
83 set @@max_heap_table_size= 4294967296;
84+Warnings:
85+Error 1292 Truncated incorrect max_heap_table_size value: '4294967296'
86 select @@max_heap_table_size > 0;
87 @@max_heap_table_size > 0
88 1
89
90=== modified file 'tests/suite/big/r/variables-big.result'
91--- tests/suite/big/r/variables-big.result 2009-07-31 15:28:05 +0000
92+++ tests/suite/big/r/variables-big.result 2009-08-27 14:05:30 +0000
93@@ -10,3 +10,15 @@
94 show processlist;
95 Id User Host db Command Time State Info
96 # root 127.0.0.1 test Query 0 NULL show processlist
97+set session transaction_prealloc_size=1024*1024*1024*4;
98+Warnings:
99+Error 1292 Truncated incorrect transaction_prealloc_size value: '4294967296'
100+show processlist;
101+Id User Host db Command Time State Info
102+# root 127.0.0.1 test Query 0 NULL show processlist
103+set session transaction_prealloc_size=1024*1024*1024*5;
104+Warnings:
105+Error 1292 Truncated incorrect transaction_prealloc_size value: '5368709120'
106+show processlist;
107+Id User Host db Command Time State Info
108+# root 127.0.0.1 test Query 0 NULL show processlist
109
110=== modified file 'tests/suite/big/t/variables-big.test'
111--- tests/suite/big/t/variables-big.test 2009-07-31 15:28:05 +0000
112+++ tests/suite/big/t/variables-big.test 2009-08-27 14:05:30 +0000
113@@ -18,7 +18,9 @@
114
115 # Drizzle bug #377826
116 # please uncomment after the bug is fixed
117-#set session transaction_prealloc_size=1024*1024*1024*4;
118-#show processlist;
119-#set session transaction_prealloc_size=1024*1024*1024*5;
120-#show processlist;
121+set session transaction_prealloc_size=1024*1024*1024*4;
122+--replace_column 1 #
123+show processlist;
124+set session transaction_prealloc_size=1024*1024*1024*5;
125+--replace_column 1 #
126+show processlist;