1. 29 Sep, 2006 3 commits
  2. 28 Sep, 2006 14 commits
  3. 27 Sep, 2006 12 commits
  4. 26 Sep, 2006 5 commits
    • evgen@moonbone.local's avatar
      Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong · 9fc769ff
      evgen@moonbone.local authored
      result
      
      The IN function aggregates result types of all expressions. It uses that 
      type in comparison of left expression and expressions in right part. 
      This approach works in most cases. But let's consider the case when the
      right part contains both strings and integers. In that case this approach may
      cause wrong results because all strings which do not start with a digit are
      evaluated as 0.
      CASE uses the same approach when a CASE expression is given thus it's also
      affected.
      
      The idea behind this fix is to make IN function to compare expressions with
      different result types differently. For example a string in the left
      part will be compared as string with strings specified in right part and
      will be converted to real for comparison to int or real items in the right
      part.
      
      A new function called collect_cmp_types() is added. It collects different
      result types for comparison of first item in the provided list with each 
      other item in the list. 
      
      The Item_func_in class now can refer up to 5 cmp_item objects: 1 for each
      result type for comparison purposes. cmp_item objects are allocated according
      to found result types. The comparison of the left expression with any
      right part expression is now based only on result types of these expressions.
      
      The Item_func_case class is modified in the similar way when a CASE
      expression is specified. Now it can allocate up to 5 cmp_item objects
      to compare CASE expression with WHEN expressions of different types.
      The comparison of the CASE expression with any WHEN expression now based only 
      on result types of these expressions.
      9fc769ff
    • jani@a88-112-41-254.elisa-laajakaista.fi's avatar
    • msvensson@neptunus.(none)'s avatar
      Merge bk-internal:/home/bk/mysql-5.1-runtime · a09487b8
      msvensson@neptunus.(none) authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-runtime
      a09487b8
    • jani@a88-112-41-254.elisa-laajakaista.fi's avatar
      Fix for bug#20208 · 4bfe83d5
      A better fix for bug#10025.
      
      Fixed test case plus added new tests.
      
      After fixing Bug#20208 "Blobs greater than 8K are being truncated to 8K"
      the fix to bug#10025 "Misleading error with COLLATE mediumtext and UNION"
      became more accurate. Earlier mediumtext got converted to longtext,
      although mediumtext was enough to contain the results. Now it converts
      correctly to mediumtext, if the length does not exceed that and if none
      of the original fields were type longtext.
      
      Type longtext still converts correctly to type longtext, as the extra
      tests prove.
      4bfe83d5
    • joerg@trift2.'s avatar
      Merge trift2.:/MySQL/M50/clone-5.0 · 3799f32f
      joerg@trift2. authored
      into  trift2.:/MySQL/M50/push-5.0
      3799f32f
  5. 25 Sep, 2006 6 commits