1. 22 Mar, 2007 11 commits
  2. 21 Mar, 2007 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · aca0c227
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/23345-bug-5.0-opt-mysql
      
      aca0c227
    • unknown's avatar
      Bug#23345: Wrongly allowed INTO in a non-last select of a UNION. · 685219e1
      unknown authored
      INTO clause can be specified only for the last select of a UNION and it
      receives the result of the whole query. But it was wrongly allowed in
      non-last selects of a UNION which leads to a confusing query result.
      
      Now INTO allowed only in the last select of a UNION.
      
      
      mysql-test/t/union.test:
        Added a test case for the bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
      mysql-test/r/union.result:
        Added a test case for the bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
      sql/sql_yacc.yy:
        Bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
        Now INTO allowed only in the last select of a UNION.
      685219e1
  3. 20 Mar, 2007 5 commits
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 2151ea4e
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27257
      
      
      sql/item_sum.cc:
        Auto merged
      2151ea4e
    • unknown's avatar
      Fixed bug #27257: queries containing subqueries with COUNT(*) · 73fd6471
      unknown authored
      aggregated in outer context returned wrong results.
      This happened only if the subquery did not contain any references
      to outer fields.
      As there were no references to outer fields the subquery erroneously
      was taken for non-correlated one.
      Now any set function aggregated in outer context makes the subquery
      correlated.
      
      
      mysql-test/r/subselect.result:
        Added a test case for bug #27257.
      mysql-test/t/subselect.test:
        Added a test case for bug #27257.
      73fd6471
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · fa3f091f
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B24484-5.0
      
      
      mysql-test/r/subselect3.result:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      fa3f091f
    • unknown's avatar
      Bug #24484: · b8912903
      unknown authored
      To correctly decide which predicates can be evaluated with a given table
      the optimizer must know the exact set of tables that a predicate depends 
      on. If that mask is too wide (refer to non-existing tables) the optimizer
      can erroneously skip a predicate.
      One such case of wrong table usage mask were the aggregate functions.
      The have a all-1 mask (meaning depend on all tables, including non-existent
      ones).
      Fixed by making a real used_tables mask for the aggregates. The mask is
      constructed in the following way :
      1. OR the table dependency masks of all the arguments of the aggregate.
      2. If all the arguments of the function are from the local name resolution 
        context and it is evaluated in the same name resolution
        context where it is referenced all the tables from that name resolution 
        context are OR-ed to the dependency mask. This is to denote that an
        aggregate function depends on the number of rows it processes.
      3. Handle correctly the case of an aggregate function optimization (such that
        the aggregate function can be pre-calculated and made a constant).
      
      Made sure that an aggregate function is never a constant (unless subject of a 
      specific optimization and pre-calculation).  
      
      One other flaw was revealed and fixed in the process : references were 
      not calling the recalculation method for used_tables of their targets.
      
      
      mysql-test/r/subselect3.result:
        Bug #24484: test case
      mysql-test/t/subselect3.test:
        Bug #24484: test case
      sql/item.h:
        Bug #24484: Item_ref must update the used tables.
      sql/item_sum.cc:
        Bug #24484: correct calculation of used_tables for aggregates.
      sql/item_sum.h:
        Bug #24484: correct calculation of used_tables for aggregates.
      sql/opt_range.cc:
        Bug #24484: fixed ref resolution in loose index scan
      sql/sql_base.cc:
        Bug #24484: moved counting of leaf tables inside 
        setup_tables_and_check_access.
      sql/sql_class.h:
        Bug #24484: changed table count to more narrow type.
      sql/sql_insert.cc:
        Bug #24484: moved counting of leaf tables inside 
        setup_tables_and_check_access. Substract the first
        table (and its subtables) of an INSERT statement
        from leaf_count.
      sql/sql_select.cc:
        Bug #24484: correct check for aggregates
      b8912903
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · c50f7219
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
      
      
      sql/sql_insert.cc:
        Auto merged
      c50f7219
  4. 19 Mar, 2007 3 commits
    • unknown's avatar
      sql_insert.cc: · 8eae769c
      unknown authored
        After merge fix.
      
      
      sql/sql_insert.cc:
        After merge fix.
      8eae769c
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/27006-bug-5.0-opt-mysql · 9e408f2d
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
      
      
      mysql-test/r/trigger.result:
        Auto merged
      mysql-test/t/trigger.test:
        Auto merged
      sql/sql_insert.cc:
        Manually merged.
      9e408f2d
    • unknown's avatar
      sql_insert.cc: · a72aa6a6
      unknown authored
        Removed wrong fix for the bug#27006.
        The bug was added by the fix for the bug#19978 and fixed by Monty on 2007/02/21.
      trigger.test, trigger.result:
        Corrected test case for the bug#27006.
      
      
      sql/sql_insert.cc:
        Removed wrong fix for the bug#27006.
        The bug was added by the fix for the bug#19978 and fixed by Monty on 2007/02/21.
      mysql-test/t/trigger.test:
        Corrected test case for the bug#27006.
      mysql-test/r/trigger.result:
        Corrected test case for the bug#27006.
      a72aa6a6
  5. 17 Mar, 2007 2 commits
    • unknown's avatar
      dbug/dbug.c: unused variable removed · fc9c22db
      unknown authored
      include/config-win.h: SIZEOF_INT
      include/my_global.h: win64 fix
      support-files/Makefile.am: automake magic
      
      
      dbug/dbug.c:
        unused variable removed
      include/config-win.h:
        SIZEOF_INT
      include/my_global.h:
        win64 fix
      support-files/Makefile.am:
        automake magic
      fc9c22db
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · e0e860d8
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
      
      
      sql/sql_insert.cc:
        Auto merged
      e0e860d8
  6. 16 Mar, 2007 17 commits
    • unknown's avatar
      wl#3700 - post-review fixes: · ce4c93bf
      unknown authored
      s/ulonglong/key_part_map/, comments
      
      
      include/heap.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      include/my_base.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      include/myisam.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      include/myisammrg.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/event_db_repository.cc:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/ha_partition.cc:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/ha_partition.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/sql_select.h:
        wl#3700 - post-review fixes:
        remove tab_to_keypart_map()
      ce4c93bf
    • unknown's avatar
      sql_insert.cc: · 3cc5e86f
      unknown authored
        Post-merge fix.
      
      
      sql/sql_insert.cc:
        Post-merge fix.
      3cc5e86f
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · ec8c7219
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_help.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      ec8c7219
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/27006-bug-5.0-opt-mysql · 7ee6ebbe
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
      
      
      mysql-test/r/trigger.result:
        Auto merged
      mysql-test/t/trigger.test:
        Auto merged
      sql/sql_insert.cc:
        Manually merged
      7ee6ebbe
    • unknown's avatar
      remove unnecessary line · b7c57129
      unknown authored
      b7c57129
    • unknown's avatar
      merging · 9e2a1d9c
      unknown authored
      9e2a1d9c
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 1579e852
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      mysql-test/r/insert_update.result:
        Auto merged
      mysql-test/t/insert_update.test:
        Auto merged
      mysql-test/t/skip_grants.test:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_insert.cc:
        merging
      1579e852
    • unknown's avatar
      Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY · 1238f850
      unknown authored
      UPDATE if the row wasn't actually changed.
      
      This bug was caused by fix for bug#19978. It causes AFTER UPDATE triggers
      not firing if a row wasn't actually changed by the update part of the
      INSERT .. ON DUPLICATE KEY UPDATE.
      
      Now triggers are always fired if a row is touched by the INSERT ... ON
      DUPLICATE KEY UPDATE.
      
      
      sql/sql_insert.cc:
        Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY
        UPDATE if the row wasn't actually changed.
        Now triggers are always fired if a row is touched by the INSERT ... ON
        DUPLICATE KEY UPDATE.
      mysql-test/r/trigger.result:
        Added a test case for the bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY
        UPDATE if the row wasn't actually changed.
      mysql-test/t/trigger.test:
        Added a test case for the bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY
        UPDATE if the row wasn't actually changed.
      1238f850
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · 0dab9a38
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
      
      
      include/my_global.h:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/slave.h:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_select.h:
        Auto merged
      sql/sql_servers.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      sql/tztime.cc:
        Auto merged
      storage/heap/ha_heap.cc:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      storage/myisammrg/ha_myisammrg.h:
        Auto merged
      0dab9a38
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 0583358e
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26261-5.0-opt
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      mysql-test/r/insert_update.result:
        SCCS merged
      mysql-test/t/insert_update.test:
        SCCS merged
      0583358e
    • unknown's avatar
      Bug #26261: · 6c2b21ba
      unknown authored
       INSERT uses query_id to verify what fields are
       mentioned in the fields list of the INSERT command.
       However the check for that is made after the 
       ON DUPLICATE KEY is processed. This causes all
       the fields mentioned in ON DUPLICATE KEY to be 
       considered as mentioned in the fields list of 
       INSERT.
       Moved the check up, right after processing the
       fields list.
      
      
      mysql-test/r/insert_update.result:
        Bug #26261: test case
      mysql-test/t/insert_update.test:
        Bug #26261: test case
      sql/mysql_priv.h:
        Bug #26261: moved the check inside mysql_prepare_insert
      sql/sql_insert.cc:
        Bug #26261: move the check inside mysql_prepare_insert
        before setting up the ON DUPLICATE KEY part
      sql/sql_prepare.cc:
        Bug #26261: moved the check inside mysql_prepare_insert
      6c2b21ba
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · ed685138
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      ed685138
    • unknown's avatar
      Bug#26285 selecting information_schema crahes server · 723bac48
      unknown authored
      The crash happens when 'skip-grant-tables' is enabled.
      We skip the filling of I_S privilege tables 
      if acl_cache is not initialized.
      
      
      mysql-test/r/skip_grants.result:
        test result
      mysql-test/t/skip_grants.test:
        test case
      sql/sql_acl.cc:
        skip filling of I_S privilege tables
        if acl_cache is not initialized
      723bac48
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · d59530cb
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      d59530cb
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 0d851a4f
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      0d851a4f
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · f1389ad0
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      f1389ad0
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 01fde8e1
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      sql/sql_parse.cc:
        Auto merged
      01fde8e1