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
=== modified file 'drizzled/session.cc'
--- drizzled/session.cc 2009-08-16 14:14:39 +0000
+++ drizzled/session.cc 2009-09-03 04:00:45 +0000
@@ -223,6 +223,7 @@
223 thread_id= 0;223 thread_id= 0;
224 file_id = 0;224 file_id = 0;
225 query_id= 0;225 query_id= 0;
226 query= NULL;
226 warn_id= 0;227 warn_id= 0;
227 memset(ha_data, 0, sizeof(ha_data));228 memset(ha_data, 0, sizeof(ha_data));
228 replication_data= 0;229 replication_data= 0;
229230
=== modified file 'drizzled/session.h'
--- drizzled/session.h 2009-08-17 21:30:20 +0000
+++ drizzled/session.h 2009-08-31 03:15:47 +0000
@@ -158,7 +158,7 @@
158 uint32_t query_alloc_block_size;158 uint32_t query_alloc_block_size;
159 uint32_t query_prealloc_size;159 uint32_t query_prealloc_size;
160 uint32_t trans_alloc_block_size;160 uint32_t trans_alloc_block_size;
161 uint32_t trans_prealloc_size;161 uint64_t trans_prealloc_size;
162 uint64_t group_concat_max_len;162 uint64_t group_concat_max_len;
163 /* TODO: change this to my_thread_id - but have to fix set_var first */163 /* TODO: change this to my_thread_id - but have to fix set_var first */
164 uint64_t pseudo_thread_id;164 uint64_t pseudo_thread_id;
@@ -783,7 +783,10 @@
783 /** Returns the length of the current query text */783 /** Returns the length of the current query text */
784 inline size_t getQueryLength() const784 inline size_t getQueryLength() const
785 {785 {
786 return strlen(query);786 if (query != NULL)
787 return strlen(query);
788 else
789 return 0;
787 }790 }
788791
789 /** Accessor method returning the server's ID. */792 /** Accessor method returning the server's ID. */
790793
=== modified file 'drizzled/set_var.cc'
--- drizzled/set_var.cc 2009-08-13 21:55:13 +0000
+++ drizzled/set_var.cc 2009-08-27 16:31:13 +0000
@@ -194,9 +194,8 @@
194static sys_var_session_uint32_t sys_trans_alloc_block_size(&vars, "transaction_alloc_block_size",194static sys_var_session_uint32_t sys_trans_alloc_block_size(&vars, "transaction_alloc_block_size",
195 &SV::trans_alloc_block_size,195 &SV::trans_alloc_block_size,
196 false, fix_trans_mem_root);196 false, fix_trans_mem_root);
197static sys_var_session_uint32_t sys_trans_prealloc_size(&vars, "transaction_prealloc_size",197static sys_var_session_uint64_t sys_trans_prealloc_size(&vars, "transaction_prealloc_size",
198 &SV::trans_prealloc_size,198 &SV::trans_prealloc_size);
199 false, fix_trans_mem_root);
200199
201static sys_var_const_str_ptr sys_secure_file_priv(&vars, "secure_file_priv",200static sys_var_const_str_ptr sys_secure_file_priv(&vars, "secure_file_priv",
202 &opt_secure_file_priv);201 &opt_secure_file_priv);
@@ -743,7 +742,10 @@
743 uint64_t tmp= var->save_result.uint64_t_value;742 uint64_t tmp= var->save_result.uint64_t_value;
744743
745 if (tmp > max_system_variables.*offset)744 if (tmp > max_system_variables.*offset)
745 {
746 throw_bounds_warning(session, true, true, getName(), (int64_t) tmp);
746 tmp= max_system_variables.*offset;747 tmp= max_system_variables.*offset;
748 }
747749
748 if (option_limits)750 if (option_limits)
749 tmp= fix_unsigned(session, tmp, option_limits);751 tmp= fix_unsigned(session, tmp, option_limits);
750752
=== modified file 'tests/r/variables.result'
--- tests/r/variables.result 2009-06-16 05:02:45 +0000
+++ tests/r/variables.result 2009-08-27 18:57:16 +0000
@@ -544,14 +544,20 @@
544set @@global.error_count=1;544set @@global.error_count=1;
545ERROR HY000: Variable 'error_count' is a read only variable545ERROR HY000: Variable 'error_count' is a read only variable
546set @@max_heap_table_size= 4294967296;546set @@max_heap_table_size= 4294967296;
547Warnings:
548Error 1292 Truncated incorrect max_heap_table_size value: '4294967296'
547select @@max_heap_table_size > 0;549select @@max_heap_table_size > 0;
548@@max_heap_table_size > 0550@@max_heap_table_size > 0
54915511
550set global max_heap_table_size= 4294967296;552set global max_heap_table_size= 4294967296;
553Warnings:
554Error 1292 Truncated incorrect max_heap_table_size value: '4294967296'
551select @@max_heap_table_size > 0;555select @@max_heap_table_size > 0;
552@@max_heap_table_size > 0556@@max_heap_table_size > 0
55315571
554set @@max_heap_table_size= 4294967296;558set @@max_heap_table_size= 4294967296;
559Warnings:
560Error 1292 Truncated incorrect max_heap_table_size value: '4294967296'
555select @@max_heap_table_size > 0;561select @@max_heap_table_size > 0;
556@@max_heap_table_size > 0562@@max_heap_table_size > 0
55715631
558564
=== modified file 'tests/suite/big/r/variables-big.result'
--- tests/suite/big/r/variables-big.result 2009-07-31 15:28:05 +0000
+++ tests/suite/big/r/variables-big.result 2009-08-27 14:05:30 +0000
@@ -10,3 +10,15 @@
10show processlist;10show processlist;
11Id User Host db Command Time State Info11Id User Host db Command Time State Info
12# root 127.0.0.1 test Query 0 NULL show processlist12# root 127.0.0.1 test Query 0 NULL show processlist
13set session transaction_prealloc_size=1024*1024*1024*4;
14Warnings:
15Error 1292 Truncated incorrect transaction_prealloc_size value: '4294967296'
16show processlist;
17Id User Host db Command Time State Info
18# root 127.0.0.1 test Query 0 NULL show processlist
19set session transaction_prealloc_size=1024*1024*1024*5;
20Warnings:
21Error 1292 Truncated incorrect transaction_prealloc_size value: '5368709120'
22show processlist;
23Id User Host db Command Time State Info
24# root 127.0.0.1 test Query 0 NULL show processlist
1325
=== modified file 'tests/suite/big/t/variables-big.test'
--- tests/suite/big/t/variables-big.test 2009-07-31 15:28:05 +0000
+++ tests/suite/big/t/variables-big.test 2009-08-27 14:05:30 +0000
@@ -18,7 +18,9 @@
1818
19# Drizzle bug #37782619# Drizzle bug #377826
20# please uncomment after the bug is fixed20# please uncomment after the bug is fixed
21#set session transaction_prealloc_size=1024*1024*1024*4;21set session transaction_prealloc_size=1024*1024*1024*4;
22#show processlist;22--replace_column 1 #
23#set session transaction_prealloc_size=1024*1024*1024*5;23show processlist;
24#show processlist;24set session transaction_prealloc_size=1024*1024*1024*5;
25--replace_column 1 #
26show processlist;