<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="738069">
  <date_last_updated>2011-03-19 08:32:38.333823+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/738069</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~pstoev-askmonty</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.3</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/738069/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/738069/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/738069</bug_web_link>
  <owner>Philip Stoev</owner>
  <assignee>Sergei</assignee>
  <milestone_title>Maria 5.3</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Comparisons between datetime and time work differently in 5.1-micro</title>
  <status>Opinion</status>
  <importance>Medium</importance>
  <created>2011-03-19 08:23:11.899315+00:00</created>
  <description>
<![CDATA[I am filing this bug so that this issue remains on the radar and a decision of some sort is made.

As described by Monty:


In the microsecond patch, the only 'discussable convert' I know of is when you
compare a time value with a datetime value.  In MySQL the
following where equal:

select cast('2001-01-02 00:00:01' as time) = cast("00:00:01" as time);
=>
select '00:00:01' = "00:00:01;
=>
true

In other words, when comparing a datetime with a time we only compared
the time part.

However after Serg's change the above is done:

select cast('2001-01-02 00:00:01' as time) = cast("00:00:01" as time);
=>
select ''2001-01-02 00:00:01' = "0000-00-00 00:00:01"
=>
false

The above worries me becasue someone *could* depend on this.  My
suggestion was to either do the compare as before or give an error. An
error is in my opinion better as the applicaiton will notice this much
easier than a 'different result'.]]>  </description>
  <activities>
    <activity datechanged="2011-03-19T08:23:11.899315+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Philip Stoev</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2011-03-19T08:23:15.676469+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.3]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-19T08:23:21.611174+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Sergei (sergii)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-19T08:23:30.173234+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[lp:~maria-captains/maria/5.1-micro]]>      </newvalue>
      <whatchanged>branch linked</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-19T08:31:44.866296+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[Medium]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-19T08:31:50.850723+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Won't Fix]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-19T08:32:26.942192+00:00">
      <oldvalue>
<![CDATA[Won't Fix]]>      </oldvalue>
      <newvalue>
<![CDATA[Opinion]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/738069/comments/1" datecreated="2011-03-19T08:32:37.842476+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: Comparisons between datetime and time work differently in 5.1-micro]]>      </subject>
      <content>
<![CDATA[This is intentional (and tested in the test suite).]]>      </content>
    </comment>
  </comments>
  <branches>
    <branch>lp:~maria-captains/maria/5.1-micro</branch>
  </branches>
</launchpad-bug>
