1. 22 Mar, 2007 19 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · a04d1c29
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      sql/item_timefunc.h:
        merging
      a04d1c29
    • unknown's avatar
      bug #16546 (DATETIME+0 not always coerced the same way) · aa1e73ca
      unknown authored
        fix for cast( AS DATETIME)+0 in 5.0 and above versions.
        val_real now works using val_decimal for DATETIME Items
        Superfluous val_real() methods deleted
      
      
      sql/item_timefunc.h:
        val_real() for datetime functions implemented
            as { return val_real_from_decimal(); }
            It's not a fastest possible way, but code is simple and less
            error-prone, what i belive is more important here as this part
            works unfrequently.
      aa1e73ca
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · ed962be6
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      mysql-test/r/type_datetime.result:
        Auto merged
      mysql-test/t/type_datetime.test:
        Auto merged
      sql/item_timefunc.h:
        merging
      ed962be6
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-4.1-opt · 1b601e64
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      
      mysql-test/t/type_datetime.test:
        Auto merged
      mysql-test/r/type_datetime.result:
        SCCS merged
      sql/item_timefunc.h:
        SCCS merged
      1b601e64
    • unknown's avatar
      bug #16546 (DATETIME + 0 not always coerced in the same way) · bd268daa
      unknown authored
        fix for cast( AS DATETIME) + 0 operation.
        I just implemented Item_datetime_typecast::val() method
        as it is usually done in other classes.
        Should be fixed more radically in 5.0
      
      
      mysql-test/r/type_datetime.result:
        result added
      mysql-test/t/type_datetime.test:
        testcase
      sql/item_timefunc.h:
        added double conversion to Item_datetime_typecast
      bd268daa
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 731545d9
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      sql/item.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      731545d9
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0 · 4986d75a
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      
      sql/item.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      4986d75a
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1 · b412813a
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      b412813a
    • unknown's avatar
      merging · 17541d36
      unknown authored
      17541d36
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 4b625b2f
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      4b625b2f
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my51-25492 · 616a114c
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      616a114c
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-4.1-opt · d6c46bdb
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      d6c46bdb
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my50-25492 · 0d91aacb
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      0d91aacb
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my41-25492 · b89a30c9
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-4.1-opt
      
      b89a30c9
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my50-25492 · 452ca4ce
      unknown authored
      into  mysql.com:/home/hf/work/25492/my51-25492
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      452ca4ce
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my41-25492 · 0a8a9f67
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      libmysqld/lib_sql.cc:
        merging
      0a8a9f67
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 27a65dbe
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      mysql-test/r/func_in.result:
        Auto merged
      mysql-test/t/func_in.test:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      27a65dbe
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · eb7ab8f9
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      mysql-test/r/subselect3.result:
        Auto merged
      mysql-test/r/union.result:
        Auto merged
      mysql-test/t/union.test:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/item_sum.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/r/subselect.result:
        merging
      mysql-test/t/subselect.test:
        merging
      sql/sql_base.cc:
        mergin
      sql/sql_class.h:
        merging
      sql/sql_select.cc:
        merging
      eb7ab8f9
    • unknown's avatar
      Fixed bug #27362: crash at evaluation of IN predicate when one · 3e950bba
      unknown authored
      of its argument happened to be a decimal expression returning
      the NULL value.
      The crash was due to the fact the function in_decimal::set did
      not take into account that val_decimal() could return 0 if 
      the decimal expression had been evaluated to NULL.  
      
      
      mysql-test/r/func_in.result:
        Added a test case for bug #27362.
      mysql-test/t/func_in.test:
        Added a test case for bug #27362.
      3e950bba
  2. 21 Mar, 2007 9 commits
  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 6 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
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · 48a40080
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      48a40080
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · a3531390
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      include/my_global.h:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/events_scheduling.result:
        Auto merged
      BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8:
        Auto merged
      BitKeeper/deleted/.del-mysql_create_system_tables.sh:
        Auto merged
      mysql-test/r/query_cache.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/events_scheduling.test:
        Auto merged
      mysql-test/t/grant_cache.test:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      scripts/mysql_system_tables_fix.sql:
        Auto merged
      sql/event_db_repository.cc:
        Auto merged
      sql/event_queue.cc:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sp_head.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_help.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/tztime.cc:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      storage/myisam/ha_myisam.h:
        Auto merged
      mysql-test/r/skip_grants.result:
        Manualmerge.
      mysql-test/r/sp.result:
        Manualmerge.
      mysql-test/t/skip_grants.test:
        Manualmerge.
      mysql-test/t/sp.test:
        Manualmerge.
      sql/event_data_objects.cc:
        Manualmerge.
      a3531390
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 21b4c428
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      sql/field.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/r/sp.result:
        SCCS merged
      mysql-test/t/sp.test:
        SCCS merged
      21b4c428
  5. 17 Mar, 2007 1 commit
    • 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