An error occurred fetching the project authors.
  1. 22 Feb, 2006 1 commit
    • unknown's avatar
      BUG#17265 Assertion failure in rpl_row_view01. · 0d3cf6b0
      unknown authored
      To quote Timour review lines:
      
      The actual cause of the bug is that sql_base.cc:setup_wild()
      sets "select_lex->with_wild = 0" (in the end of the function) once
      it expands all wild-cards, and wild-card expansion is done during
      the prepare phase. During this phase we replace all "*" with the
      corresponding items, which for views happen to be references to
      references. When we do execute, select_lex->with_wild = 0, and
      all "*" are already replaced by the corresponding items, which
      in the case of views need to be dereferenced first.
      
      Fixed by refining the assert. Regression test for the bug is rpl_row_view01,
      as was reported.
      
      
      sql/item.cc:
        Refined asssert, suggested by Evgen, due to BUG#17265 prepared statement for select with ps-protocol 
        does not hold the former.
      0d3cf6b0
  2. 15 Feb, 2006 1 commit
    • unknown's avatar
      Fix bug #15706 find_field_in_tables() returns field from outer select · de0c65dd
      unknown authored
      If item->cached_table is set, find_field_in_tables() returns found field
      even if it doesn't belong to current select. Because Item_field::fix_fields
      doesn't expect such behaviour, reported bug occurs.
      
      Item_field::fix_fields() was modifed to detect when find_field_in_tables() 
      can return field from outer select and process such fields accordingly.
      In order to ease this code which was searching and processing outed fields was
      moved into separate function called Item_field::fix_outer_field().
      
      
      sql/item_subselect.h:
        Fixed bug #15706: find_field_in_tables() returns field from outer select
        Item_field::fix_outer_field() was marked as friend to Item_subselect class.
      sql/item.h:
        Fixed bug #15706: find_field_in_tables() returns field from outer select
        fix_outer_field() function is added to the Item_field class.
      sql/item.cc:
        Fixed bug #15706: find_field_in_tables() returns field from outer select
        
        Item_ref::fix_fields() and Item_field::fix_fields() were modifed to detect when
        find_field_in_tables() can return field from outer select and process such
        fields accordingly.
        In order to ease this, code Item_field::fix_fields() which was searching and
        processing outer fields was moved into separate function called
        Item_field::fix_outer_field().
        To the Item_field::fix_field() added a loop for finding context for found field.
      mysql-test/t/disabled.def:
        Fixed bug #15706: find_field_in_tables() returns field from outer select
        Enable subselect test
      de0c65dd
  3. 24 Jan, 2006 1 commit
    • unknown's avatar
      Fix for the following bugs: · 8f395ebb
      unknown authored
        - BUG#15166: Wrong update permissions required to execute triggers
        - BUG#15196: Wrong select permission required to execute triggers
      
      The idea of the fix is to check necessary privileges
      in Item_trigger_field::fix_fields(), instead of having "special variables"
      technique. To achieve this, we should pass to an Item_trigger_field instance
      a flag, which will indicate the usage/access type of this trigger variable.
      
      
      mysql-test/r/trigger-grant.result:
        Update the result file.
      mysql-test/t/trigger-grant.test:
        Add test cases for BUG#15166 and BUG#15196
      sql/item.cc:
        Item_trigger_field: check appropriate (SELECT/UPDATE) privilege in fix_fields().
      sql/item.h:
        Add a flag to specify access type for trigger field.
      sql/sql_trigger.cc:
        "Special variable" technique of checking privileges for NEW/OLD variables
        was replaced by checking table- and column-level privileges in
        Item_trigger_field::fix_fields().
      sql/sql_trigger.h:
        "Special variable" technique of checking privileges for NEW/OLD variables
        was replaced by checking table- and column-level privileges in
        Item_trigger_field::fix_fields().
      sql/sql_yacc.yy:
        Specify access type for trigger fields.
      8f395ebb
  4. 05 Jan, 2006 1 commit
    • unknown's avatar
      Review fixes of new pushed code · 64206b18
      unknown authored
      - Fixed tests
      - Optimized new code
      - Fixed some unlikely core dumps
      - Better bug fixes for:
        - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null
      
      
      mysql-test/r/create.result:
        Update results after removing wrong warnings for CREATE ... SELECT
        New tests
      mysql-test/r/handler.result:
        Drop used tables
      mysql-test/r/kill.result:
        Make test portable
      mysql-test/r/mysqlshow.result:
        Drop tables used by previous test
      mysql-test/r/trigger.result:
        Reuse old procedure name
      mysql-test/r/view.result:
        Extra tests
      mysql-test/t/create.test:
        New tests to test fix of removing wrong warnings for CREATE ... SELECT
      mysql-test/t/disabled.def:
        Enable 'kill' test (should now be portable)
      mysql-test/t/handler.test:
        Drop used tables
      mysql-test/t/kill.test:
        Make test portable even if kill doesn't work at once
      mysql-test/t/mysqlshow.test:
        Drop tables used by previous test
      mysql-test/t/trigger.test:
        Reuse old procedure name
      mysql-test/t/view.test:
        Extra tests
      sql/field.cc:
        Removed compiler warning
      sql/ha_federated.cc:
        my_snprintf -> strmake()
        (Simple optimization)
      sql/ha_ndbcluster.cc:
        Indentation cleanups and trival optimization
      sql/item.cc:
        Moved save_org_in_field() to item.cc to make it easier to test
        Remove setting of null_value as this is not needed
      sql/item.h:
        Moved save_org_in_field() to item.cc to make it easier to test
      sql/log_event.cc:
        Remove inline of slave_load_file_stem()
        Added 'extension' parameter to slave_load_file_stem() to get smaller code
        Removed not critical (or needed) DBUG_ASSERT()'s
        Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths
        Indentation fixes
      sql/opt_range.cc:
        Moved code from declaration to function body
        (To make it more readable)
      sql/parse_file.cc:
        Fixed DBUG_PRINT
      sql/sp.cc:
        Simple cleanups
        - Removed not needed {} level
        - Ensure saved variables starts with old_
      sql/sp_head.cc:
        Indentation fixes
        Remove core dump when using --debug when m_next_cached_sp == 0
        Fixed compiler warnings
        Trivial optimizations
      sql/sp_head.h:
        Changed argument to set_definer() to const
        Added THD argument to recursion_level_error() to avoid call to current_thd
      sql/sql_acl.cc:
        Removed not needed test (first_not_own_table is the guard)
      sql/sql_base.cc:
        Removed extra empty line
      sql/sql_handler.cc:
        Don't test table version in mysql_ha_read() as this is already tested in lock_tables()
        Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables
        (Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash)
      sql/sql_insert.cc:
        Mark fields that are set in CREATE ... SELECT as used
        (Removed wrong warnings about field not having a default value)
      sql/sql_parse.cc:
        Removed not needed test of 'tables' (first_not_own_table is the guard)
        Simplify code
      sql/sql_select.cc:
        Use group->field to check if value is null instead of item called by 'save_org_in_field'
        This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null)
      sql/sql_trigger.cc:
        Move sql_modes_parameters outside of function
        Indentation fixes
        Fixed compiler warning
        Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access()
        (This allows us to remove the extra test in check_grant() and check_table_access())
      64206b18
  5. 03 Jan, 2006 1 commit
    • unknown's avatar
      many warnings (practically safe but annoying) corrected · 307c0b77
      unknown authored
      client/mysqladmin.cc:
        don't use the handler after it's closed
      client/mysqlbinlog.cc:
        memory leak
      client/mysqldump.c:
        many "ignore return value" warnings, one "NULL dereference"
      cmd-line-utils/libedit/history.c:
        memory leak
      include/my_base.h:
        cleanup
      libmysql/libmysql.c:
        "return value ignored" warning
      myisam/mi_delete.c:
        "return value ignored" warning
      myisam/myisampack.c:
        "out-of-bound access" warning
      myisam/sort.c:
        "double free" warning
      mysys/default_modify.c:
        "double free" warning
      mysys/mf_iocache2.c:
        "return value ignored" warnings
      mysys/my_bitmap.c:
        s/return/DBUG_RETURN/
      mysys/my_error.c:
        memory leak
      server-tools/instance-manager/parse.cc:
        "NULL dereference" warning
      sql-common/client.c:
        "NULL dereference" warning
      sql/field.cc:
        deadcode, "NULL dereference", "uninitialized" warnings
      sql/field.h:
        unused parameters removed from constructor
      sql/ha_myisam.cc:
        "return value ignored" warnings
      sql/item.cc:
        "return value ignored" warnings
        changed constructor
      sql/item_func.cc:
        "return value ignored" warnings
      sql/log_event.cc:
        uninitialized warning
      sql/opt_range.cc:
        "double free" and uninitialized warnings
      sql/opt_range.h:
        "return value ignored" warning
      sql/repl_failsafe.cc:
        "return value ignored" warning
      sql/set_var.cc:
        "return value ignored" warning
      sql/slave.cc:
        "return value ignored" warnings
      sql/slave.h:
        new prototype
      sql/sql_acl.cc:
        deadcode and "NULL dereference" warnings
      sql/sql_db.cc:
        "return value ignored" warning
      sql/sql_handler.cc:
        "NULL dereference" warning
      sql/sql_help.cc:
        "NULL dereference" warning
      sql/sql_insert.cc:
        "return value ignored" warning
      sql/sql_parse.cc:
        "return value ignored" warning
        one more DBUG_ASSERT
      sql/sql_repl.cc:
        "return value ignored" and memory leak warnings
      sql/sql_show.cc:
        "return value ignored" and "NULL dereference"  warnings
      sql/sql_test.cc:
        "return value ignored" warning
      sql/table.cc:
        memory leak
      sql/uniques.cc:
        "return value ignored" warning
        endspaces deleted
      307c0b77
  6. 21 Dec, 2005 1 commit
  7. 12 Dec, 2005 1 commit
    • unknown's avatar
      item_sum.h, item.cc: · 04d5378c
      unknown authored
        Post review corrections in comments.
      
      
      sql/item.cc:
        Post review corrections in comments.
      sql/item_sum.h:
        Post review corrections in comments.
      04d5378c
  8. 08 Dec, 2005 1 commit
    • unknown's avatar
      A fix and a test case for Bug#15441 "Running SP causes Server · 9c4985de
      unknown authored
      to Crash": the bug was that due to non-standard name
      resolution precedence in stored procedures (See Bug#5967)
      a stored procedure variable took precedence over a table column
      when the arguments for VALUES() function were resolved.
      The implementation of VALUES() function was not designed to work
      with Item_splocal and crashed.
      VALUES() function is non-standard. It can refer to, and
      is meaningful for, table columns only. The patch disables SP 
      variables as possible arguments of VALUES() function.
      
      
      mysql-test/r/sp.result:
        Test results fixed (Bug#15441).
        Also make sure that the recently added test cases follow sp.test
        internal tests standard.
      mysql-test/t/sp.test:
        Add a test case for Bug#15441 "Running SP causes Server to Crash".
      sql/item.cc:
        Cleanup Item_insert_value::fix_fields().
      sql/item.h:
        Add a comment for Item_insert_value.
      sql/sql_yacc.yy:
        Actual fix for Bug#15441 "Running SP causes Server to Crash":
        we should not allow VALUES() function to reference SP variables.
      9c4985de
  9. 07 Dec, 2005 1 commit
    • unknown's avatar
      Patch for WL#2894: Make stored routine variables work · 6b2f1309
      unknown authored
      according to the standard.
      
      The idea is to use Field-classes to implement stored routines
      variables. Also, we should provide facade to Item-hierarchy
      by Item_field class (it is necessary, since SRVs take part
      in expressions).
      
      The patch fixes the following bugs:
        - BUG#8702: Stored Procedures: No Error/Warning shown for inappropriate data 
          type matching; 
       
        - BUG#8768: Functions: For any unsigned data type, -ve values can be passed 
          and returned; 
       
        - BUG#8769: Functions: For Int datatypes, out of range values can be passed 
          and returned; 
       
        - BUG#9078: STORED PROCDURE: Decimal digits are not displayed when we use 
          DECIMAL datatype; 
       
        - BUG#9572: Stored procedures: variable type declarations ignored; 
       
        - BUG#12903: upper function does not work inside a function; 
       
        - BUG#13705: parameters to stored procedures are not verified; 
       
        - BUG#13808: ENUM type stored procedure parameter accepts non-enumerated
          data; 
       
        - BUG#13909: Varchar Stored Procedure Parameter always BINARY string (ignores 
          CHARACTER SET); 
       
        - BUG#14161: Stored procedure cannot retrieve bigint unsigned;
      
        - BUG#14188: BINARY variables have no 0x00 padding;
      
        - BUG#15148: Stored procedure variables accept non-scalar values;
      
      
      mysql-test/r/ctype_ujis.result:
        Explicitly specify correct charset.
      mysql-test/r/schema.result:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/r/show_check.result:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/r/skip_name_resolve.result:
        Ignore columns with unpredictable values.
      mysql-test/r/sp-big.result:
        Add cleanup statement.
      mysql-test/r/sp-dynamic.result:
        Add cleanup statements.
      mysql-test/r/sp.result:
        Update result file.
      mysql-test/r/sum_distinct-big.result:
        Update result file.
      mysql-test/r/type_newdecimal-big.result:
        Update result file.
      mysql-test/t/ctype_ujis.test:
        Explicitly specify correct charset.
      mysql-test/t/schema.test:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/t/show_check.test:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/t/skip_name_resolve.test:
        Ignore columns with unpredictable values.
      mysql-test/t/sp-big.test:
        Add cleanup statement.
      mysql-test/t/sp-dynamic.test:
        Add cleanup statements.
      mysql-test/t/sp.test:
        Non-scalar values prohibited for assignment to SP-vars;
        polishing.
      mysql-test/t/type_newdecimal-big.test:
        Update type specification so that the variables
        can contain the large values used in the test.
      sql/field.cc:
        Extract create_field::init() to initialize an existing
        instance of create_field from new_create_field().
      sql/field.h:
        Extract create_field::init() to initialize an existing
        instance of create_field from new_create_field().
      sql/item.cc:
        - Introduce a new class: Item_sp_variable -- a base class
          of stored-routine-variables classes;
        - Introduce Item_case_expr -- an Item, which is used to access
          to the expression of CASE statement;
      sql/item.h:
        - Introduce a new class: Item_sp_variable -- a base class
          of stored-routine-variables classes;
        - Introduce Item_case_expr -- an Item, which is used to access
          to the expression of CASE statement;
      sql/item_func.cc:
        Pass the Field (instead of Item) for the return value of
        a function to the function execution routine.
      sql/item_func.h:
        Pass the Field (instead of Item) for the return value of
        a function to the function execution routine.
      sql/mysql_priv.h:
        Move create_virtual_tmp_table() out of sql_select.h.
      sql/sp.cc:
        Use create_result_field() instead of make_field().
      sql/sp_head.cc:
        - Add a function to map enum_field_types to Item::Type;
        - Add sp_instr_push_case_expr instruction -- an instruction
          to push CASE expression into the active running context;
        - Add sp_instr_pop_case_expr instruction -- an instruction
          to pop CASE expression from the active running context;
        - Adapt the SP-execution code to using Fields instead of Items
          for SP-vars;
        - Use create_field structure for field description instead of
          a set of members.
      sql/sp_head.h:
        - Add a function to map enum_field_types to Item::Type;
        - Add sp_instr_push_case_expr instruction -- an instruction
          to push CASE expression into the active running context;
        - Add sp_instr_pop_case_expr instruction -- an instruction
          to pop CASE expression from the active running context;
        - Adapt the SP-execution code to using Fields instead of Items
          for SP-vars;
        - Use create_field structure for field description instead of
          a set of members.
      sql/sp_pcontext.cc:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Add an operation to retrieve a list of defined SP-vars
          from the processing context recursively.
      sql/sp_pcontext.h:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Add an operation to retrieve a list of defined SP-vars
          from the processing context recursively.
      sql/sp_rcontext.cc:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Use a tmp virtual table to store SP-vars instead of Items;
        - Provide operations to work with CASE expresion.
      sql/sp_rcontext.h:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Use a tmp virtual table to store SP-vars instead of Items;
        - Provide operations to work with CASE expresion.
      sql/sql_class.cc:
        - Reflect Item_splocal ctor changes;
        - Item_splocal::get_offset() has been renamed to get_var_idx().
      sql/sql_class.h:
        Polishing.
      sql/sql_parse.cc:
        Extract create_field::init() to initialize an existing
        instance of create_field from new_create_field().
      sql/sql_select.cc:
        Take care of BLOB columns in create_virtual_tmp_table().
      sql/sql_select.h:
        Move create_virtual_tmp_table() out of sql_select.h.
      sql/sql_trigger.cc:
        Use boolean constants for boolean type instead of numerical ones.
      sql/sql_yacc.yy:
        Provide an instance of create_field for each SP-var.
      mysql-test/include/sp-vars.inc:
        The definitions of common-procedures, which are created
        under different circumstances.
      mysql-test/r/sp-vars.result:
        Result file for the SP-vars test.
      mysql-test/sp-vars.test:
        A new test for checking SP-vars functionality.
      6b2f1309
  10. 30 Nov, 2005 2 commits
    • unknown's avatar
      WL#2486 - natural/using joins according to SQL:2003 · e486fe1f
      unknown authored
      Post-review fixes that simplify the way access rights
      are checked during name resolution and factor out all
      entry points to check access rights into one single
      function.
      
      
      sql/item.cc:
        Simplfied find_field_in_table - factored out all acces right checks
        into a separate function.
      sql/mysql_priv.h:
        Simplified the way we control whether to perform access right
        checks for columns.
      sql/sql_acl.cc:
        - Added new functon check_column_grant_in_table_ref that serves as a single
          point of entry to check access rights during name resolution for different
          kinds of table references.
        - Moved check_grant_column_in_sctx to sql_acl.cc where it
          logically belongs.
        - Removed the parameter check_grants - it is checked before
          calling the function.
      sql/sql_acl.h:
        - Added new function check_column_grant_in_table_ref.
        - Made check_grant_column_in_sctx available to other modules.
      sql/sql_base.cc:
        - Factored out all code that check access rights for columns during
          name resolution into one function - check_column_grant_in_table_ref.
        - Moved check_grant_column_in_sctx to sql_acl.cc where it
          logically belongs.
        - Removed the parameter check_grants - it is checked before
          calling the function.
      sql/table.cc:
        Removed code that duplicates the functionality of
        check_column_grant_in_table_ref, and called directly
        that function.
      sql/table.h:
        check_grants method is replaced by more general
        check_column_grant_in_table_ref.
      e486fe1f
    • unknown's avatar
      Addition to fix for bug #12956: cast make differ rounding. · 490a1e28
      unknown authored
      - use rint() in some other val_int() methods as well.
      
      
      490a1e28
  11. 28 Nov, 2005 1 commit
    • unknown's avatar
      item.cc, item.h: · a9af48e9
      unknown authored
        Fixing Item_param::safe_charset_converter to do less "new"s.
      
      
      sql/item.h:
        Fixing Item_param::safe_charset_converter to do less "new"s.
      sql/item.cc:
        Fixing Item_param::safe_charset_converter to do less "new"s.
      a9af48e9
  12. 24 Nov, 2005 1 commit
    • unknown's avatar
      Fix bug #14482 Wrongly applied optimization in resolve_const_item() caused · 3190b21f
      unknown authored
      crash
      
      resolve_const_item() substitutes item which will evaluate to constant with
      equvalent constant item, basing on the item's result type. In this case
      subselect was resolved as constant, and resolve_const_item() was substituting
      it's result's Item_caches to Item_null. Later Item_cache's function was called
      for Item_null object, which caused server crash.
      
      resolve_const_item() now substitutes constants for items with 
      result_type == ROW_RESULT only for Item_rows.
      
      
      sql/item.cc:
        Fix bug #14482 Wrongly applied optimization in resolve_const_item() caused
        crash
        
        resolve_const_item() now applies optimization for items with
        result_type == ROW_RESULT only to Item_rows.
      mysql-test/t/select.test:
        Test case for bug #14482 Wrongly applied optimization in resolve_const_item() caused crash
      mysql-test/r/select.result:
        Test case for bug #14482 Wrongly applied optimization in resolve_const_item() caused crash
      3190b21f
  13. 23 Nov, 2005 1 commit
  14. 22 Nov, 2005 1 commit
    • unknown's avatar
      Fix for BUG#13549 "Server crash with nested stored procedures · 6574612d
      unknown authored
      if inner routine has more local variables than outer one, and
      one of its last variables was used as argument to NOT operator".
      
      THD::spcont was non-0 when we were parsing stored routine/trigger
      definition during execution of another stored routine. This confused
      methods of Item_splocal and forced them use wrong runtime context.
      Fix ensures that we always have THD::spcont equal to zero during
      routine/trigger body parsing. This also allows to avoid problems
      with errors which occur during parsing and SQL exception handlers.
      
      
      mysql-test/r/sp.result:
        Test suite for bug#13549.
      mysql-test/r/trigger.result:
        Test suite for bug#13549.
      mysql-test/t/sp.test:
        Test suite for bug#13549.
      mysql-test/t/trigger.test:
        Test suite for bug#13549.
      sql/item.cc:
        Protection against using wrong context by SP local variable.
      sql/item.h:
        Protection against using wrong context by SP local variable.
      sql/protocol.cc:
        An incorrect macro name fixed.
      sql/protocol.h:
        An incorrect macro name fixed.
      sql/sp.cc:
        Do not allow SP which we are parsing to use other SP
        context (BUG#13549).
      sql/sp_head.cc:
        Protection against using wrong context by SP local variable.
      sql/sp_rcontext.h:
        Protection against using wrong context by SP local variable.
      sql/sql_cache.h:
        An incorrect macro name fixed.
      sql/sql_class.cc:
        Protection against using wrong context by SP local variable.
      sql/sql_class.h:
        Protection against using wrong context by SP local variable.
      sql/sql_trigger.cc:
        Do not allow Trigger which we are parsing to use
        other SP context (BUG#13549).
      sql/sql_yacc.yy:
        Protection against using wrong context by SP local variable.
      6574612d
  15. 21 Nov, 2005 1 commit
    • unknown's avatar
      Bug#10446 Illegal mix of collations: · 72d19611
      unknown authored
      item_strfunc.h, item_strfunc.cc, item.cc:
        Try to convert a const item into destination 
        character set. If conversion happens without
        data loss, then cache the converted value
        and return it during val_str().
        Otherwise, if conversion loses data, return
        Illeral mix of collations error, as it happened
        previously.
      ctype_recoding.result, ctype_recoding.test:
        Fixing tests accordingly.
      
      
      sql/item.cc:
        Bug#10446 Illegal mix of collations
        Try to convert a const item into destination 
        character set. If conversion happens without
        data loss, then cache the converted value
        and return it during val_str().
        Otherwise, if conversion loses data, return
        Illeral mix of collations error, as it happened
        previously.
      sql/item_strfunc.cc:
        Return cached value when it's possible.
      mysql-test/t/ctype_recoding.test:
        Fixing tests accordingly.
      mysql-test/r/ctype_recoding.result:
        Fixing tests accordingly.
      72d19611
  16. 20 Nov, 2005 1 commit
    • unknown's avatar
      Inefficient usage of String::append() fixed. · fe63e095
      unknown authored
      Bad examples of usage of a string with its length fixed.
      The incorrect length in the trigger file configuration descriptor
        fixed (BUG#14090).
      A hook for unknown keys added to the parser to support old .TRG files.
      
      
      sql/field.cc:
        Inefficient usage of String::append() fixed.
        Bad examples of usage of a string with its length fixed.
      sql/ha_berkeley.cc:
        A bad example of usage of a string with its length fixed.
      sql/ha_federated.cc:
        Inefficient usage of String::append() fixed.
      sql/ha_myisammrg.cc:
        Bad examples of usage of a string with its length fixed.
      sql/handler.cc:
        Inefficient usage of String::append() fixed.
      sql/item.cc:
        Bad examples of usage of a string with its length fixed.
      sql/item.h:
        A bad example of usage of a string with its length fixed.
      sql/item_cmpfunc.cc:
        Bad examples of usage of a string with its length fixed.
      sql/item_func.cc:
        Bad examples of usage of a string with its length fixed.
      sql/item_strfunc.cc:
        Bad examples of usage of a string with its length fixed.
      sql/item_subselect.cc:
        Bad examples of usage of a string with its length fixed.
      sql/item_sum.cc:
        Bad examples of usage of a string with its length fixed.
        Inefficient usage of String::append() fixed.
      sql/item_timefunc.cc:
        Inefficient using of String::append() fixed.
        Bad examples of usage of a string with its length fixed.
      sql/item_uniq.h:
        Bad examples of usage of a string with its length fixed.
      sql/key.cc:
        Bad examples of usage of a string with its length fixed.
      sql/log.cc:
        Bad examples of usage of a string with its length fixed.
      sql/log_event.cc:
        Bad examples of usage of a string with its length fixed.
      sql/mysqld.cc:
        The dummy parser hook allocated.
      sql/opt_range.cc:
        Inefficient usage of String::append() fixed.
      sql/parse_file.cc:
        Bad examples of usage of a string with its length fixed.
        A hook for unknown keys added to the parser.
      sql/parse_file.h:
        A hook for unknown keys added to the parser.
      sql/protocol.cc:
        A bad example of usage of a string with its length fixed.
      sql/repl_failsafe.cc:
        Bad examples of usage of a string with its length fixed.
      sql/share/errmsg.txt:
        A warning for old format config file.
      sql/slave.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sp.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sp_head.cc:
        Bad examples of usage of a string with its length fixed.
      sql/spatial.cc:
        A bad example of usage of a string with its length fixed.
      sql/sql_acl.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_analyse.cc:
        Bad examples of usage of a string with its length fixed.
        Inefficient usage of String::append() fixed.
      sql/sql_lex.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_load.cc:
        A bad example of usage of a string with its length fixed.
      sql/sql_parse.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_prepare.cc:
        A bad example of usage of a string with its length fixed.
      sql/sql_select.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_show.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_string.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_string.h:
        The macro definition moved to sql_string.h to
          be accessible in all parts of server.
      sql/sql_table.cc:
        Bad examples of usage of a string with its length fixed.
      sql/sql_trigger.cc:
        Bad examples of usage of a string with its length fixed.
        The incorrect length in the trigger file configuration descriptor
          fixed (BUG#14090).
        The hook for processing incorrect sql_mode record added.
      sql/sql_view.cc:
        A dummy  hook used for parsing views.
      sql/structs.h:
        The macro definition moved to sql_string.h to be
          accessible in all parts of server.
      sql/table.cc:
        A bad example of usage of a string with its length fixed.
      sql/tztime.cc:
        A bad example of usage of a string with its length fixed.
      fe63e095
  17. 11 Nov, 2005 1 commit
    • unknown's avatar
      Fix for BUG#14662: view column in ORDER BY considered ambiguous if SELECT contains · 9a0da055
      unknown authored
      the same column as an aliased and as a non-aliased column.
      
      The problem was that Item_direct_view_ref::eq() was first comparing view columns
      by name, and in this case the name of one of them is different since it is aliased.
      
      
      mysql-test/r/select.result:
        Added test for BUG#14662.
      mysql-test/t/select.test:
        Added test for BUG#14662.
      sql/item.cc:
        Changed the way view column refenreces are compared. Two view columns are
        equal if they resolve to the same result field of a view.
      9a0da055
  18. 01 Nov, 2005 1 commit
    • unknown's avatar
      Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort · ee380a07
      unknown authored
      Fix for bug #14536: SELECT @A,@A:=... fails with prepared statements
      
      
      mysql-test/r/func_sapdb.result:
        Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
      mysql-test/r/type_newdecimal.result:
        Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
      mysql-test/r/user_var.result:
        More test with SELECT @A:=
      mysql-test/t/disabled.def:
        Enable user_var.test for
      mysql-test/t/user_var.test:
        More test with SELECT @A:=
      sql/item.cc:
        Simple optimization during review of new code
      sql/item_func.cc:
        Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
      sql/item_timefunc.h:
        timediff() can return NULL for not NULL arguments
      sql/sql_base.cc:
        Remove usage of current_thd() in mysql_make_view()
      sql/sql_lex.h:
        Remove usage of current_thd() in mysql_make_view()
      sql/sql_select.cc:
        Fix for bug #14536: SELECT @A,@A:=... fails with prepared statements
      sql/sql_view.cc:
        Remove usage of current_thd() in mysql_make_view()
        Simple optimization of new code
      sql/sql_view.h:
        Remove usage of current_thd() in mysql_make_view()
      sql/table.cc:
        Simple optimization of new code
      ee380a07
  19. 29 Oct, 2005 1 commit
  20. 27 Oct, 2005 2 commits
    • unknown's avatar
      Merge 4.1 - 5.0 · 1b574f5b
      unknown authored
      mysql-test/r/insert_select.result:
        Merge from 4.1 to 5.0.
      mysql-test/r/select.result:
        Merge from 4.1 to 5.0.
      mysql-test/t/insert_select.test:
        Merge from 4.1 to 5.0.
      mysys/my_handler.c:
        Merge from 4.1 to 5.0.
      sql/item.cc:
        Merge from 4.1 to 5.0.
      sql/item_timefunc.cc:
        Imported bug fix from 4.1 to 5.0. (Bug#14016)
      sql/item_timefunc.h:
        Imported bug fix from 4.1 to 5.0. (Bug#14016)
      1b574f5b
    • unknown's avatar
      support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) · 24ac4019
      unknown authored
      mysql-test/r/information_schema.result:
        error message changed
      mysql-test/r/sp.result:
        error message changed
      mysql-test/r/sql_mode.result:
        fixed test suite
      mysql-test/r/view.result:
        error message changed
      mysql-test/r/view_grant.result:
        test of underlying view tables check
      mysql-test/t/sql_mode.test:
        fixed test suite
      mysql-test/t/view_grant.test:
        test of underlying view tables check
      sql/item.cc:
        check of underlying tables privilege added
      sql/item.h:
        Name the resolution context points to the security  context of view (if item belong to the view)
      sql/item_func.cc:
        a view error hiding for execution of prepared function belonged to a view
        fixed checking privileges if stored functions belonds to some view
      sql/mysql_priv.h:
        refult of derived table processing functions changed to bool
        Security_context added as an argument to find_field_in_table()
      sql/share/errmsg.txt:
        error message fixed
      sql/sql_acl.cc:
        Storing requested privileges of tables added
        View underlying tables privilege check added
      sql/sql_base.cc:
        View underlying tables privilege check added
      sql/sql_cache.cc:
        Code cleunup: we should not register underlying tables of view second time
      sql/sql_delete.cc:
        ancestor -> merge_underlying_list renaming
      sql/sql_derived.cc:
        refult of derived table processing functions changed to bool
        do not give SELECT_ACL for TEMPTABLE views
      sql/sql_lex.h:
        The comment added
      sql/sql_parse.cc:
        registration of requested privileges added
      sql/sql_prepare.cc:
        registration of requested privileges added
      sql/sql_update.cc:
        manipulation of requested privileges for underlying tables made the same as for table which we are updating
      sql/sql_view.cc:
        underlying tables of view security check support added
      sql/table.cc:
        renaming and fixing view preparation methods, methods for checking underlyoing tables security context added
      sql/table.h:
        storege for reuested privileges added
      24ac4019
  21. 25 Oct, 2005 1 commit
    • unknown's avatar
      Fix bug#13392 Wrong VALUES() behaviour in INSERT SELECT with ON DUPLICATE · 45369edf
      unknown authored
      VALUES() can only refer to table insert going to. 
      But Item_insert_value::fix_fields() were passing to it's arg full table list,
      This results in finding second column which shouldn't be found, and
      failing with error about ambiguous field.
      
      Item_insert_value::fix_fields() now passes only first table of full table
      list.
      
      
      sql/item.cc:
        Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
        If second parameter of date_format() is constant then it's collation is changed to case sensitive.
      mysql-test/r/insert_select.result:
        Test case for bug#14016 2nd parameter was compared using case insensitive collation
      mysql-test/t/insert_select.test:
        Test case for bug#14016 2nd parameter was compared using case insensitive collation
      45369edf
  22. 21 Oct, 2005 1 commit
  23. 20 Oct, 2005 1 commit
    • unknown's avatar
      Bug#12371: executing prepared statement fails (illegal mix of collations) · 06164d5d
      unknown authored
      ctype_utf8.test, ctype_utf8.result:
        Adding test case.
      item.h:
      item.cc:
        Adding Item_param::safe_charset_converter
      
      
      sql/item.cc:
         Bug#12371: executing prepared statement fails (illegal mix of collations)
        Adding Item_param::safe_charset_converter
      sql/item.h:
        Adding Item_param::safe_charset_converter
      mysql-test/r/ctype_utf8.result:
        Adding test case.
      mysql-test/t/ctype_utf8.test:
        Adding test case.
      06164d5d
  24. 15 Oct, 2005 1 commit
    • unknown's avatar
      Fixed bug #12762: · 6a0695fe
      unknown authored
      allowed set functions aggregated in outer subqueries, allowed nested set functions.
      
      
      mysql-test/r/func_gconcat.result:
        Changed a query when fixing bug #12762.
      mysql-test/r/subselect.result:
        Added test cases for bug #12762.
        Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
      mysql-test/t/func_gconcat.test:
        Changed a query when fixing bug #12762.
      mysql-test/t/subselect.test:
        Added test cases for bug #12762.
        Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
      sql/item.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
        aggregated in outer subquries.
        Changed Item_field::fix_fields to calculate attributes used when checking context conditions
        for set functions.
        Allowed alliases for set functions defined in outer subqueries.
      sql/item.h:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
        aggregated in outer subquries.
      sql/item_cmpfunc.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
        aggregated in outer subquries.
      sql/item_func.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
        aggregated in outer subquries.
      sql/item_row.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
        aggregated in outer subquries.
      sql/item_strfunc.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
        aggregated in outer subquries.
      sql/item_subselect.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries and a bitmap of nesting levels showing
        in what subqueries a set function can be aggregated.
      sql/item_sum.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added Item_sum methods to check context conditions imposed on set functions.
      sql/item_sum.h:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Added Item_sum methods to check context conditions imposed on set functions.
      sql/mysql_priv.h:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced a type of bitmaps to be used for nesting constructs.
      sql/sql_base.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries and a bitmap of nesting levels showing
        in what subqueries a set function can be aggregated.
      sql/sql_class.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
      sql/sql_class.h:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
      sql/sql_delete.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
      sql/sql_lex.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries and a bitmap of nesting levels showing
        in what subqueries a set function can be aggregated.
      sql/sql_lex.h:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries and a bitmap of nesting levels showing
        in what subqueries a set function can be aggregated.
      sql/sql_parse.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries.
      sql/sql_prepare.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
      sql/sql_select.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries and a bitmap of nesting levels showing
        in what subqueries a set function can be aggregated.
      sql/sql_update.cc:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
      sql/sql_yacc.yy:
        Fixed bug #12762:
        allowed set functions aggregated in outer subqueries, allowed nested set functions.
        Introduced next levels for subqueries.
      6a0695fe
  25. 13 Oct, 2005 2 commits
    • unknown's avatar
      Fixes during review of new pushed code · 79538fb6
      unknown authored
      sql/handler.cc:
        Indentation fixes
      sql/item.cc:
        Remove not needed test of *ref (If ref is set it always points to a valid address)
      sql/table.cc:
        Indentation changes
        Moved buff_end directly after 'buff' assignment to make code more clear
      sql/unireg.cc:
        Indentation changes
      79538fb6
    • unknown's avatar
      Review of new pushed code · d853ecd6
      unknown authored
      - No need to check *ref when ref is checked (Simple optimization fix)
      
      
      sql/item.cc:
        No need to check *ref
      d853ecd6
  26. 12 Oct, 2005 1 commit
    • unknown's avatar
      select.test, sql_select.cc, sql_lex.cc, item.cc: · a46e8e23
      unknown authored
        Bug #7672 after merge fix
      
      
      sql/item.cc:
        Bug #7672 after merge fix
      sql/sql_lex.cc:
        Bug #7672 after merge fix
      sql/sql_select.cc:
        Bug #7672 after merge fix
      mysql-test/t/select.test:
        Bug #7672 after merge fix
      a46e8e23
  27. 09 Oct, 2005 1 commit
    • unknown's avatar
      Fix bug#7672 Unknown column error in order clause · f3f84ed8
      unknown authored
      When fixing Item_func_plus in ORDER BY clause field c is searched in all
      opened tables, but because c is an alias it wasn't found there.
      
      This patch adds a flag to select_lex which allows Item_field::fix_fields() 
      to look up in select's item_list to find aliased fields.
      
      
      sql/item.cc:
        Fix bug#7672 Unknown column error in order clause
        When fixing fields in ORDER BY clause allow Item_field::fix_fields() to look up items in select's item list to find aliased fields.
      sql/sql_lex.cc:
         Fix bug#7672 Unknown column error in order clause
      sql/sql_lex.h:
        Fix bug#7672 Unknown column error in order clause
        Added flag to select_lex allowing Item_field::fix_fields to look up items in select's item list.
      sql/sql_select.cc:
        Fix bug#7672 Unknown column error in order clause
      mysql-test/t/select.test:
        Test case for bug#7672 Unknown column error in order clause
      mysql-test/r/select.result:
        Test case for bug#7672 Unknown column error in order clause
      f3f84ed8
  28. 07 Oct, 2005 1 commit
    • unknown's avatar
      Review of new code since last pull · 3dcf2056
      unknown authored
      - Use %lx instead of %p as %p is not portable
      - Don't replace ROW item with Item_null
      
      
      myisam/mi_rkey.c:
        Use %lx instead of %p as %p is not portable
      myisam/mi_search.c:
        Use %lx instead of %p as %p is not portable
      mysql-test/r/select.result:
        More test for ROW comparison
      mysql-test/t/select.test:
        More test for ROW comparison
      sql/item.cc:
        We can't replace a ROW item with Item_null because:
        - Arg_comparator is still using the orignal row items and it's not good to have args[0] different from what is actually compared
        - If we are using the <=> comparator, NULL can still be compared as true
        - We would break things if we would ever use resolve_const_item() for operators like >, < etc.
      3dcf2056
  29. 06 Oct, 2005 1 commit
    • unknown's avatar
      Review of code pushed since last 5.0 pull: · c807724f
      unknown authored
      Ensure that ccache is also used for C programs
      mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
      mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
      Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
      Removed MY_UNIX_PATH from fn_format()
      Removed current_db_used from TABLE_LIST
      Removed usage of 'current_thd' in Item_splocal
      Removed some compiler warnings
      A bit faster longlong2str code
      
      
      
      BUILD/FINISH.sh:
        Ensure that ccache is also used for C programs
      BUILD/SETUP.sh:
        Ensure that ccache is also used for C programs
      client/mysql.cc:
        More debugging
        Ensure that 'delimiter' works the same way in batch mode as in normal mode.
        Compare 'delimiter' command case-insensitive.
        The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump.
      client/mysqldump.c:
        Indentation fixes
        Use ;; as a delmimiter for stored procedures and triggers instead of //
      client/mysqltest.c:
        Indentation fixes
      include/my_sys.h:
        Remove not needed MY_UNIX_PATH parameter
      mysql-test/r/alter_table.result:
        Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
      mysql-test/r/func_str.result:
        More testing of CONV() (to ensure that longlong2str() works correctly)
      mysql-test/r/information_schema.result:
        Drop all used tables and views
        Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
      mysql-test/r/information_schema_inno.result:
        Drop all used tables
      mysql-test/r/multi_statement.result:
        Drop used tables
      mysql-test/r/mysql.result:
        Add error messages to result
      mysql-test/r/mysqldump.result:
        ;; is now used as SP/trigger delimiter
      mysql-test/r/mysqlshow.result:
        Drop used tables
      mysql-test/r/temp_table.result:
        Drop used views
        Rename views to v#
      mysql-test/t/alter_table.test:
        Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
      mysql-test/t/func_str.test:
        More testing of CONV() (to ensure that longlong2str() works correctly)
      mysql-test/t/information_schema.test:
        Drop all used tables and views
        Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
      mysql-test/t/information_schema_inno.test:
        Drop all used tables
      mysql-test/t/multi_statement.test:
        Drop used tables
      mysql-test/t/mysql.test:
        Add error messages to result
      mysql-test/t/mysqlshow.test:
        Drop used tables
      mysql-test/t/temp_table.test:
        Drop used views
        Rename views to v#
      mysys/mf_format.c:
        Remove not needed MY_UNIX_PATH parameter
        (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH)
      sql/ha_federated.cc:
        Removed extra empty line
      sql/item.cc:
        Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal
        Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable
        One doesn't have to set 'null_value' when calling 'is_null()'
      sql/item.h:
        Add THD as a class variable to Item_splocal
        Use 'str_value' instead of 'str_value_ptr' to hold temp result
        Fixed bug in Item_hex when used in CAST()
      sql/item_func.cc:
        Optimize new code
      sql/log_event.cc:
        Move 'to_unix_path()' out of fn_format()
      sql/opt_range.cc:
        Simplify code
      sql/sp_head.cc:
        Ensure that Item_splocal has thd set before we call '->this_item()'
      sql/sql_class.cc:
        Return error if Statement::insert() fails in either hash_insert()
      sql/sql_parse.cc:
        Remove 'current_db_used' as we can trivially check if db table qualifier was used without this.
        Simplify code
      sql/sql_prepare.cc:
        Use enum instead of const int, to avoid ugly code for VC++
      sql/structs.h:
        Remove compiler warnings when using STRING_WITH_LEN() with constant strings.
      sql/table.cc:
        Fixed indentation
      sql/table.h:
        Remove not needed current_db_used
      strings/decimal.c:
        Simplify code
      strings/longlong2str-x86.s:
        A bit faster longlong2str.
        (Took some ideas from Peter Gulutzan's code)
      strings/my_strtoll10.c:
        Simplify code for MetroWerks compiler
      c807724f
  30. 01 Oct, 2005 1 commit
    • unknown's avatar
      Fix for BUG#13410 - qualified reference to a view column in the HAVING clause cannot be resolved. · 58263844
      unknown authored
      The problem was then when a column reference was resolved to a view column, the new Item
      created for this column contained the name of the view, and not the view alias.
      
      
      mysql-test/r/view.result:
        Additional test for BUG#13410.
      mysql-test/t/view.test:
        Additional test for BUG#13410.
      sql/item.cc:
        Correctly cast 'cur_field' to Item_ident because if the original item is
        an Item_field, the cur_field is either an Item_field or an Item_ref.
        Thus we have to cast cur_field to a common super-class of both.
      sql/item.h:
        - real_item() may be called before Item_ref::ref is set
          (i.e. the Item_ref object was resolved).
        - To avoid a crash and to return some meaningful value
          in such cases we return 'this'.
      sql/sql_base.cc:
        - 'item' may be an Item_ref, so we test for the type of the actual
          referenced item.
        - Correctly cast 'cur_field' to Item_ident because if the original
          item is an Item_field, the cur_field is either an Item_field or an
          Item_ref. Thus we have to cast cur_field to a common super-class
          of both.
      sql/table.cc:
        - When creating a new Item for a reference to a view column, use the view alias,
          and not the real view name.
        - Removed old code
      58263844
  31. 28 Sep, 2005 1 commit
    • unknown's avatar
      select.result, item.cc: · 0fda286a
      unknown authored
        After merge fix for bug#13356
      
      
      sql/item.cc:
        After merge fix for bug#13356
      mysql-test/r/select.result:
        After merge fix for bug#13356
      0fda286a
  32. 27 Sep, 2005 6 commits
    • unknown's avatar
      Fix bug#13356 resolve_const_item() wasn't able to handle Item_row items. · a17b3dcb
      unknown authored
      resolve_const_item() assumed to be not called for Item_row items. For
      ensuring that DBUG_ASSERT(0) was set there.
      
      This patch adds section for Item_row items. If it can it recursively calls
      resolve_const_item() for each item the Item_row contains. If any of the
      contained items is null then whole Item_row substitued by Item_null. Otherwise
      it just returns.
      
      
      sql/item.cc:
        Fix bug#13356 resolve_const_item() wasn't able to handle Item_row items.
        
        Added section to resolve_const_item() for Item_row items. If it can it
        recursively calls resolve_const_item() for each item the Item_row contains. If
        any of the contained items is null then Item_row is substituted by Item_null.
        Otherwise it just returns.
        Comment moved closer to function it belongs to.
      mysql-test/t/select.test:
        Test case for bug#13356 resolve_const_item() wasn't able to handle Item_row items.
      mysql-test/r/select.result:
        Test case for bug#13356 resolve_const_item() wasn't able to handle Item_row items.
      a17b3dcb
    • unknown's avatar
      Fixed BUG#12589: Assert when creating temp. table from decimal stored · 06eabeee
      unknown authored
                       procedure variable
        Second version, after review.
        Keep the unsigned_flag in Item_decimal updated. Note that this also changed
        the result of several old test results - creating tables from decimal
        templates now gives unsigned columns and different sizes. (Several tests
        had Length > Max_length before.)
      
      
      mysql-test/r/case.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/metadata.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_2myisam.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_3innodb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_4heap.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_5merge.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_6bdb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_7ndb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/sp.result:
        New test case for BUG#12589.
      mysql-test/r/type_newdecimal.result:
        Updated result (after fixing BUG#12589).
      mysql-test/t/sp.test:
        New test case for BUG#12589.
      sql/item.cc:
        Keep the unsigned_flag updated in Item_splocal and Item_decimal.
      06eabeee
    • unknown's avatar
      additional fix to the bug #13372 (decimal union) · 57e700d7
      unknown authored
      mysql-test/r/type_float.result:
        test result fixed
      sql/item.cc:
        we have to limit the max_length
      57e700d7
    • unknown's avatar
      Fix for bug #13372 (decimal union) · 087f7cc8
      unknown authored
      mysql-test/r/type_decimal.result:
        test result fixed
      mysql-test/r/type_float.result:
        test result fixed
      mysql-test/t/type_decimal.test:
        test case added
      mysql-test/t/type_float.test:
        test case added
      sql/item.cc:
        Fixed counting of the max_length for the REAL_RESULT
      087f7cc8
    • unknown's avatar
      item.cc: · d7e4e1a5
      unknown authored
        Fixed bug #13410.
        Fixed name resolution for qualified reference to a view column
        in the HAVING clause.
      view.result, view.test:
        Added a test case for bug #13410.
      
      
      mysql-test/t/view.test:
        Added a test case for bug #13410.
      mysql-test/r/view.result:
        Added a test case for bug #13410.
      sql/item.cc:
        Fixed bug #13410.
        Fixed name resolution for qualified reference to a view column
        in the HAVING clause.
      d7e4e1a5
    • unknown's avatar
      sql_base.cc, item.cc: · f6a552b1
      unknown authored
        Fixed bug #13411.
        Fixed name resolution for non-qualified reference to a view column
        in the HAVING clause.
      view.result, view.test:
        Added a test case for bug #13411.
      
      
      mysql-test/t/view.test:
        Added a test case for bug #13411.
      mysql-test/r/view.result:
        Added a test case for bug #13411.
      sql/item.cc:
        Fixed bug #13411.
        Fixed name resolution for non-qualified reference to a view column
        in the HAVING clause.
      sql/sql_base.cc:
        Fixed bug #13411.
        Fixed name resolution for non-qualified reference to a view column
        in the HAVING clause.
      f6a552b1