1. 29 Mar, 2013 3 commits
    • unknown's avatar
      Fix for MDEV-4144 · 599a1384
      unknown authored
        
      Analysis:
      The reason for the inefficent plan was that Item_subselect::is_expensive()
      didn't detect the special case when a subquery was optimized, but had no
      join plan because it either has no table, or its tables have been optimized
      away, or the optimizer detected that the result set is empty.
        
      Solution:
      Identify the special cases above in the Item_subselect::is_expensive(),
      and consider such degenerate subqueries inexpensive.
      599a1384
    • Vladislav Vaintroub's avatar
      fa01b76b
    • Igor Babaev's avatar
      Merge 5.3->5.5. · e91e8c8c
      Igor Babaev authored
      e91e8c8c
  2. 28 Mar, 2013 2 commits
    • Igor Babaev's avatar
      Merge · a2c3d7d3
      Igor Babaev authored
      a2c3d7d3
    • Igor Babaev's avatar
      Fixed bug mdev-4311 (bug #68749). · 323fdd7a
      Igor Babaev authored
      This bug was introduced by the patch for WL#3220.
      If the memory allocated for the tree to store unique elements
      to be counted is not big enough to include all of them then
      an external file is used to store the elements.
      The unique elements are guaranteed not to be nulls. So, when 
      reading them from the file we don't have to care about the null
      flags of the read values. However, we should remove the flag 
      at the very beginning of the process. If we don't do it and
      if the last value written into the record buffer for the field
      whose distinct values needs to be counted happens to be null,
      then all values read from the file  are considered to be nulls
      and are not counted in.
      The fix does not remove a possible null flag for the read values.
      Rather it just counts the values in the same way it was done
      before WL #3220.
      323fdd7a
  3. 27 Mar, 2013 2 commits
  4. 26 Mar, 2013 6 commits
  5. 25 Mar, 2013 1 commit
  6. 23 Mar, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4318. · 21dad7ec
      Igor Babaev authored
      In some cases, when using views the optimizer incorrectly determined
      possible join orders for queries with nested outer and inner joins.
      This could lead to invalid execution plans for such queries.
      21dad7ec
  7. 22 Mar, 2013 1 commit
  8. 21 Mar, 2013 2 commits
  9. 20 Mar, 2013 3 commits
  10. 19 Mar, 2013 1 commit
  11. 26 Mar, 2013 2 commits
  12. 25 Mar, 2013 1 commit
    • Michael Widenius's avatar
      Patch by Ian Good for MDEV-4319: mysqlbinlog output ambiguous escaping · c579bce3
      Michael Widenius authored
      The output of mysqlbinlog (with "-v --base64-output=DECODE-ROWS" flags) can not always be read or parsed correctly
      when string columns contain single-quotes or backslash characters.
      
      The fix for this bug is to escape single-quote and backslash characters on output, so that the result is both more
      readable and more easily parse-able.
      
      Note that this is just for comments, so it doesn't affect the replication.
      
      sql/log_event.cc:
        Escape \ and ' properly for mysqlbin user comments.
      c579bce3
  13. 19 Mar, 2013 2 commits
  14. 18 Mar, 2013 4 commits
    • unknown's avatar
      MDEV-4269 fix. · 2cd7cf8f
      unknown authored
      Item_default_value inherited form Item_field so should create temporary table field similary.
      2cd7cf8f
    • Alexey Botchkov's avatar
      MDEV-4252 geometry query crashes server. · 589247ae
      Alexey Botchkov authored
          Additional fixes for possible overflows in length-related
          calculations in 'spatial' implementations.
          Checks added to the ::get_data_size() methods.
          max_n_points decreased to occupy less 2G size. An
          object of that size is practically inoperable anyway.
      589247ae
    • Sergei Golubchik's avatar
      MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, GROUP BY · a4a18e0c
      Sergei Golubchik authored
      Item_func_make_set wasn't taking into account the first argument when
      calculating maybe_null.
      
      sql/item_strfunc.cc:
        rewrite Item_func_make_set, removing separate storage of the first argument
      sql/item_strfunc.h:
        rewrite Item_func_make_set, removing separate storage of the first argument
      a4a18e0c
    • Sergei Golubchik's avatar
      MDEV-4283 Assertion `scale <= precision' fails in strings/decimal.c · 8f607aae
      Sergei Golubchik authored
        
      with decimals=NOT_FIXED_DEC it is possible to have 'decimals' larger
      than 'max_length', it's not an error for temporal functions.
        
      But when Item_func_numhybrid converts the value to DECIMAL_RESULT,
      it must limit 'decimals' to be a valid scale of a decimal number.
      8f607aae
  15. 17 Mar, 2013 3 commits
  16. 14 Mar, 2013 3 commits
  17. 13 Mar, 2013 1 commit
    • Sergei Golubchik's avatar
      MDEV-4265 5.5 is slower than 5.3 because of many str_to_datetime calls · 372bc22b
      Sergei Golubchik authored
      get_datetime_value() should not double-cache its own Item_cache_temporal items,
      but it *should* cache other Item_cache items, such as Item_cache_str.
      
      sql/item.h:
        shortcut, to avoid going through the switch in Item::cmp_type()
      sql/item_cmpfunc.cc:
        even if the item is Item_cache_str - it still needs to be converted and cached.
      sql/item_timefunc.h:
        all descendants of Item_temporal_func always have cmp_type==TIME_RESULT.
        Even Item_date_add_interval, that might have field_type == MYSQL_TYPE_STRING.
      372bc22b
  18. 11 Mar, 2013 1 commit
  19. 12 Mar, 2013 1 commit