On 07/13/2011 07:38 AM, Timour Katchaounov wrote:
Igor,
Could you please review my patch for bug LP:809245.
Ttimour
Timour, It's ok to push this patch Regards, Igor.
-------- Original Message -------- Return-Path: <commits-bounces@mariadb.org> X-Original-To: timour@askmonty.org Delivered-To: timour@askmonty.org Received: from localhost (localhost.localdomain [127.0.0.1]) by hasky.askmonty.org (Postfix) with ESMTP id 1014BE104C; Wed, 13 Jul 2011 17:09:26 +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 2zpPCMRHKtn9; Wed, 13 Jul 2011 17:09:26 +0300 (EEST) Received: from hasky.askmonty.org (localhost.localdomain [127.0.0.1]) by hasky.askmonty.org (Postfix) with ESMTP id BC862E1049; Wed, 13 Jul 2011 17:09:26 +0300 (EEST) Received: by hasky.askmonty.org (Postfix) id 756A7E1049; Wed, 13 Jul 2011 17:09:25 +0300 (EEST) Delivered-To: commits@mariadb.org Received: from localhost (localhost.localdomain [127.0.0.1]) by hasky.askmonty.org (Postfix) with ESMTP id 641B3E104A for <commits@mariadb.org>; Wed, 13 Jul 2011 17:09:25 +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 PF4tvWx7nmEU for <commits@mariadb.org>; Wed, 13 Jul 2011 17:09:19 +0300 (EEST) Received: from localhost6.localdomain6 (unknown [91.148.138.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hasky.askmonty.org (Postfix) with ESMTPSA id DCEAEE1049 for <commits@mariadb.org>; Wed, 13 Jul 2011 17:09:18 +0300 (EEST) Content-Type: multipart/mixed; boundary="===============3088248604612826632==" MIME-Version: 1.0 From: <timour@askmonty.org> User-Agent: bzr/2.3.1 To: <commits@mariadb.org> Message-Id: <20110713140918.DCEAEE1049@hasky.askmonty.org> Date: Wed, 13 Jul 2011 17:09:18 +0300 (EEST) Subject: [Commits] Rev 3092: Fixed bug lp:809245 in file:///home/tsk/mprog/src/5.3-mwl89/ X-BeenThere: commits@mariadb.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: maria-developers@lists.launchpad.net List-Id: MariaDB Commits List <commits.mariadb.org> List-Unsubscribe: <https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits>, <mailto:commits-request@mariadb.org?subject=unsubscribe> List-Archive: <http://lists.askmonty.org/pipermail/commits> List-Post: <mailto:commits@mariadb.org> List-Help: <mailto:commits-request@mariadb.org?subject=help> List-Subscribe: <https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits>, <mailto:commits-request@mariadb.org?subject=subscribe> Sender: commits-bounces@mariadb.org Errors-To: commits-bounces@mariadb.org
At file:///home/tsk/mprog/src/5.3-mwl89/
------------------------------------------------------------ revno: 3092 revision-id: timour@askmonty.org-20110713140909-rkka410svyafz4jn parent: timour@askmonty.org-20110708075646-h4kmmn8mmihfmh1f fixes bug(s): https://launchpad.net/bugs/809245 committer: timour@askmonty.org branch nick: 5.3-mwl89 timestamp: Wed 2011-07-13 17:09:09 +0300 message: Fixed bug lp:809245
In addition to the bug fix explained below, the patch performs few renames, and adds some comments to avoid similar problems.
Analysis: The failed assert was due to a bug in MWL#68, where it was incorrectly assumed that the size of the bitmap subselect_rowid_merge_engine::null_only_columns should be the same as the size of the array of Ordered_keys.
The bitmap null_only_columns contains bits to mark columns that contain only NULLs. Therefore the indexes of the bits to be set in null_only_columns are different from the indexes of the Ordered_keys. If there is a NULL-only column that appears in a table after the last partial match column with Ordered_key, this NULL-only column would require setting a bit with index bigger than the size of the bitmap null_only_columns.
Accessing such a bit caused the failed assert.
Solution: Upon analysis, it turns out that null_only_columns is not needed at all, because we are looking for partial matches, and having such columns guarantees that there is a partial match for any corresponding outer value.
Therefore the patch removes subselect_rowid_merge_engine::null_only_columns.