← Back to team overview

maria-developers team mailing list archive

Re: Please review: [Commits] Rev 3199: Fix bug lp:858148. in file:///home/tsk/mprog/src/5.3/

 

OK to push.

Regards,
Igor.

On 09/28/2011 07:23 AM, Timour Katchaounov wrote:
> Hi Igor,
> 
> Could you please review the following fix.
> It is very much related to a bug you fixed:
> https://bugs.launchpad.net/bugs/702301
> 
> Thanks,
> Timour
> 
> -------- Original Message --------
> Return-Path: <commits-bounces@xxxxxxxxxxx>
> X-Original-To: timour@xxxxxxxxxxxxxxxx
> Delivered-To: timour@xxxxxxxxxxxxxxxx
> Received: from localhost (localhost.localdomain [127.0.0.1])    by
> hasky.askmonty.org (Postfix) with ESMTP id DFD38D0DCB;    Wed, 28 Sep
> 2011 17:20:59 +0300 (EEST)
> X-Virus-Scanned: Debian amavisd-new at mail.askmonty.org
> Received: from hasky.askmonty.org ([127.0.0.1])    by localhost
> (mail.askmonty.org [127.0.0.1]) (amavisd-new, port 10024)    with ESMTP
> id lpHLfsC2eNw9; Wed, 28 Sep 2011 17:20:59 +0300 (EEST)
> Received: from hasky.askmonty.org (localhost.localdomain [127.0.0.1])   
> by hasky.askmonty.org (Postfix) with ESMTP id BE79DC8236;    Wed, 28 Sep
> 2011 17:20:59 +0300 (EEST)
> Received: by hasky.askmonty.org (Postfix)    id 38FC0C8234; Wed, 28 Sep
> 2011 17:20:58 +0300 (EEST)
> Delivered-To: commits@xxxxxxxxxxx
> Received: from localhost (localhost.localdomain [127.0.0.1])    by
> hasky.askmonty.org (Postfix) with ESMTP id 31622C8236    for
> <commits@xxxxxxxxxxx>; Wed, 28 Sep 2011 17:20:58 +0300 (EEST)
> X-Virus-Scanned: Debian amavisd-new at mail.askmonty.org
> Received: from hasky.askmonty.org ([127.0.0.1])    by localhost
> (mail.askmonty.org [127.0.0.1]) (amavisd-new, port 10024)    with ESMTP
> id BvGNnoY8SHUx for <commits@xxxxxxxxxxx>;    Wed, 28 Sep 2011 17:20:52
> +0300 (EEST)
> Received: from localhost6.localdomain6 (unknown [212.91.171.126])   
> (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))    (No
> client certificate requested)    by hasky.askmonty.org (Postfix) with
> ESMTPSA id 24886C8234    for <commits@xxxxxxxxxxx>; Wed, 28 Sep 2011
> 17:20:52 +0300 (EEST)
> Content-Type: multipart/mixed;
> boundary="===============0198351398646356273=="
> MIME-Version: 1.0
> From: <timour@xxxxxxxxxxxx>
> User-Agent: bzr/2.3.4
> To: <commits@xxxxxxxxxxx>
> Message-Id: <20110928142052.24886C8234@xxxxxxxxxxxxxxxxxx>
> Date: Wed, 28 Sep 2011 17:20:52 +0300 (EEST)
> Subject: [Commits] Rev 3199: Fix bug lp:858148. in   
> file:///home/tsk/mprog/src/5.3/
> X-BeenThere: commits@xxxxxxxxxxx
> X-Mailman-Version: 2.1.9
> Precedence: list
> Reply-To: maria-developers@xxxxxxxxxxxxxxxxxxx
> List-Id: MariaDB Commits List <commits.mariadb.org>
> List-Unsubscribe:
> <https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits>,    
> <mailto:commits-request@xxxxxxxxxxx?subject=unsubscribe>
> List-Archive: <http://lists.askmonty.org/pipermail/commits>
> List-Post: <mailto:commits@xxxxxxxxxxx>
> List-Help: <mailto:commits-request@xxxxxxxxxxx?subject=help>
> List-Subscribe:
> <https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits>,    
> <mailto:commits-request@xxxxxxxxxxx?subject=subscribe>
> Sender: commits-bounces@xxxxxxxxxxx
> Errors-To: commits-bounces@xxxxxxxxxxx
> 
> At file:///home/tsk/mprog/src/5.3/
> 
> ------------------------------------------------------------
> revno: 3199
> revision-id: timour@xxxxxxxxxxxx-20110928142043-b88ob3qytbroxdks
> parent: psergey@xxxxxxxxxxxx-20110928090147-izz3ebqbcrnakndu
> fixes bug(s): https://launchpad.net/bugs/858148
> committer: timour@xxxxxxxxxxxx
> branch nick: 5.3
> timestamp: Wed 2011-09-28 17:20:43 +0300
> message:
>   Fix bug lp:858148.
> 
>   Analysis:
>   The crash is a result of the same cause as all similar
>   bugs (lp:827416, lp:718763, lp:778413, lp:806943,
>   lp:611690). The general pattern is that some optimization
>   requires the evaluation of some condition (e.g. the WHERE
>   clause), and this condition contains a subquery, such that
>   the subquery itself requires a temporary table for its
>   execution. During the subquery execution the original
>   tables in the FROM clause are replaced by the temporary
>   table needed for the final GROUP or ORDER operation. All
>   this happens during optimization of the outer query. Later
>   when EXPLAIN is run for the subquery, explain attempts to
>   print the name of the tables in the FROM clause, but it
>   finds there a temporary table without a corresponding
>   TABLE_LIST object. The attempt to print the name of a
>   NULL table list results in a crash.
> 
>   Solution:
>   This patch extends the fix to bug lp:702301, and dissalows
>   constant substitution of aggregate functions if the filter
>   condition used to check MIN/MAX keys is an expensive condition.