1. 26 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong · c1bbfb2b
      unknown authored
      result
      
      The IN function aggregates result types of all expressions. It uses that 
      type in comparison of left expression and expressions in right part. 
      This approach works in most cases. But let's consider the case when the
      right part contains both strings and integers. In that case this approach may
      cause wrong results because all strings which do not start with a digit are
      evaluated as 0.
      CASE uses the same approach when a CASE expression is given thus it's also
      affected.
      
      The idea behind this fix is to make IN function to compare expressions with
      different result types differently. For example a string in the left
      part will be compared as string with strings specified in right part and
      will be converted to real for comparison to int or real items in the right
      part.
      
      A new function called collect_cmp_types() is added. It collects different
      result types for comparison of first item in the provided list with each 
      other item in the list. 
      
      The Item_func_in class now can refer up to 5 cmp_item objects: 1 for each
      result type for comparison purposes. cmp_item objects are allocated according
      to found result types. The comparison of the left expression with any
      right part expression is now based only on result types of these expressions.
      
      The Item_func_case class is modified in the similar way when a CASE
      expression is specified. Now it can allocate up to 5 cmp_item objects
      to compare CASE expression with WHEN expressions of different types.
      The comparison of the CASE expression with any WHEN expression now based only 
      on result types of these expressions.
      
      
      
      sql/item.cc:
        Cleaned up an outdated comment.
      sql/item_cmpfunc.cc:
            Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong result
            A new function called collect_cmp_types() is added. It collects different
            result types for comparison of first item in the provided list with each 
            other item in the list. 
            The Item_func_in class now can refer up to 5 cmp_item objects: 1 for each
            result type for comparison purposes. cmp_item objects are allocated according
            to found result types. The comparison of the left expression with any
            right part expression is now based only on result types of these expressions.
            The Item_func_case class is modified in the similar way when a CASE
            expression is specified. Now it can allocate up to 5 cmp_item objects
            to compare CASE expression with WHEN expressions of different types.
            The comparison of the CASE expression with any WHEN expression now based only 
            on result types of these expressions.
      sql/item_cmpfunc.h:
            Fixed bug#18360: Type aggregation for IN and CASE may lead to a wrong result
            The Item_func_in class now can refer up to 5 cmp_item objects.
            The Item_func_case class is modified in the similar way.
      sql/opt_range.cc:
            Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong
            resultSmall code changes due to changes in Item_func_in class.
      mysql-test/t/view.test:
        Added a test comment
      mysql-test/t/func_in.test:
        Added a test case for bug#18360: Type aggregation for IN and CASE may lead to a wrong
        result
      mysql-test/r/func_in.result:
        Added a test case for bug#18360: Type aggregation for IN and CASE may lead to a wrong
        result
      c1bbfb2b
  2. 19 Sep, 2006 1 commit
  3. 18 Sep, 2006 13 commits
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.1 · 86b4ca84
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
      
      
      86b4ca84
    • unknown's avatar
      In current 5.1 build we don't build embedded server for windows (this will be · c690c11f
      unknown authored
      fixed when 5.1-win will be pushed into main tree).
      Commenting the libmysqld and libmysqld/example subdirectories will allow us 
      to upgrade from cmake 2.2 to 2.4.
      
      
      CMakeLists.txt:
        comment libmysqld and libmysqld/example directories
      c690c11f
    • unknown's avatar
      Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt · c8e15b21
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      c8e15b21
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · 665ebc05
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      665ebc05
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.1-opt · 50e1b9a2
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
      
      
      mysql-test/t/disabled.def:
        Auto merged
      50e1b9a2
    • unknown's avatar
      merge fixes · 379226c2
      unknown authored
      379226c2
    • unknown's avatar
      Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt · 5222b590
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
      
      
      mysql-test/r/func_gconcat.result:
        Auto merged
      mysql-test/r/func_group.result:
        Auto merged
      mysql-test/r/func_str.result:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/group_by.result:
        Auto merged
      mysql-test/r/heap_hash.result:
        Auto merged
      mysql-test/r/information_schema.result:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      mysql-test/r/join_outer.result:
        Auto merged
      mysql-test/r/olap.result:
        Auto merged
      mysql-test/r/query_cache.result:
        Auto merged
      mysql-test/r/range.result:
        Auto merged
      mysql-test/r/row.result:
        Auto merged
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/r/type_date.result:
        Auto merged
      mysql-test/r/union.result:
        Auto merged
      mysql-test/r/view_grant.result:
        Auto merged
      mysql-test/t/func_group.test:
        Auto merged
      mysql-test/t/func_str.test:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/opt_range.h:
        Auto merged
      sql/opt_sum.cc:
        Auto merged
      sql/sql_delete.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_list.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/t/sp.test:
        SCCS merged
      sql/item_cmpfunc.cc:
        SCCS merged
      sql/sql_select.cc:
        SCCS merged
      5222b590
    • unknown's avatar
      BUG#22393: Very wrong E(#rows(ref(const)) for key with skewed distribution · 5e34af32
      unknown authored
      - Check if we have E(#rows) for 'range' access on the smaller interval 
        on the same index. If yes, adjust the estimate.
      
      
      mysql-test/r/range.result:
        BUG#22393: Testcase
      mysql-test/t/range.test:
        BUG#22393: Testcase
      5e34af32
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-opt · db1a94a7
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
      
      
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      db1a94a7
    • unknown's avatar
      merge fixes · 4c8e0e19
      unknown authored
      4c8e0e19
    • unknown's avatar
      disabled.def: · 22589cae
      unknown authored
        Enabled rpl_sp_effects test due to fixed bug.
      
      
      mysql-test/t/disabled.def:
        Enabled rpl_sp_effects test due to fixed bug.
      22589cae
    • unknown's avatar
      Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt · 7a0f9c8d
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
      
      
      mysql-test/r/subselect.result:
        SCCS merged
      mysql-test/t/subselect.test:
        SCCS merged
      7a0f9c8d
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-4.1-opt · 96dbaffd
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
      
      
      96dbaffd
  4. 16 Sep, 2006 2 commits
    • unknown's avatar
      Fixed bug #21493: crash for the second execution of a function · 58e178c5
      unknown authored
      containing a select statement that uses an aggregating IN subquery.
      Added a parameter to the function fix_prepare_information 
      to restore correctly the having clause for the second execution.
      Saved andor structure of the having conditions at the proper moment
      before any calls of split_sum_func2 that could modify the having structure
      adding new Item_ref objects. (These additions, are produced not with 
      the statement mem_root, but rather with the execution mem_root.)
      
      
      mysql-test/r/sp.result:
        Added a test case for bug #21493.
      mysql-test/t/sp.test:
        Added a test case for bug #21493.
      sql/sql_delete.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_insert.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_lex.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_lex.h:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_update.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      58e178c5
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · daaf51fb
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
      
      
      sql/mysqld.cc:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      daaf51fb
  5. 15 Sep, 2006 23 commits
    • unknown's avatar
      Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint · 96b2748a
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
      
      
      include/my_net.h:
        Auto merged
      96b2748a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · 0dfa6c95
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
      
      
      BitKeeper/etc/ignore:
        auto-union
      mysql-test/mysql-test-run.pl:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      0dfa6c95
    • unknown's avatar
      Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1 · eceb0350
      unknown authored
      into  zim.(none):/home/brian/mysql/merge-5.1
      
      
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      storage/archive/ha_archive.cc:
        Auto merged
      eceb0350
    • unknown's avatar
      This changes the order of the universe, black is now the new white. · d79485a9
      unknown authored
      In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database. 
      
      
      include/mysql/plugin.h:
        Optional to pass parameter now to init and deinit functions
      sql/ha_ndbcluster.cc:
        Cleanup, handlerton is now a pointer.
      sql/ha_ndbcluster_binlog.cc:
        Cleanup (handlerton is now a pointer)
      sql/ha_ndbcluster_binlog.h:
        Cleanup (handlerton is now a pointer)
      sql/ha_partition.cc:
        Cleaned up handlerton change
      sql/handler.cc:
        Cheanup of handlerton change
      sql/item_sum.cc:
        Cleanedup of handlerton change
      sql/log.cc:
        Cleanup of handlerton change
      sql/mysql_priv.h:
        Reverted patch for variables (what would have happen previously if a have_ would have been called that was dynamically loaded? boom!)
      sql/mysqld.cc:
        Cleanup of handlerton changes and reverted have variable patch
      sql/partition_info.cc:
        Cleanup of handlerton (we need to clean this up a bit more).
      sql/set_var.cc:
        Cleanup related to handlerton changes
      sql/sql_cache.cc:
        Handlerton changes cleanup
      sql/sql_insert.cc:
        Handlerton changes cleanup.
      sql/sql_partition.cc:
        Handlerton cleanup changes
      sql/sql_plugin.cc:
        Handlerton changes.
        
        init() can now be controlled by a plugin specific startup. 
        
        There was also an issue with how we deinited the status variables. It should have been occuring before we shut down the engines.
      sql/sql_select.cc:
        Handlerton cleanup changes
      sql/sql_show.cc:
        Handlerton cleanup changes
      sql/sql_table.cc:
        Handlerton cleanup changes
      sql/table.cc:
        Cleanup
      storage/archive/ha_archive.cc:
        Cleanup
      storage/archive/ha_archive.h:
        Cleanup
      storage/blackhole/ha_blackhole.cc:
        Cleanup
      storage/csv/ha_tina.cc:
        Cleanup
      storage/example/ha_example.cc:
        Cleanup
      storage/federated/ha_federated.cc:
        Cleanup
      storage/heap/ha_heap.cc:
        Cleanup
      storage/innobase/handler/ha_innodb.cc:
        Cleanup
      storage/myisam/ha_myisam.cc:
        Cleanup
      storage/myisammrg/ha_myisammrg.cc:
        Cleanup
      d79485a9
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 24cdd480
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      24cdd480
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-4.1-opt · e5345197
      unknown authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/B21180-4.1-opt
      
      
      mysql-test/r/subselect.result:
        merge of 4.1-opt
      mysql-test/t/subselect.test:
        merge of 4.1-opt
      sql/opt_range.h:
        merge of 4.1-opt
      e5345197
    • unknown's avatar
      1e5685bd
    • unknown's avatar
      Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint · 39f28ab6
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
      
      
      BitKeeper/etc/ignore:
        auto-union
      BitKeeper/etc/config:
        Auto merged
      client/mysql.cc:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/mysql.result:
        Auto merged
      mysql-test/r/user_var.result:
        Auto merged
      mysql-test/t/mysql.test:
        Auto merged
      mysql-test/t/user_var.test:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      tests/Makefile.am:
        Auto merged
      vio/viosocket.c:
        Auto merged
      39f28ab6
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-maint · 9e1a6b0e
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      9e1a6b0e
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my51-work · 91a1db9d
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
      
      
      91a1db9d
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 66b6357e
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      66b6357e
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 607e99d0
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my51-work
      
      
      configure.in:
        Auto merged
      storage/ndb/include/ndb_global.h.in:
        SCCS merged
      607e99d0
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/bug20602/my50-bug20602 · 6373941a
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my50-work
      
      
      configure.in:
        Auto merged
      6373941a
    • unknown's avatar
      Merge msvensson.mysql.internal:mysql/my50-m-bug16574 · 05b14821
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my50-work
      
      
      05b14821
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 507edfc2
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my51-work
      
      
      configure.in:
        Auto merged
      507edfc2
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 0fa2995d
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      0fa2995d
    • unknown's avatar
      Merge msvensson.mysql.internal:mysql/my50-m-bug16576 · e15148ad
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my50-work
      
      
      configure.in:
        Auto merged
      e15148ad
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my51-work · 8e76d8e8
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
      
      
      8e76d8e8
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 2d755a34
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my51-work
      
      
      include/my_global.h:
        Auto merged
      2d755a34
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/work/my50-work · 860ae722
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      860ae722
    • unknown's avatar
      Merge msvensson.mysql.internal:mysql/my50-m-bug21222 · 040c9378
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/work/my50-work
      
      
      040c9378
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/bug22139/my51-bug22139 · 018d0b9f
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
      
      
      sql/share/errmsg.txt:
        Auto merged
      storage/innobase/Makefile.am:
        Auto merged
      tests/Makefile.am:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        SCCS merged
      018d0b9f
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/bug22139/my50-bug22139 · cb92ed64
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      tests/Makefile.am:
        Auto merged
      cb92ed64