List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:October 18 2007 9:44am
Subject:Re: bk commit into 5.0 tree (gkodinov:1.2544) BUG#31221
View as plain text  
Evgen,

On 18.10.2007, at 01:18, Evgen Potemkin wrote:

> kgeorge@stripped wrote:
>
> Ok to push after the test case is corrected.
>> ChangeSet@stripped, 2007-10-17 18:54:56+03:00, gkodinov@stripped  
>> +13 -0
>>   Bug #31221: Optimizer incorrectly identifies impossible WHERE  
>> clause
>>    No warning was generated when a TIMESTAMP with a non-zero time  
>> part
>>    was converted to a DATE value. This caused index lookup to assume
>>    that this is a valid conversion and was returning rows that  
>> match    a comparison between a TIMESTAMP value and a DATE keypart.
>>    Fixed by generating a warning on such a truncation.
>>
> Queries in the bug report shows different result depending on  
> whether the index is used or not.
> In your test case index is present but isn't used. Please add  
> selects that shows that the
> result is the same.

Before my fix the queries used to use the index and return different  
results (as demonstrated by the steps-to-reproduce).
My fix however makes for early detection of the impossible WHERE  
(searching for DATETIME in a DATE column). So no matter how I write  
the query it will never show index usage. But if my fix (for some  
reason) is rolled back the second query (after the second insert)  
would be (erroneously) using an index.
That's why I'm switching the bug back to "In review".

Best Regards,
Joro
-- 
Georgi Kodinov, Senior Software Engineer
MySQL AB, Plovdiv, Bulgaria, www.mysql.com
Office: +359 32 634 397 Mobile: +359 887 700 566 Skype: georgekodinov

Are you MySQL certified?  www.mysql.com/certification


Thread
bk commit into 5.0 tree (gkodinov:1.2544) BUG#31221kgeorge17 Oct
  • Re: bk commit into 5.0 tree (gkodinov:1.2544) BUG#31221Evgen Potemkin17 Oct
    • Re: bk commit into 5.0 tree (gkodinov:1.2544) BUG#31221Georgi Kodinov18 Oct