1. 08 Mar, 2007 1 commit
    • unknown's avatar
      Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt · 52ce1b73
      unknown authored
      into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
      
      
      BUILD/check-cpu:
        Auto merged
      mysql-test/r/explain.result:
        Auto merged
      mysql-test/r/func_str.result:
        Auto merged
      mysql-test/r/func_test.result:
        Auto merged
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/r/update.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/explain.test:
        Auto merged
      mysql-test/t/func_str.test:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      sql/sql_base.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_load.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.h:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      mysql-test/r/func_in.result:
        SCCS merged
      mysql-test/r/order_by.result:
        SCCS merged
      mysql-test/r/sp.result:
        merging
      mysql-test/t/func_in.test:
        SCCS merged
      mysql-test/t/order_by.test:
        SCCS merged
      mysql-test/t/view.test:
        merging
      sql/item_cmpfunc.h:
        merging
      sql/mysql_priv.h:
        merging
      sql/sql_select.cc:
        SCCS merged
      52ce1b73
  2. 07 Mar, 2007 8 commits
    • unknown's avatar
      sql_select.cc: · 1631f65d
      unknown authored
        Postfix for bug#22331 for windows platform.
      explain.test, explain.result:
        Cleanup after bugfix#22331.
      
      
      mysql-test/t/explain.test:
        Cleanup after bugfix#22331.
      mysql-test/r/explain.result:
        Cleanup after bugfix#22331.
      sql/sql_select.cc:
        Postfix for bug#22331 for windows platform.
      1631f65d
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · d7738740
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
      
      
      sql/sql_select.cc:
        Auto merged
      d7738740
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/22331-bug-5.0-opt-mysql · 6f18c392
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
      
      
      mysql-test/r/subselect.result:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_lex.cc:
        SCCS merged
      6f18c392
    • unknown's avatar
      Bug#25373: Stored functions wasn't compared correctly which leads to a wrong · 11b533b8
      unknown authored
      result.
      
      For built-in functions like sqrt() function names are hard-coded and can be
      compared by pointer. But this isn't the case for a used-defined stored
      functions - names there are dynamical and should be compared as strings.
      
      Now the Item_func::eq() function employs my_strcasecmp() function to compare
      used-defined stored functions names.
      
      
      mysql-test/t/sp.test:
        Added a test case for bug#25373: Stored functions wasn't compared correctly which leads to a wrong result.
      mysql-test/r/sp.result:
        Added a test case for bug#25373: Stored functions wasn't compared correctly which leads to a wrong result.
      sql/item_func.cc:
        Bug#25373: Stored functions wasn't compared correctly which leads to a wrong
        result.
        Now the Item_func::eq() function employs my_strcasecmp() function to compare
        used-defined stored functions names.
      11b533b8
    • unknown's avatar
      Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized · 6de27791
      unknown authored
      away.
      
      During optimization stage the WHERE conditions can be changed or even
      be removed at all if they know for sure to be true of false. Thus they aren't
      showed in the EXPLAIN EXTENDED which prints conditions after optimization.
      
      Now if all elements of an Item_cond were removed this Item_cond is substituted
      for an Item_int with the int value of the Item_cond.
      If there were conditions that were totally optimized away then values of the
      saved cond_value and having_value will be printed instead.
      
      
      mysql-test/t/explain.test:
        Added a test case for the bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away.
      mysql-test/r/subselect.result:
        Corrected test case result after fix for bug#22331.
      mysql-test/r/func_test.result:
        Corrected test case result after fix for bug#22331.
      mysql-test/r/explain.result:
        Added a test case for the bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away.
      sql/sql_select.cc:
        Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized
        away.
        Now if all elements of an Item_cond were removed this Item_cond is substituted
        for an Item_int with the int value of the Item_cond.
        If there were conditions that were totally optimized away then values of the
        saved cond_value and having_value will be printed instead.
      sql/sql_lex.h:
        Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized
        away.
        The cond_value and the having_value variables are
        added to the SELECT_LEX class.
      sql/sql_lex.cc:
        Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized
        away.
        The initialization of the cond_value and the having_value variables.
      sql/sql_select.h:
        Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized
        away.
        Now having_value is also stored in the JOIN class.
      6de27791
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · e4cdb580
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26560
      
      
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      e4cdb580
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · cbd324d2
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
      
      
      cbd324d2
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · cf31dff6
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/25376-bug-5.0-opt-mysql
      
      
      sql/sql_select.cc:
        Auto merged
      cf31dff6
  3. 06 Mar, 2007 3 commits
    • unknown's avatar
      Bug#25376: Incomplete setup of ORDER BY clause results in a wrong result. · 38acf43e
      unknown authored
      Functions over sum functions wasn't set up correctly for the ORDER BY clause
      which leads to a wrong order of the result set.
      
      The split_sum_func() function is called now for each ORDER BY item that
      contains a sum function to set it up correctly.
      
      
      mysql-test/t/order_by.test:
        Added a test case for bug#25376: Incomplete setup of ORDER BY clause results in a wrong result.
      mysql-test/r/order_by.result:
        Added a test case for bug#25376: Incomplete setup of ORDER BY clause results in a wrong result.
      sql/sql_select.cc:
        Bug#25376: Incomplete setup of ORDER BY clause results in a wrong result.
        The split_sum_func() function is called now for each ORDER BY item that
        contains a sum function to set it up correctly.
      38acf43e
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 6a178d29
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
      
      
      sql/item_cmpfunc.h:
        Auto merged
      6a178d29
    • unknown's avatar
      a232d81e
  4. 05 Mar, 2007 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt · 4b40ed95
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/clean-5.0-opt-mysql
      
      
      mysql-test/t/update.test:
        Auto merged
      mysql-test/r/update.result:
        Manually merged
      sql/sql_base.cc:
        Manually merged
      sql/sql_select.cc:
        Manually merged
      4b40ed95
    • unknown's avatar
      Fixed bug #26560. · 6da758c2
      unknown authored
      The flag alias_name_used was not set on for the outer references
      in subqueries. It resulted in replacement of any outer reference
      resolved against an alias for a full field name when the frm 
      representation of a view with a subquery was generated. 
      If the subquery and the outer query referenced the same table in
      their from lists this replacement effectively changed the meaning
      of the view and led to wrong results for selects from this view. 
      
      Modified several functions to ensure setting the right value of
      the alias_name_used flag for outer references resolved against
      aliases.
       
      
      
      mysql-test/r/view.result:
        Added a test case for bug #26560.
      mysql-test/t/view.test:
        Added a test case for bug #26560.
      sql/item.cc:
        Fixed bug #26560.
        Made the function resolve_ref_in_select_and_group analyze the return
        value of the last parameter with the type of the name resolution for
        the submitted reference. If the reference has been resolved against 
        an alias name from select list then its flag alias_name_used is set on.
        Now this value is used in Item_field::fix_outer_field to initialize the flag
        when the item_ref object is created for an outer reference.
        Added a parameter for the second Item_ref::Item_ref constructor to initialize
        properly the flag alias_name_used. The default value of the parameter is FALSE.
        If this flag is set on at the creation of an object by this constructor it
        will never be changed. Corrected appropriately the Item_ref::set_properties
        function.
        The function Item_ref::print now prints alias name for an outer reference
        if the flag alias_name_used is set on.
      sql/item.h:
        Fixed bug #26560.
        Added a parameter for the second Item_ref::Item_ref constructor to initialize
        properly the flag alias_name_used. The default value of the parameter is FALSE.
        A similar change has been applied to the first Item_direct_ref::Item_direct_ref
        constructor.
      sql/mysql_priv.h:
        Fixed bug #26560.
        Added an an enumeration type enum_resolution_type to return info on
        how the function find_item_in_list has resolved the submitted item.
        The type is used only for this function.
      sql/sql_base.cc:
        Fixed bug #26560.
        Made the last parameter of the function find_field_in_tables return
        more detailed information on how the submitted item has been resolved.
        Now it says whether the item has been resolved
          against an alias name,
          or as a field name without alias,
          or as a field name hidden by alias, 
          or was resolved ignoring alias.
      sql/sql_select.cc:
        Fixed bug #26560.
        Took into account the new type of the last parameter of the function
        find_item_in_list.
      6da758c2
  5. 03 Mar, 2007 1 commit
    • unknown's avatar
      Bug#25126: Wrongly resolved field leads to a crash. · 72773f4f
      unknown authored
      When the ORDER BY clause gets fixed it's allowed to search in the current
      item_list in order to find aliased fields and expressions. This is ok for a
      SELECT but wrong for an UPDATE statement. If the ORDER BY clause will
      contain a non-existing field which is mentioned in the UPDATE set list
      then the server will crash due to using of non-existing (0x0) field.
      
      When an Item_field is getting fixed it's allowed to search item list for
      aliased expressions and fields only for selects.
      
      
      sql/sql_base.cc:
        Bug#25126: Wrongly resolved field leads to a crash.
        When an Item_field is getting fixed it's allowed to search item list for
        aliased expressions and fields only for selects.
      sql/sql_select.cc:
        Bug#25126: Wrongly resolved field leads to a crash.
        When an Item_field is getting fixed it's allowed to search item list for
        aliased expressions and fields only for selects.
      mysql-test/r/update.result:
        Added a test case for bug#25126: Wrongly resolved field leads to a crash.
      mysql-test/t/update.test:
        Added a test case for bug#25126: Wrongly resolved field leads to a crash.
      72773f4f
  6. 02 Mar, 2007 8 commits
    • unknown's avatar
      fixed win32 warnings · 476f91b5
      unknown authored
      476f91b5
    • unknown's avatar
      fixed win32 warning · 68915daf
      unknown authored
      68915daf
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 2ebd4396
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
      
      
      2ebd4396
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · f77eb487
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
      
      
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      f77eb487
    • unknown's avatar
      Bug #19342: · b114118a
      unknown authored
      Several problems here :
       1. The conversion to double of an hex string const item
       was not taking into account the unsigned flag.
       
       2. IN was not behaving in the same was way as comparisons
       when performed over an INT/DATE/DATETIME/TIMESTAMP column
       and a constant. The ordinary comparisons in that case 
       convert the constant to an INTEGER value and do int 
       comparisons. Fixed the IN to do the same.
       
       3. IN is not taking into account the unsigned flag when 
       calculating <expr> IN (<int_const1>, <int_const2>, ...).
       Extended the implementation of IN to store and process
       the unsigned flag for its arguments.
      
      
      mysql-test/r/func_in.result:
        Bug #19342: test case
      mysql-test/t/func_in.test:
        Bug #19342: test case
      sql/item.h:
        Bug #19342: correct handling of sign in conersion to real.
      sql/item_cmpfunc.cc:
        Bug #19342: exteneded the IN values list
         to support unsigned longlong values.
         Correct comparison of integers in IN with
         regard of signedness.
         Compare DATE/DATETIME/TIMESTAMP values as
         integers in IN.
      sql/item_cmpfunc.h:
        Bug #19342: exteneded the IN values list
         to support unsigned longlong values.
         Correct comparison of integers in IN with
         regard of signedness.
      b114118a
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 2464f108
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26537-5.0-opt
      
      
      2464f108
    • unknown's avatar
      sql_base.cc: · 19948e8a
      unknown authored
        Post fix for bug#25122.
      
      
      sql/sql_base.cc:
        Post fix for bug#25122.
      19948e8a
    • unknown's avatar
      Bug #26537: item_unhex() was not expected · 399bf23c
      unknown authored
      to return NULL for non-NULL arguments.
      This is not the case as it can return NULL
      for invalid hexidecimal strings.
      Fixed by setting the maybe_null flag.
      
      
      mysql-test/r/func_str.result:
        Bug #26537: test case
      mysql-test/t/func_str.test:
        Bug #26537: test case
      sql/item_strfunc.h:
        Bug #26537: item_unhex() can return NULLs
        even for guaranteed non-null arguments.
      399bf23c
  7. 01 Mar, 2007 3 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · b72e3110
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/25122-bug-5.0-opt-mysql
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_delete.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_load.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      b72e3110
    • unknown's avatar
      Bug#25122: Views based on a self-joined table aren't insertable. · 1437a9c5
      unknown authored
      When INSERT is done over a view the table being inserted into is 
      checked to be unique among all views tables. But if the view contains
      self-joined table an error will be thrown even if all tables are used under
      different aliases.
      
      The unique_table() function now also checks tables' aliases when needed.
      
      
      sql/mysql_priv.h:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Updated prototype of the unique_table() function.
      sql/sql_base.cc:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Now the unique_table() function checks tables' aliases when needed.
      sql/sql_delete.cc:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Updated calls to the unique_table() function.
      sql/sql_insert.cc:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Updated calls to the unique_table() function.
      sql/sql_load.cc:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Updated calls to the unique_table() function.
      sql/sql_parse.cc:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Updated calls to the unique_table() function.
      sql/sql_update.cc:
        Bug#25122:  Views based on a self-joined table aren't insertable.
        Updated calls to the unique_table() function.
      1437a9c5
    • unknown's avatar
      Correctly recognize Intel Core2Duo Extreme · a0684ef2
      unknown authored
      in build.
      
      
      BUILD/check-cpu:
        Correctly recognize Intel Core2Duo Extreme.
      a0684ef2
  8. 28 Feb, 2007 3 commits
  9. 27 Feb, 2007 8 commits
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · 9cf5f2c9
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.1-bug26117
      
      
      9cf5f2c9
    • unknown's avatar
      BUG#26117 "index_merge sort-union over partitioned table crashes" · b68a2201
      unknown authored
      Before the fix: 
        ha_partition objects had ha_partition::m_part_info==NULL and that caused
        crash
      After: 
      - The new ha_partition::clone() function makes the clones use parent's
        m_part_info value.
      - The parent ha_partition object remains responsible for deallocation of
        m_part_info.
      
      
      mysql-test/r/partition_innodb.result:
        BUG#26117 "index_merge sort-union over partitioned table crashes"
         - Testcase
      mysql-test/t/partition_innodb.test:
        BUG#26117 "index_merge sort-union over partitioned table crashes"
         - Testcase
      b68a2201
    • unknown's avatar
      Fix (last) compiler warnings · ae72e394
      unknown authored
      
      storage/innobase/pars/lexyy.c:
        Fix compiler warnings (fix is also in pars0lex.l)
      support-files/compiler_warnings.supp:
        Extra safety to ensure we really get rid of warning :)
      ae72e394
    • unknown's avatar
      Remove compiler warnings · 3956f591
      unknown authored
      
      mysql-test/mysql-test-run.pl:
        Fix warning when using --extern
      sql/field.cc:
        Fix wrong fix
      sql/ha_ndbcluster.cc:
        Better fixes to remove compiler warnings
      sql/ha_ndbcluster_binlog.cc:
        Better fixes to remove compiler warnings
      sql/log.cc:
        Fix compiler warnings
      sql/sql_parse.cc:
        Indentation fix
      sql/sql_table.cc:
        Indentation fixes
      storage/myisammrg/ha_myisammrg.cc:
        Fix compiler warnings
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
        Fix compiler warnings
      support-files/compiler_warnings.supp:
        Suppress all 'safe' warnings, as detected by win64
      win/README:
        Fixed typo
      3956f591
    • unknown's avatar
      Fixes for compiler warnings. · 175507b7
      unknown authored
      
      include/my_dbug.h:
        Added macro for fixing compiler warnings.
      sql/field.cc:
        Fixed compiler warnings.
      sql/ha_ndbcluster.cc:
        Fixed compiler warnings.
      sql/ha_ndbcluster_binlog.cc:
        Fixed compiler warnings.
        Changed some tabs into spaces.
      sql/rpl_injector.h:
        Fixed compiler warnings.
      sql/sql_binlog.cc:
        Fixed compiler warnings.
      sql/sql_repl.cc:
        Fixed compiler warnings.
      sql/sql_table.cc:
        Fixed compiler warnings.
      storage/myisammrg/ha_myisammrg.cc:
        Fixed compiler warnings.
      strings/ctype-ucs2.c:
        Fixed compiler warnings.
      strings/ctype-utf8.c:
        Fixed compiler warnings.
      support-files/compiler_warnings.supp:
        Added suppressed warnings.
      175507b7
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · 13f1e40b
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      sql/sql_select.cc:
        Auto merged
      13f1e40b
    • unknown's avatar
      removed unused variable · 3a520a78
      unknown authored
      3a520a78
    • unknown's avatar
      after merge fix · 6e133525
      unknown authored
      6e133525
  10. 26 Feb, 2007 3 commits
    • unknown's avatar
      after merge fix · 79a6e0fe
      unknown authored
      79a6e0fe
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · 6247e1b2
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_union.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      6247e1b2
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.1 · 536adef6
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_union.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      536adef6