~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_static.h

  • Committer: Prafulla Tekawade
  • Date: 2010-07-13 16:07:35 UTC
  • mto: (1662.1.4 rollup)
  • mto: This revision was merged to the branch mainline in revision 1664.
  • Revision ID: prafulla_t@users.sourceforge.net-20100713160735-2fsdtrm3azayuyu1
This bug is simillar to mysql bug 36133
http://bugs.mysql.com/bug.php?id=36133

Taking changes from that fix.

  - The problem was that the range optimizer evaluated constant expressions, 
    and among them it would try to evaluate IN-subquery predicates slated for
    handling with materialization strategy. However, these predicates require
    that parent_join->setup_subquery_materialization() is invoked before one
    attempts to evaluate them.
  
  - Fixed by making the range optimizer not to evaluate expressions that have
    item->is_expensive() == TRUE (these are materialization subqueries and 
    stored function calls). This should also resolve the problem that EXPLAIN 
    may be too long. 
    This change cuts off some opportunities for range optimizer, but this is 
    the price we're willing to pay for separation of query optimization and
    execution. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/*
17
17
  Static variables for mysys library. All definied here for easy making of
41
41
  boundary.
42
42
*/
43
43
 
44
 
class irem
 
44
struct st_irem
45
45
{
46
 
public:
47
 
  irem *next;           /* Linked list of structures       */
48
 
  irem *prev;           /* Other link                      */
 
46
  struct st_irem *next;         /* Linked list of structures       */
 
47
  struct st_irem *prev;         /* Other link                      */
49
48
  char *filename;               /* File in which memory was new'ed */
50
49
  uint32_t linenum;             /* Line number in above file       */
51
50
  uint32_t datasize;            /* Size requested                  */
52
51
  uint32_t SpecialValue;                /* Underrun marker value           */
53
 
 
54
 
  irem():
55
 
    next(NULL),
56
 
        prev(NULL),
57
 
        filename(0),
58
 
        linenum(0),
59
 
        datasize(0),
60
 
        SpecialValue(0)
61
 
  {}
62
52
};
63
53
 
64
54
 
68
58
 
69
59
extern unsigned char    *sf_min_adress,*sf_max_adress;
70
60
extern uint     sf_malloc_count;
71
 
extern class irem *sf_malloc_root;
 
61
extern struct st_irem *sf_malloc_root;
72
62
 
73
63
extern uint64_t query_performance_frequency, query_performance_offset;
74
64