← Back to team overview

maria-developers team mailing list archive

Re: review: [Commits] Rev 2875: Fix problem of making on-disk cache table. in file:///home/bell/maria/bzr/work-maria-5.3-subquerycache/



On 14.01.2011 18:30, Michael Widenius wrote:
@@ -225,7 +229,7 @@ my_bool Expression_cache_tmptable::put_v

-  if (!cache_table)
+  if (!cache_table || frozen)

Is it not eonugh to test for 'frozen'?
(You should set frozen to 0 if cache_table is not set)

It will lead to complex enough code with double assignmend of cache_table and frozen, also it will lead to possible errors if code will be changed somewhere by other programmer.

=== modified file 'sql/sql_expression_cache.h'


@@ -50,6 +50,8 @@ class Item_field;

  class Expression_cache_tmptable :public Expression_cache
+  ulong hit, miss;
+  bool frozen;

ulong ->  ulonglong (in a join you can have a LOT of row combinations)

But we use ulong for all global variables (I checked before using ulong).