1. 22 Mar, 2007 19 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 4bd7d6c5
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      sql/item_timefunc.h:
        merging
      4bd7d6c5
    • unknown's avatar
      bug #16546 (DATETIME+0 not always coerced the same way) · 2b983572
      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.
      2b983572
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 475384c9
      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
      475384c9
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-4.1-opt · 23354862
      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
      23354862
    • unknown's avatar
      bug #16546 (DATETIME + 0 not always coerced in the same way) · 50b5064c
      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
      50b5064c
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · f4a8bade
      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
      f4a8bade
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0 · 1fdab610
      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
      1fdab610
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1 · d152debd
      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
      d152debd
    • unknown's avatar
      merging · 9f9e2f2d
      unknown authored
      9f9e2f2d
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 3e75a5ce
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      3e75a5ce
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my51-25492 · 2ce04bdc
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      2ce04bdc
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-4.1-opt · 52d36629
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      
      52d36629
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my50-25492 · e98c61bb
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      e98c61bb
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my41-25492 · 6ef0fee8
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-4.1-opt
      
      
      6ef0fee8
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my50-25492 · 2a480ced
      unknown authored
      into  mysql.com:/home/hf/work/25492/my51-25492
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      2a480ced
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my41-25492 · b745f117
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      libmysqld/lib_sql.cc:
        merging
      b745f117
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · bd36057b
      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
      bd36057b
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 941f2fb9
      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
      941f2fb9
    • unknown's avatar
      Fixed bug #27362: crash at evaluation of IN predicate when one · a4a23fb9
      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.
      a4a23fb9
  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 · 2fd63201
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27257
      
      
      sql/item_sum.cc:
        Auto merged
      2fd63201
    • unknown's avatar
      Fixed bug #27257: queries containing subqueries with COUNT(*) · 91f7f318
      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.
      91f7f318
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · bac27bb9
      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
      bac27bb9
    • unknown's avatar
      Bug #24484: · 9c89dd65
      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
      9c89dd65
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · c2426620
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
      
      
      sql/sql_insert.cc:
        Auto merged
      c2426620
  4. 19 Mar, 2007 6 commits
    • unknown's avatar
      sql_insert.cc: · c71bff6d
      unknown authored
        After merge fix.
      
      
      sql/sql_insert.cc:
        After merge fix.
      c71bff6d
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/27006-bug-5.0-opt-mysql · ca16e703
      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.
      ca16e703
    • unknown's avatar
      sql_insert.cc: · 3798a7d5
      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.
      3798a7d5
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · f81e917a
      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
      f81e917a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · e9bb08ac
      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.
      e9bb08ac
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 14ab9bef
      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
      14ab9bef
  5. 17 Mar, 2007 1 commit
    • unknown's avatar
      dbug/dbug.c: unused variable removed · 6bb42080
      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
      6bb42080