1. 09 Mar, 2007 1 commit
    • unknown's avatar
      Fixed bug #26661: crash when order by clause in a union · d738e0ea
      unknown authored
      construct references invalid name.
      Derived tables currently cannot use outer references.
      Thus there is no outer context for them.
      The 4.1 code takes this fact into account while the 
      Item_field::fix_outer_field code of 5.0 lost the check that blocks
      any attempts to resolve names in outer context for derived tables.
      
      
      mysql-test/r/union.result:
        Added a test case for bug #26661.
      mysql-test/t/union.test:
        Added a test case for bug #26661.
      sql/item.cc:
        Fixed bug #26661.
        Derived tables currently cannot use outer references.
        Thus there is no outer context for them.
        The 4.1 code takes this fact into account while the 
        Item_field::fix_outer_field code of 5.0 lost the check that blocks
        any attempts to resolve names in outer context for derived tables.
      d738e0ea
  2. 07 Mar, 2007 3 commits
  3. 06 Mar, 2007 3 commits
    • unknown's avatar
      Bug#25376: Incomplete setup of ORDER BY clause results in a wrong result. · 447c074f
      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.
      447c074f
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · a2b894f9
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
      
      
      sql/item_cmpfunc.h:
        Auto merged
      a2b894f9
    • unknown's avatar
      2543a687
  4. 05 Mar, 2007 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt · bd341a2e
      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
      bd341a2e
    • unknown's avatar
      Fixed bug #26560. · b4c434c4
      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.
      b4c434c4
  5. 03 Mar, 2007 1 commit
    • unknown's avatar
      Bug#25126: Wrongly resolved field leads to a crash. · d524534d
      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.
      d524534d
  6. 02 Mar, 2007 8 commits
    • unknown's avatar
      fixed win32 warnings · 5fd380a2
      unknown authored
      5fd380a2
    • unknown's avatar
      fixed win32 warning · cb7b4185
      unknown authored
      cb7b4185
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 3bf9e43e
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
      
      3bf9e43e
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 77c98e8e
      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
      77c98e8e
    • unknown's avatar
      Bug #19342: · 6e5d8236
      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.
      6e5d8236
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · ed54d531
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26537-5.0-opt
      
      ed54d531
    • unknown's avatar
      sql_base.cc: · 93b3026e
      unknown authored
        Post fix for bug#25122.
      
      
      sql/sql_base.cc:
        Post fix for bug#25122.
      93b3026e
    • unknown's avatar
      Bug #26537: item_unhex() was not expected · 92dcffa0
      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.
      92dcffa0
  7. 01 Mar, 2007 3 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 54d724a6
      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
      54d724a6
    • unknown's avatar
      Bug#25122: Views based on a self-joined table aren't insertable. · e830f96f
      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.
      e830f96f
    • unknown's avatar
      Correctly recognize Intel Core2Duo Extreme · 618a34dd
      unknown authored
      in build.
      
      
      BUILD/check-cpu:
        Correctly recognize Intel Core2Duo Extreme.
      618a34dd
  8. 27 Feb, 2007 1 commit
  9. 26 Feb, 2007 3 commits
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0 · 9f0865f0
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-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
      9f0865f0
    • unknown's avatar
      Compiler warning suppression fix: Add missing file to 'make dist'. · 6c707f8a
      unknown authored
      
      support-files/Makefile.am:
        Add missing file to 'make dist'.
      6c707f8a
    • unknown's avatar
      item.cc, item.h: · af13e84e
      unknown authored
        Post fix for bug#23800.
      
      
      sql/item.h:
        Post fix for bug#23800.
      sql/item.cc:
        Post fix for bug#23800.
      af13e84e
  10. 25 Feb, 2007 1 commit
    • unknown's avatar
      item.h: · 923426a1
      unknown authored
        Post fix for bug#23800.
        Copy the table name of an Item_outer_ref to the conventional memory.
      
      
      sql/item.h:
        Post fix for bug#23800.
        Copy the table name of an Item_outer_ref to the conventional memory.
      923426a1
  11. 24 Feb, 2007 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 5ae9124e
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
      
      5ae9124e
    • unknown's avatar
      item.cc: · c9d90c56
      unknown authored
        Post fix for bug#23800.
        The Item_field constructor now increases the select_n_where_fields counter.
      sql_yacc.yy:
        Post fix for bug#23800.
        Take into account fields that might be added by subselects.
      sql_lex.h:
        Post fix for bug#23800.
        Added the select_n_where_fields variable to the st_select_lex class.
      sql_lex.cc:
        Post fix for bug#23800.
        Initialization of the select_n_where_fields variable.
      
      
      sql/sql_lex.cc:
        Post fix for bug#23800.
        Initialization of the select_n_where_fields variable.
      sql/sql_lex.h:
        Post fix for bug#23800.
        Added the select_n_where_fields variable to the st_select_lex class.
      sql/item.cc:
        Post fix for bug#23800.
        The Item_field constructor now increases the select_n_where_fields counter.
      sql/sql_yacc.yy:
        Post fix for bug#23800.
        Take into account fields that might be added by subselects.
      c9d90c56
  12. 22 Feb, 2007 8 commits
    • unknown's avatar
      Merge monty@192.168.0.9:/home/my/mysql-5.0 · fd8bc53e
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      
      ndb/include/util/OutputStream.hpp:
        Auto merged
      ndb/src/common/debugger/EventLogger.cpp:
        Auto merged
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
        Auto merged
      ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
        Auto merged
      ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
        Auto merged
      ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp:
        Auto merged
      ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
        Auto merged
      ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
        Auto merged
      ndb/src/mgmapi/mgmapi.cpp:
        Auto merged
      ndb/src/mgmsrv/InitConfigFileParser.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.hpp:
        Auto merged
      ndb/src/mgmsrv/Services.cpp:
        Auto merged
      ndb/src/ndbapi/ClusterMgr.hpp:
        Auto merged
      ndb/src/ndbapi/SignalSender.cpp:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      fd8bc53e
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 939e5b57
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      
      mysys/my_thr_init.c:
        Auto merged
      ndb/include/util/OutputStream.hpp:
        Auto merged
      ndb/src/common/debugger/EventLogger.cpp:
        Auto merged
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
        Auto merged
      ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
        Auto merged
      ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
        Auto merged
      ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp:
        Auto merged
      ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
        Auto merged
      ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
        Auto merged
      ndb/src/mgmapi/mgmapi.cpp:
        Auto merged
      ndb/src/mgmsrv/InitConfigFileParser.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.hpp:
        Auto merged
      ndb/src/mgmsrv/Services.cpp:
        Auto merged
      ndb/src/ndbapi/ClusterMgr.hpp:
        Auto merged
      ndb/src/ndbapi/SignalSender.cpp:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      939e5b57
    • unknown's avatar
      Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel · 8b7be70d
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      8b7be70d
    • unknown's avatar
      Portability fix · 8f0aacf9
      unknown authored
      Suppress compiler warnings from bdb and (for the moment) warnings from ndb
      
      
      client/mysqltest.c:
        Portability fix for windows (windows doesn't have mode_t)
      support-files/compiler_warnings.supp:
        Suppress warnings from bdb and (for the moment) warnings from ndb
      8f0aacf9
    • unknown's avatar
      Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel · 6d288d48
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      6d288d48
    • unknown's avatar
      Fixed compiler warnings (for linux and win32 and win64) · 5d34a1ca
      unknown authored
      Fixed a couple of usage of not initialized warnings (unlikely cases)
      
      
      client/mysqldump.c:
        Fixed compiler warnings from 'max' build
      client/mysqltest.c:
        Removed compiler warnings
      cmd-line-utils/readline/xmalloc.c:
        Fixed compiler warnings from 'max' build
      extra/comp_err.c:
        Fixed compiler warnings from 'max' build
      extra/yassl/include/openssl/ssl.h:
        Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
      extra/yassl/include/socket_wrapper.hpp:
        Moved socket_t to ssl.h, to be able to removed compiler warnings on windows 64 bit
      extra/yassl/src/ssl.cpp:
        Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
      extra/yassl/taocrypt/src/integer.cpp:
        Fixed compiler warnings
      include/my_global.h:
        Added my_offsetof() macro from 5.1 to get rid of compiler warnings
      innobase/include/ut0byte.ic:
        Fixed compiler warnings on win64
      innobase/include/ut0ut.ic:
        Fixed compiler warnings on win64
      libmysql/libmysql.def:
        Fixed compiler warnings on win64
      myisam/mi_packrec.c:
        Fixed compiler warnings on win64
      myisam/myisamchk.c:
        Fixed compiler warnings from 'max' build
      mysys/base64.c:
        Fixed compiler warnings on win64
      mysys/mf_keycache.c:
        Fixed compiler warnings from 'max' build
      mysys/my_getopt.c:
        Fixed compiler warnings from 'max' build
      mysys/my_init.c:
        Fixed compiler warnings from 'max' build
      mysys/my_thr_init.c:
        Fixed compiler warnings
      mysys/ptr_cmp.c:
        Fixed compiler warnings from 'max' build
      ndb/include/kernel/signaldata/DictTabInfo.hpp:
        Fixed compiler warnings
      server-tools/instance-manager/mysql_connection.cc:
        Fixed compiler warnings
      server-tools/instance-manager/mysqlmanager.cc:
        Fixed compiler warnings
      sql/filesort.cc:
        Initalize variable that was used unitialized in error conditions
      sql/ha_berkeley.cc:
        Moved get_auto_primary_key() here as int5store() gives (wrong) compiler warnings in win64
      sql/ha_berkeley.h:
        Moved get_auto_primary_key() to ha_berkeley.cc
      sql/ha_innodb.cc:
        Fixed compiler warnings
      sql/item.cc:
        Fixed compiler warnings from 'max' build
      sql/item_timefunc.cc:
        Fixed compiler warnings
      sql/mysqld.cc:
        Fixed compiler warnings
      sql/sql_acl.cc:
        Fixed compiler warnings from 'max' build
      sql/sql_base.cc:
        Fixed compiler warnings from 'max' build
      sql/sql_insert.cc:
        Initialize variable that may be used unitialized on error conditions (not fatal)
      sql/sql_prepare.cc:
        Fixed compiler warnings from 'max' build
      sql/sql_select.cc:
        Fixed compiler warnings
      sql/sql_show.cc:
        Fixed compiler warnings
      sql/udf_example.def:
        Fixed compiler warnings on win64
      sql/unireg.cc:
        Initialize variable that may be used unitialized on error conditions
      strings/ctype-ucs2.c:
        Fixed compiler warnings
      strings/ctype-utf8.c:
        Fixed compiler warnings
      strings/decimal.c:
        Fixed compiler warnings
      support-files/compiler_warnings.supp:
        Ignore warnings from sql_yacc.cc that are hard to remove
        Ignore some not important warnings from windows 64 bit build
      tools/mysqlmanager.c:
        Fixed compiler warnings
      5d34a1ca
    • unknown's avatar
      Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · c829c7e3
      unknown authored
      into  dl145s.mysql.com:/users/mhansson/mysql/autopush/5.0o-bug24010
      
      c829c7e3
    • unknown's avatar
      Bug #24010: INSERT INTO ... SELECT fails on unique constraint with data · a12970de
      unknown authored
      it doesn't select.
      
      This bug was fixed along with bug #16861: User defined variable can 
      have a wrong value if a tmp table was used.
      
      There the fix consisted of Item_func_set_user_var overloading the method
      Item::save_in_field. Consider the query from the test case:
      
      
      INSERT INTO foo( bar, baz )
      SELECT 
        bar,
        @newBaz := 1 + baz
      FROM 
        foo
      WHERE 
        quux <= 0.1;
      
      Here the assignment expression '@newBaz := 1 + baz' is represented by an 
      Item_func_set_user_var. Its member method save_in_field, which writes the 
      value of this assignment into the result field, writes the val_xxx() value, 
      which is not updated at this point. In the fix introduced by the patch,
      the save_in_field method reads the actual variable value instead.
      
      See also comment for 
      ChangeSet@1.2368.1.3, 2007-01-09 23:24:56+03:00, evgen@moonbone.local +4 -0
      and comment for
      Item_func_set_user_var::save_in_field (item_func.cc)
      
      
      mysql-test/r/update.result:
        BUG#24010
        The correct, and expected, result
      mysql-test/t/update.test:
        BUG#24010
        The test case for this bug. When the bug is active, the INSERT ... SELECT 
        statement will try to insert the values <1, 2> which gives an error
      a12970de
  13. 21 Feb, 2007 4 commits
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt · b4fc7230
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
      
      
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      b4fc7230
    • unknown's avatar
      Bug#23800: Outer fields in correlated subqueries is used in a temporary table · 4410c83f
      unknown authored
      created for sorting.
      
      Any outer reference in a subquery was represented by an Item_field object.
      If the outer select employs a temporary table all such fields should be
      replaced with fields from that temporary table in order to point to the 
      actual data. This replacement wasn't done and that resulted in a wrong
      subquery evaluation and a wrong result of the whole query.
      
      Now any outer field is represented by two objects - Item_field placed in the
      outer select and Item_outer_ref in the subquery. Item_field object is
      processed as a normal field and the reference to it is saved in the
      ref_pointer_array. Thus the Item_outer_ref is always references the correct
      field. The original field is substituted for a reference in the
      Item_field::fix_outer_field() function.
      
      New function called fix_inner_refs() is added to fix fields referenced from
      inner selects and to fix references (Item_ref objects) to these fields.
      
      The new Item_outer_ref class is a descendant of the Item_direct_ref class.
      It additionally stores a reference to the original field and designed to
      behave more like a field.
      
      
      sql/item.cc:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        Now all outer fields are substituted with references to them (Item_outer_ref objects)
        in the Item_field::fix_outer_field() function.
        The original field is saved in the Item_outer_ref object.
      sql/item.h:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        Added the Item_outer_ref class.
      sql/mysql_priv.h:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        Added the fix_inner_refs() function prototype.
      sql/sql_delete.cc:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        Added call to the fix_inner_refs() function.
      sql/sql_select.cc:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        The new function called fix_inner_refs() is added.
      mysql-test/r/subselect.result:
        Added a test case for bug#23800: Correlated sub query returning incorrect results when
        operated upon.
      sql/sql_update.cc:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        Added call to the fix_inner_refs() function.
      mysql-test/r/subselect3.result:
        Corrected test cases result after fix for bug#23800: Correlated sub query returning
        incorrect results when operated upon.
      mysql-test/t/subselect.test:
        Added a test case for bug#23800: Correlated sub query returning incorrect results when
        operated upon.
      sql/sql_lex.cc:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        Added cleanup of the inner_refs_list.
      sql/sql_lex.h:
        Bug#23800: Correlated sub query returning incorrect results when operated upon.
        The inner_refs_list is added to the SELECT_LEX class.
      4410c83f
    • unknown's avatar
      Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0 · 94e25276
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      
      ndb/include/util/OutputStream.hpp:
        Auto merged
      ndb/src/common/debugger/EventLogger.cpp:
        Auto merged
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
        Auto merged
      ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
        Auto merged
      ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
        Auto merged
      ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp:
        Auto merged
      ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
        Auto merged
      ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
        Auto merged
      ndb/src/mgmapi/mgmapi.cpp:
        Auto merged
      ndb/src/mgmsrv/InitConfigFileParser.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      ndb/src/mgmsrv/MgmtSrvr.hpp:
        Auto merged
      ndb/src/mgmsrv/Services.cpp:
        Auto merged
      ndb/src/ndbapi/ClusterMgr.hpp:
        Auto merged
      ndb/src/ndbapi/SignalSender.cpp:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      94e25276
    • unknown's avatar
      After merge fixes · 23461d77
      unknown authored
      This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
      
      
      extra/yassl/src/ssl.cpp:
        Removed compiler warning
      extra/yassl/taocrypt/src/asn.cpp:
        After merge fixes
      extra/yassl/testsuite/testsuite.cpp:
        Removed compiler warning
      mysql-test/r/ndb_lock.result:
        After merge fixes
      ndb/src/common/debugger/EventLogger.cpp:
        Removed compiler warning
      ndb/src/common/util/ConfigValues.cpp:
        Removed compiler warning
      ndb/src/common/util/NdbSqlUtil.cpp:
        Removed compiler warning
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Removed compiler warning
      ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp:
        Removed compiler warning
      ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp:
        Removed compiler warning
      ndb/src/kernel/vm/ndbd_malloc.cpp:
        Removed compiler warning
      ndb/src/mgmclient/main.cpp:
        Removed compiler warning
      ndb/src/ndbapi/SignalSender.cpp:
        Removed compiler warning
      sql/ha_ndbcluster.cc:
        Some extra safety
      sql/item_cmpfunc.cc:
        After merge fixes
      sql/item_subselect.cc:
        After merge fixes
      sql/sql_insert.cc:
        After merge fixes
        (This actually fixes a bug in old code when many connections are in use)
      support-files/compiler_warnings.supp:
        Removed some suppressed warnings
      23461d77