~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to sql/opt_range.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9318
9318
         except MIN and MAX. For queries with DISTINCT, aggregate functions
9319
9319
         are allowed.
9320
9320
    SA5. The select list in DISTINCT queries should not contain expressions.
 
9321
    SA6. Clustered index can not be used by GROUP_MIN_MAX quick select
 
9322
         for AGG_FUNC(DISTINCT ...) optimization because cursor position is
 
9323
         never stored after a unique key lookup in the clustered index and
 
9324
         furhter index_next/prev calls can not be used. So loose index scan
 
9325
         optimization can not be used in this case.
9321
9326
    GA1. If Q has a GROUP BY clause, then GA is a prefix of I. That is, if
9322
9327
         G_i = A_j => i = j.
9323
9328
    GA2. If Q has a DISTINCT clause, then there is a permutation of SA that
9804
9809
                                      Field::itMBR : Field::itRAW))
9805
9810
    DBUG_RETURN(NULL);
9806
9811
 
 
9812
  /*
 
9813
    Check (SA6) if clustered key is used
 
9814
  */
 
9815
  if (is_agg_distinct && index == table->s->primary_key &&
 
9816
      table->file->primary_key_is_clustered())
 
9817
    DBUG_RETURN(NULL);
 
9818
 
9807
9819
  /* The query passes all tests, so construct a new TRP object. */
9808
9820
  read_plan= new (param->mem_root)
9809
9821
                 TRP_GROUP_MIN_MAX(have_min, have_max, is_agg_distinct,