1. 13 May, 2006 1 commit
    • unknown's avatar
      Fixed bug #19490. The bug that caused server crash manifested · 7bb4f778
      unknown authored
      itself when executing queries referring to a view with GROUP BY
      an expression containing non-constant interval.
      It happened because Item_date_add_interval::eq neglected the
      fact that the method can be applied to an expression of the form
          date(col) + interval time_to_sec(col) second
      at the time when col could not be evaluated yet.
      An attempt to evaluate time_to_sec(col) in this method resulted
      in a crash.
      
      
      mysql-test/r/view.result:
        Added a test case for bug #19490.
      mysql-test/t/view.test:
        Added a test case for bug #19490.
      sql/item_timefunc.cc:
        Fixed bug #19490. The bug that caused server crash manifested
        itself when executing queries referring to a view with GROUP BY
        an expression containing non-constant interval.
        It happened because Item_date_add_interval::eq neglected the
        fact that the method can be applied to an expression of the form
            date(col) + interval time_to_sec(col) second
        at the time when col could not be evaluated yet.
        An attempt to evaluate time_to_sec(col) in this method resulted
        in a crash.
        The code of Item_date_add_interval::eq was corrected.
      7bb4f778
  2. 12 May, 2006 15 commits
    • unknown's avatar
      Merge mysql.com:/home/kgeorge/mysql/5.0/clean · 63f71b5b
      unknown authored
      into  mysql.com:/home/kgeorge/mysql/5.0/B7549
      
      
      mysql-test/r/subselect.result:
        Auto merged
      63f71b5b
    • unknown's avatar
      Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes · 9ffa09be
      unknown authored
      replaced get_field(MEM_ROOT *mem, Field *field) with 
      get_field(MEM_ROOT *mem, Field *field, String *res).
      It allows to avoid strlen().
      
      
      mysql-test/r/information_schema.result:
        Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
        test case
      mysql-test/t/information_schema.test:
        Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
        test case
      9ffa09be
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0 · 7c5b7438
      unknown authored
      into mysql.com:/home/gluh/MySQL/Merge/5.0
      
      
      7c5b7438
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0 · 81878d7a
      unknown authored
      into mysql.com:/home/gluh/MySQL/Merge/5.0
      
      
      81878d7a
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · 97b4446a
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      97b4446a
    • unknown's avatar
      merge fixies BUG#10418 4.1 -> 5.0 · e52288b5
      unknown authored
      e52288b5
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · a1a0efd3
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      a1a0efd3
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint · 5697820b
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      5697820b
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0 · c3516513
      unknown authored
      into mysql.com:/home/gluh/MySQL/Merge/5.0
      
      
      c3516513
    • unknown's avatar
      Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH · af797c16
      unknown authored
      
      mysql-test/r/information_schema.result:
        Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
        test case
      mysql-test/r/join.result:
        Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
        result fix
      mysql-test/t/information_schema.test:
        Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
        test case
      af797c16
    • unknown's avatar
      Correct spelling errors · f7d265a9
      unknown authored
      f7d265a9
    • unknown's avatar
      Merge mysql.com:/home/mysql-4.1-10418 · 98912fb9
      unknown authored
      into  mysql.com:/home/mysql-5.0-10418
      
      
      mysql-test/t/outfile.test:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      mysql-test/r/func_str.result:
        expect NULL rather than error if file given to load_file() doesn't exist
      mysql-test/r/outfile.result:
        expect NULL rather than error if file given to load_file() doesn't exist
      mysql-test/t/func_str.test:
        show that load_file() will return NULL rather than throw an error
        if file doesn't exist
      98912fb9
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/my50-bug19709 · 42c47bcb
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      42c47bcb
    • unknown's avatar
      Bug#19709 rpl_tmporary fails on powermacg5 · acf18799
      unknown authored
       - Don't kill the active connection to the server, instead read 
         the connection id, switch connection and kill the first one from there.
      
      
      mysql-test/r/rpl_temporary.result:
        Update test result
      mysql-test/t/rpl_temporary.test:
        Don't kill our own connection to the server as the result code differs depending 
        on platform.
      acf18799
    • unknown's avatar
      Added a test case for bug #18940:in 5.0 the optimizer chose · 5c6d923f
      unknown authored
      a worse execution plan than in 4.1 for some queries.
      It happened due the fact that at some conditions the 
      optimizer always preferred range or full index scan access
      methods to lookup access methods even when the latter were much
      cheaper. 
      The problem was not observed in 4.1 for the reported query
      because the WHERE condition was not of a form that could
      cause the problem.
      Equality propagation introduced on 5.0 added an extra 
      predicate and changed the WHERE condition. The new condition
      provoked the optimizer to make a bad choice.
      
      The problem was fixed by the patch for bug 17379.
      
      
      mysql-test/r/select.result:
        Added a test case for bug #18940.
        The problem was fixed by the patch for bug 17379.
      mysql-test/t/select.test:
        Added a test case for bug #18940.
        The problem was fixed by the patch for bug 17379.
      5c6d923f
  3. 11 May, 2006 3 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 60bb69aa
      unknown authored
      into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint
      
      
      client/mysql.cc:
        Auto merged
      60bb69aa
    • unknown's avatar
      BUG#7549: Missing error message for invalid view selection with subquery. · aeaaa456
      unknown authored
      When a view statement is compiled on CREATE VIEW time, most of the 
      optimizations should not be done. Finding the right optimization 
      for a subquery is one of them.
      Unfortunately the optimizer is resolving the column references of 
      the left expression of IN subqueries in the process of deciding 
      witch optimization to use (if needed). So there should be a 
      special case in Item_in_subselect::fix_fields() : check the 
      validity of the left expression of IN subqueries in CREATE VIEW 
      mode and then proceed as normal. 
      
      
      mysql-test/r/subselect.result:
        test case
      mysql-test/r/view.result:
        chnaged explain due to column being resolved
      mysql-test/t/subselect.test:
        test case
      sql/item_subselect.cc:
        overloaded fix_fields to fix the left_expr in prepare_view_mode
      sql/item_subselect.h:
        fix_fields overloaded so it can prepare left_expr
      aeaaa456
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1 · ec83dd7c
      unknown authored
      into  mysql.com:/home/mysql-4.1-10418
      
      
      ec83dd7c
  4. 10 May, 2006 14 commits
  5. 09 May, 2006 7 commits
    • unknown's avatar
      Merge xiphis.org:/home/antony/work2/p1-bug10952.1 · dac69dd4
      unknown authored
      into  xiphis.org:/home/antony/work2/mysql-5.0-engines-merge
      
      
      dac69dd4
    • unknown's avatar
      Merge acurtis@bk-internal:/home/bk/mysql-5.0-engines · f61748b7
      unknown authored
      into  xiphis.org:/home/antony/work2/p1-bug10952.1
      
      
      sql/handler.h:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      f61748b7
    • unknown's avatar
      bug#10952 · 6116d017
      unknown authored
        "alter table from MyISAM to MERGE lost data without errors and warnings"
        Add new handlerton flag which prevent user from altering table storage
        engine to storage engines which would lose data. Both 'blackhole' and 
        'merge' are marked with the new flag.
        Tests included.
      
      
      mysql-test/r/blackhole.result:
        test for bug#10952
      mysql-test/r/merge.result:
        test for bug#10952
      mysql-test/t/blackhole.test:
        test for bug#10952
      mysql-test/t/merge.test:
        test for bug#10952
      sql/ha_blackhole.cc:
        Bug#10952
          shouldn't be able to alter a table into a blackhole
      sql/ha_myisammrg.cc:
        Bug#10952
          shouldn't be able to alter a table into a merge
      sql/handler.h:
        Bug#10952
          new handlerton flag
      sql/sql_table.cc:
        Bug#10952
          If alter is changing engine, check if new engine allows creating table
          via ALTER statement.
      6116d017
    • unknown's avatar
      BUG#18068: SELECT DISTINCT (with duplicates and covering index) · baae7a97
      unknown authored
      When converting DISTINCT to GROUP BY where the columns are from the covering
      index and they are quoted twice in the SELECT list the optimizer is creating
      improper processing sequence. This is because of the fact that the columns
      of the covering index are not recognized as such and treated as non-index
      columns.
      
      Generally speaking duplicate columns can safely be removed from the GROUP
      BY/DISTINCT list because this will not add or remove new rows in the
      resulting set. Duplicates can be removed even if they are not consecutive
      (as is the case for ORDER BY, where the duplicate columns can be removed
      only if they are consecutive).
      
      So we can safely transform "SELECT DISTINCT a,a FROM ... ORDER BY a" to
      "SELECT a,a FROM ... GROUP BY a ORDER BY a" instead of 
      "SELECT a,a FROM .. GROUP BY a,a ORDER BY a". We can even transform 
      "SELECT DISTINCT a,b,a FROM ... ORDER BY a,b" to
      "SELECT a,b,a FROM ... GROUP BY a,b ORDER BY a,b".
      
      The fix to this bug consists of checking for duplicate columns in the SELECT
      list when constructing the GROUP BY list in transforming DISTINCT to GROUP
      BY and skipping the ones that are already in.
      
      
      mysql-test/r/distinct.result:
        test case for the bug without loose index scan
      mysql-test/r/group_min_max.result:
        test case for the bug
      mysql-test/t/distinct.test:
        test case for the bug without loose index scan
      mysql-test/t/group_min_max.test:
        test case for the bug
      sql/sql_select.cc:
        duplicates check and removal
      baae7a97
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0 · 3923cfd9
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      3923cfd9
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0 · 2d54e692
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      2d54e692
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0 · d6c2616c
      unknown authored
      into  mysql.com:/home/marty/MySQL/mysql-5.0
      
      
      d6c2616c