An error occurred fetching the project authors.
  1. 24 Mar, 2005 1 commit
    • unknown's avatar
      Bug #9317: Wrong count for tables in INFORMATION_SCHEMA · 23f377fc
      unknown authored
        there was no check of result of 
        table->file->write_row() function. When count of rows was
        more than table max_rows(HEAP table) the following recodrs
        were not inserted to the table
        -'schema_table_store_record' function is added. 
          The function checks result of write_row function
          and convert HEAP table to MyISAM if necessary
        - Result check after write_row is added into all 
          I_S function which store the records to I_S tables  
      
      
      mysql-test/r/information_schema.result:
        Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
      mysql-test/t/information_schema.test:
        Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
      sql/sql_select.cc:
        Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
      sql/sql_show.cc:
        Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
      sql/table.h:
        Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
      23f377fc
  2. 22 Mar, 2005 1 commit
  3. 21 Mar, 2005 1 commit
    • unknown's avatar
      Cleanups during review of code · 8817bbac
      unknown authored
      Fixed newly introduced bug in rollup
      
      
      client/mysqldump.c:
        Safer buffer allocation
        Removed wrong assert
      mysql-test/r/olap.result:
        more tests
      mysql-test/t/olap.test:
        more tests
      sql/handler.cc:
        Simple cleanup
        Fixed wrong check for next digit (wrong debug output)
      sql/item.cc:
        Replace shrink_to_length() with mark_as_const() as the former allowed one to do changes to the string
      sql/item_sum.cc:
        Change reference to pointer
        Trivial optimzation of testing 'allways_null'
      sql/mysqld.cc:
        Proper indentation of comment
      sql/sql_select.cc:
        Fixed newly introduced bug in rollup
      sql/sql_string.h:
        Remove not needed 'shrink_to_length()'
        Added 'mark_as_const()' to be used when one want to ensure that a string is not changed
      8817bbac
  4. 20 Mar, 2005 1 commit
    • unknown's avatar
      func_group.test, func_group.result: · b450786c
      unknown authored
        Added a test case for bug #9210.
      sql_select.cc:
        Fixed bug #9210.
        The function calc_group_buffer did not cover the case
        when the GROUP BY expression was decimal.
        Slightly optimized the other code.
      
      
      sql/sql_select.cc:
        Fixed bug #9210.
        The function calc_group_buffer did not cover the case
        when the GROUP by expression was decimal.
        Slightly optimized the other code.
      mysql-test/t/func_group.test:
        Added a test case for bug #9210.
      b450786c
  5. 19 Mar, 2005 1 commit
    • unknown's avatar
      Eliminate warnings noticed by VC7. This includes fixing my_mmap() on · 22234f31
      unknown authored
      Windows to call CreateFileMapping() with correct arguments, and
      propogating the introduction of query_id_t to everywhere query ids are
      passed around. (Bug #8826)
      
      
      libmysql/libmysql.c:
        Make implicit cast explicit
      myisam/mi_open.c:
        Make cast of value to smaller data size explicit
      myisam/mi_packrec.c:
        Cast file size (my_off_t) to size_t for mmap
      mysys/my_mmap.c:
        Fix Windows version of my_mmap() to use the right parameters
        for call to CreateFileMapping()
      sql/field.cc:
        Use temporary value of correct type
      sql/field.h:
        Use query_id_t for query_id value
      sql/ha_berkeley.cc:
        Fix flag check
      sql/ha_innodb.h:
        Use query_id_t for query_id value
      sql/handler.cc:
        Explain opt_using_transactions calculation, and add cast
      sql/handler.h:
        Fix forward declaration of COND
      sql/item.cc:
        Fix val_bool() tests of val_int() to avoid implicit cast
      sql/item_cmpfunc.cc:
        Fix typo in switch label
      sql/item_func.cc:
        Make implicit cast explicit
      sql/item_strfunc.cc:
        Now that query_id is a query_id_t, need to cast it to a ulong here
      sql/item_subselect.cc:
        Fix test of value
      sql/log.cc:
        Cast my_off_t used for file size to size_t for memory allocation
        Also cast my_off_t when using it to calculate the number of pages for TC log
        Cast total_ha_2pc to uchar when saving it
      sql/mysql_priv.h:
        Move up query_id definition so it can be used more widely
      sql/opt_range.cc:
        Add unused delete operator to prevent compiler warning
      sql/set_var.cc:
        Cast value for max_user_connections
      sql/sql_cache.cc:
        Remove unused label
      sql/sql_class.h:
        Fix query id values to be of type query_id_t
      sql/sql_db.cc:
        Move variable only used inside #ifdef within the #ifdef
      sql/sql_help.cc:
        Remove unused label
      sql/sql_insert.cc:
        Use query_id_t for query id values
      sql/sql_lex.h:
        Add unused delete operator to prevent compiler warning
      sql/sql_select.cc:
        Remove unused variable
        Make cast of value explicit
      sql/sql_select.h:
        Use query_id_t for query id values
      sql/sql_table.cc:
        Make comparison to function pointer explicit
      sql/sql_update.cc:
        Use query_id_t for query id values
      sql/table.h:
        Use query_id_t for query id values
      strings/ctype-simple.c:
        Add cast of long value to (char) in expression
      strings/ctype-ucs2.c:
        Add cast of long value to (char) in expression
      strings/ctype-utf8.c:
        Make cast to smaller size explicit
      22234f31
  6. 18 Mar, 2005 2 commits
    • unknown's avatar
      olap.test: · c5c5810d
      unknown authored
        Added a test case for bug #8617.
      sql_select.cc:
        Fixed bug #8617.
        Queries with ROLLUP and LIMIT n returned more than n rows
        if SQL_CALC_FOUND_ROWS was used.
      
      
      sql/sql_select.cc:
        Fixed bug #8617.
        Queries with ROLLUP and LIMIT n returned more than n rows
        if SQL_CALC_FOUND_ROWS was used.
      mysql-test/t/olap.test:
        Added a test case for bug #8617.
      c5c5810d
    • unknown's avatar
      Fix merge of sql/sql_select.cc using Igor's patch (Bug #9254) · 52c1c2fd
      unknown authored
      sql/sql_select.cc:
        Post-merge correction
      52c1c2fd
  7. 17 Mar, 2005 1 commit
  8. 16 Mar, 2005 3 commits
    • unknown's avatar
      olap.result, olap.test: · 56c345f4
      unknown authored
        Added a test for bug #8615.
      sql_select.cc:
        Fixed bug #8615.
        This fix only removed the cause of the reported crash.
        It does not resolve other problems of rollup queries
        with DISTINCT. They were fixed in the previous patch 
        for bug 8616.
      
      
      sql/sql_select.cc:
        Fixed bug #8615.
        This fix only removed the cause of the reported crash.
        It does not resolve other problems of rollup queries
        with DISTINCT. They were fixed in the previous patch 
        for bug 8616.
      mysql-test/t/olap.test:
        Added a test for bug #8615.
      mysql-test/r/olap.result:
        Added a test for bug #8615.
      56c345f4
    • unknown's avatar
      Cleanup during reviews · 1637a873
      unknown authored
      Removed some optional arguments
      Fixed portability problem in federated tests
      
      
      client/sql_string.cc:
        update from sql/sql_string.cc
      client/sql_string.h:
        update from sql/sql_string.h
      mysql-test/r/federated.result:
        Fixed error message
      sql/field.cc:
        Cleanup during review
        Remove const in 'const unsigned int'
      sql/field.h:
        Remove const in 'const unsigned int'
      sql/ha_federated.cc:
        Better error string.  Add missing argument to error (before 'errno' was picked up from stack)
      sql/handler.cc:
        Removed compiler warning
      sql/item_func.cc:
        Cleanup during review
      sql/item_sum.cc:
        Cleanup during review
      sql/lock.cc:
        Remove optional arguments
      sql/log_event.cc:
        Remove optional arguments
      sql/mysql_priv.h:
        Remove optional arguments
        cahnge preapre_create_fields to use pointers instead of references
      sql/opt_range.cc:
        Fix arguments so that return value is last
      sql/sql_base.cc:
        Remove optional arguments
      sql/sql_delete.cc:
        Remove optional arguments
      sql/sql_error.cc:
        Remove optional arguments
      sql/sql_help.cc:
        Remove optional arguments
      sql/sql_parse.cc:
        Remove optional arguments
      sql/sql_prepare.cc:
        Remove optional arguments
      sql/sql_rename.cc:
        Remove optional arguments
      sql/sql_select.cc:
        Remove optional arguments
      sql/sql_show.cc:
        Cleanup during review
      sql/sql_string.cc:
        Simple optimization
      sql/sql_table.cc:
        Remove optional arguments
        Fixed indentation
      sql/sql_update.cc:
        Remove optional arguments
      sql/sql_yacc.yy:
        Change references to pointers
      1637a873
    • unknown's avatar
      olap.result, olap.test: · 870ea169
      unknown authored
        Added a test case for bug #8616.
      item.h:
        Fixed bug #8616.
        Added class Item_null_result used in rollup processing.
      sql_select.h, sql_select.cc:
        Fixed bug #8616.
        Added JOIN::rollup_write_data to cover rollup queries
        with DISTINCT. Modified other rollup methods.
      
      
      sql/sql_select.cc:
        Fixed bug #8616.
        Added JOIN::rollup_write_data to cover rollup queries
        with DISTINCT. Modified other rollup methods.
      sql/sql_select.h:
        Fixed bug #8616.
        Added JOIN::rollup_write_data to cover rollup queries
        with DISTINCT. Modified other rollup methods.
      sql/item.h:
        Fixed bug #8616.
        Added class Item_null_result used in rollup processing.
      mysql-test/t/olap.test:
        Added a test case for bug #8616.
      mysql-test/r/olap.result:
        Added a test case for bug #8616.
      870ea169
  9. 14 Mar, 2005 2 commits
  10. 13 Mar, 2005 1 commit
    • unknown's avatar
      WL#926 "SUM(DISTINCT) and AVG(DISTINCT)": improvement of SUM(DISTINCT) and · 56012000
      unknown authored
       implementation of AVG(DISTINCT) which utilizes the approach with Fields.
      The patch implemented in October is portede to the up-to-date tree 
      containing DECIMAL type.
      Tests for AVG(DISTINCT) (although there is not much to test provided
      that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT()
      will follow in another changeset.
      
      
      sql/field.cc:
        A handy way to init create_field used for use with virtual tmp tables.
        Feel free to extend it for your own needs.
      sql/field.h:
        Declaration for create_field::init_for_tmp_table()
      sql/item.cc:
        Implementation for a framework used to easily handle different result
        types of SQL expressions. Instead of having instances of each possible 
        result type (integer, decimal, double) in every item, variables
        of all used types are moved to struct Hybrid_type.
        Hybrid_type can change its dynamic type in runtime, and become,
        for instance, DECIMAL from INTEGER.
        All type-specific Item operations are moved to the class hierarchy
        Hybrid_type_traits. Item::decimals and Item::max_length can
        be moved to Hybrid_type as well.
      sql/item.h:
        Declaration for Hybrid_type framework. See also comments for item.cc
        in this changeset.
      sql/item_sum.cc:
        Rewritten implementation for Item_sum_sum_distinct (SUM(DISTINCT))
        and added implementation for Item_sum_avg_distinct (AVG(DISTINCT)).
        The classes utilize Hybrid_type class hierarchy and Fields to
        convert SUM/AVG arguments to binary representation and store in a RB-tree.
      sql/item_sum.h:
        Declarations for Item_sum_distinct (the new intermediate class used
        for SUM and AVG distinct), Item_sum_sum_distinct, Item_sum_avg_distinct.
      sql/sql_select.cc:
        Implementatio of create_virtual_tmp_table().
      sql/sql_select.h:
        Declaration for create_virtual_tmp_table.
      sql/sql_yacc.yy:
        Grammar support for Item_sum_avg_distinct.
      56012000
  11. 08 Mar, 2005 1 commit
  12. 03 Mar, 2005 1 commit
    • unknown's avatar
      Fixes for bug#8115 "Server Crash with prepared statement" · 27f13b17
      unknown authored
       and bug#8849 "problem with insert statement with table alias's": 
      make equality propagation work in stored procedures and prepared 
      statements.
      Equality propagation can change AND/OR structure of ON expressions,
      so the fix is to provide each execution of PS/SP with it's own
      copy of AND/OR tree. We have been doing that already for WHERE clauses,
      now ON clauses are also copied.
      
      
      mysql-test/r/ps.result:
        Bug#8115: test results fixed.
      mysql-test/r/sp.result:
        Bug#8849: test results fixed.
      mysql-test/t/ps.test:
        A test case for Bug#8115 "Server Crash with prepared statement".
      mysql-test/t/sp.test:
        A test case for Bug#8849 "problem with insert statement with table 
        alias's".
      sql/item_cmpfunc.cc:
        Comment a parse tree transformation.
      sql/item_cmpfunc.h:
        Comment how Item_equal works with PS/SP.
      sql/mysql_priv.h:
        Add declaration for init_stmt_after_parse.
      sql/sp_head.cc:
        Call init_stmt_after_parse in restore_lex(), which is used to
        grab TABLE_LIST and SELECT_LEX list of a parsed substatement of
        stored procedure. This is a necessary post-init step which 
        must be done for any statement which can be executed many times.
      sql/sql_prepare.cc:
        Implement init_stmt_after_parse() which prepares AND/OR
        structure of all ON expressions and WHERE clauses of a statement
        for copying.
      sql/sql_select.cc:
        Implementation of equality propagation inspected with regard to 
        prepared statements and stored procedures. We now restore
        AND/OR structure of every ON expression in addition to AND/OR
        structure of WHERE clauses when reexecuting a PS/SP.
      sql/table.h:
        Add declaration for TABLE::prep_on_expr.
      27f13b17
  13. 01 Mar, 2005 2 commits
    • unknown's avatar
      Removed some usage of current_thd · baeb47cf
      unknown authored
      baeb47cf
    • unknown's avatar
      Fix for Bug#5615 and merge from 4.1 · da3cf29b
      unknown authored
      
      mysql-test/r/func_group.result:
        Added some tests and fix for Bug#5615.
      mysql-test/r/show_check.result:
        Fix for Bug#5615.
      mysql-test/t/func_group.test:
        Added some tests.
      sql/item_sum.cc:
        Fix for Bug#5615.
      sql/item_sum.h:
        Fix for Bug#5615.
      sql/sql_select.cc:
        Fix for Bug#5615.
      sql/sql_select.h:
        Fix for Bug#5615.
      da3cf29b
  14. 28 Feb, 2005 2 commits
    • unknown's avatar
      Fix for BUG#8726: In JOIN::optimize on ER_TOO_BIG_SELECT error set JOIN::error to -1 to cause · 749a27c5
      unknown authored
      the error to be sent to the client.
      
      
      mysql-test/r/select_safe.result:
        Testcase for BUG#8726
      mysql-test/t/select_safe.test:
        Testcase for BUG#8726
      sql/sql_select.cc:
        Fix for BUG#8726: On ER_TOO_BIG_SELECT set JOIN::error to -1 to cause the error to be sent to the client.
      749a27c5
    • unknown's avatar
      Fixed wrong memory references found by purify · d2ce2d2e
      unknown authored
      (No really critical errors found, but a few possible wrong results)
      
      
      innobase/dict/dict0dict.c:
        Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
      mysql-test/r/select_found.result:
        Add missing drop table
      mysql-test/r/type_set.result:
        More tests
      mysql-test/t/select_found.test:
        Add missing drop table
      mysql-test/t/type_set.test:
        More tests
      mysys/my_init.c:
        Avoid warning from purify (purify doesn't handle getrusage() properly)
      sql/field.h:
        enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
      sql/filesort.cc:
        enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
      sql/item_cmpfunc.cc:
        Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
        Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
      sql/mysqld.cc:
        Wait for signal handler to stop when running --bootstrap
        (Fixes warning from purify)
      sql/sql_insert.cc:
        Initialize slot used by innodb.cc (not critical)
      sql/sql_lex.h:
        Better comments
      sql/sql_repl.cc:
        memcmp -> bcmp() to avoid warning from purify
      sql/sql_select.cc:
        Fix for out-of-bound memory reference when doing DISTINCT on const expressions
      strings/ctype-simple.c:
        Fixes to not access uninitialized memory
        (Not critical)
      d2ce2d2e
  15. 25 Feb, 2005 1 commit
    • unknown's avatar
      Remove compiler warnings and remove not used variables · 0bc36004
      unknown authored
      (Found during build process)
      
      
      extra/comp_err.c:
        Remove compiler warnings
      extra/perror.c:
        Remove compiler warnings
      innobase/dict/dict0dict.c:
        Remove compiler warnings
      innobase/dict/dict0load.c:
        Remove compiler warnings
      innobase/pars/pars0sym.c:
        Remove compiler warnings
      innobase/row/row0row.c:
        Remove compiler warnings
      innobase/row/row0sel.c:
        Remove compiler warnings
      libmysqld/lib_sql.cc:
        Remove not used variables
      myisam/mi_key.c:
        Remove compiler warnings
      regex/engine.c:
        Added comment
      sql/derror.cc:
        Remove not used variables
      sql/examples/ha_archive.cc:
        Fixed bug in blob handling
        Removed not used variable
      sql/field.cc:
        Remove compiler warnings
        Remove not used variables
      sql/filesort.cc:
        Remove compiler warnings
      sql/ha_heap.cc:
        Remove not used variable
      sql/ha_innodb.cc:
        Remove not used variables
        Remove compiler warnings
      sql/handler.cc:
        Remove compiler warnings and remove not used variables
      sql/item.cc:
        Remove compiler warnings and remove not used variables
      sql/item_subselect.cc:
        Remove compiler warnings
      sql/item_sum.cc:
        Remove compiler warnings
      sql/item_sum.h:
        Remove compiler warnings and remove not used variables
      sql/log.cc:
        Remove compiler warnings and remove not used variables
      sql/log_event.cc:
        Remove compiler warnings
      sql/mysqld.cc:
        Remove compiler warnings and remove not used variables
      sql/opt_range.cc:
        Remove compiler warnings and remove not used variables
      sql/slave.cc:
        Remove compiler warnings and remove not used variables
      sql/sp_pcontext.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_acl.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_analyse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_base.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_db.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_help.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_insert.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_load.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_parse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_prepare.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_select.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_show.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_table.cc:
        Remove compiler warnings
      sql/sql_union.cc:
        Remove compiler warnings
      sql/sql_update.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_yacc.yy:
        Remove compiler warnings and remove not used variables
      sql/strfunc.cc:
        Remove compiler warnings and remove not used variables
      strings/ctype-ucs2.c:
        Remove compiler warnings
      tests/mysql_client_test.c:
        Remove compiler warnings and remove not used variables
      tools/mysqlmanager.c:
        Remove compiler warnings and remove not used variables
      0bc36004
  16. 24 Feb, 2005 1 commit
    • unknown's avatar
      sql_select.cc: · 3f700386
      unknown authored
        Redundant "Item::" was removed.
      
      
      sql/sql_select.cc:
        Redundant "Item::" was removed.
      3f700386
  17. 23 Feb, 2005 2 commits
  18. 19 Feb, 2005 1 commit
    • unknown's avatar
      Fixed BUILD script to use --with-berkeley-db instead of --with-bdb · b00fd9ee
      unknown authored
      Lots of small fixes to multi-precision-math path
      Give Note for '123.4e'
      Added helper functions type 'val_string_from_real()
      Don't give warnings for end space for string2decimal()
      Changed storage of values for SP so that we can detect length of argument without strlen()
      Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
      
      
      
      BUILD/SETUP.sh:
        with-bdb ->with-berkeley-db
      include/decimal.h:
        Make string2decimal and string2decimal_fixed inline
      mysql-test/r/func_group.result:
        More tests (to find bugs in precision math fixes)
      mysql-test/r/func_set.result:
        Test to cover more Item_func_field::val_xxx() code
      mysql-test/r/ps_6bdb.result:
        update results
      mysql-test/r/type_decimal.result:
        New tests
        Give note for '123.4e'
      mysql-test/r/type_newdecimal.result:
        Number of decimal changes (probably right, but hard to verify)
      mysql-test/t/func_group.test:
        More tests (to find bugs in precision math fixes)
      mysql-test/t/func_set.test:
        Test to cover more Item_func_field::val_xxx() code
      mysql-test/t/type_decimal.test:
        New tests to cover more cases in decimal.c
      sql/item.cc:
        Added helper functions type 'val_string_from_real()'
        Use new interfase to str2my_decimal()
        Moved nr_of_decimals() here (and made it static)
      sql/item.h:
        Added helper functions type 'val_string_from_real()'
      sql/item_func.cc:
        Style fixes
        Trivial optimizations
        Ensure null_value is set if my_decimal_add/sub/mul/div returns error
        Remove not needed Item_func_int_div::val_str()
        Join Item_func_signproc and Item_func_neg
        Fix that FIELD() works when first argument is NULL or one if it's arguments are NULL
        new str2my_decimal interface
      sql/item_func.h:
        Make Item_func_int_div inherit from Item_int_func (allows us to remove some virtual functions)
        Join Item_func_signproc & Item_func_neg
      sql/item_strfunc.cc:
        Move nr_of_decmails() to Item.cc (as it was only used here)
      sql/item_sum.cc:
        Style fixes
        Change a lot of code to use new helper converter functions in item.cc
        Moved Item_sum::val_decimal() to Item_sum_int::val_decimal()
        Fixed calls to wrong functions (Item_sum_num::val_int())
        Ensure that all hybrid functions checks hybrid_type in val_xxx() (As there is no gurantee that they are called in the right context)
        Simplify key_length allocation in Item_sum_sum_distinct()
        Simplified create_tmp_field() and reset_field()
        Fixed potential error in Item_sum_hybrid::reset_field()
        Optimize Item_sum_avg::update_field()
        Item_std_field() functions musted be fully coded becasue Item_variance_field::val_xxx functions called helper functions
        Coded missing Item_sum_ufd_xxx::val_decimal() functions
      sql/item_sum.h:
        Moved Item_sum::val_decimal() to Item_sum_int::val_decimal()
        Added missing Item_sum_ufd_xxx::val_decimal() functions
        Removed not used scale() function.
        Fixed that Item_std_field() works with decimal arguments
        Fixed that CREATE ... STD() will create a REAL field
      sql/log_event.cc:
        Ensure that we use same format for all types
      sql/my_decimal.cc:
        Don't give warnings for end space for string2decimal()
        Added dbug_print_decimal()
      sql/my_decimal.h:
        Style fixes
        Prototypes for new functions
        New interface for str2my_decimal()
      sql/mysql_priv.h:
        Made nr_of_decimals() static
      sql/protocol.cc:
        Simplify code (by assume that decimal can't be bigger than DECIMAL_MAX_STR_LENGTH]
      sql/protocol_cursor.cc:
        Changed storage of values for SP so that we can detect length of argument without strlen()
      sql/sp_head.cc:
        Simplify code for decimal handling by letting item handling conversion to decimal
      sql/sp_rcontext.cc:
        Use new method to get length of arguments
      sql/sql_analyse.cc:
        if -> switch
        Increase 'empty' if decimal value=0
        Remove usage of strcat()
      sql/sql_base.cc:
        Remove unnecessary checks
      sql/sql_class.cc:
        Remove not needed 'else'
        Removed not used variables
      sql/sql_select.cc:
        remove test for impossible condtion
      strings/decimal.c:
        Made two trivial functions macros
        Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
        This safer than before as we don't require an end \0 anymore (old code gave wrong answers in MySQL for some internals strings that where not \0 terminated)
        Detect error numbers of type '12.55e'
        str2dec() will now set 'to' to zero in case of errors
      b00fd9ee
  19. 17 Feb, 2005 2 commits
    • unknown's avatar
      item.h: · 0bd9f889
      unknown authored
        Revised the fix for bug #7098.
        Corrected the method Item_string::new_item.
      sql_select.cc:
        Revised the fix for bug #7098.
        Aborted the previous modifications.
      
      
      sql/sql_select.cc:
        Revised the fix for bug #7098.
        Aborted the previous modifications.
      sql/item.h:
        Revised the fix for bug #7098.
        Corrected the method Item_string::new_item.
      0bd9f889
    • unknown's avatar
      select.result, select.test: · 15ddf2f8
      unknown authored
        Added a test case for bug #7098.
      sql_select.cc:
        Fixed bug #7098.
        When a string field was substituted for an equal constant
        the collation of the constant was changed by mistake for 
        the binary collation.
      
      
      sql/sql_select.cc:
        Fixed bug #7098.
        When a string field was substituted for an equal constant
        the collation of the constant was changed by mistake for 
        the binary collation.
      mysql-test/t/select.test:
        Added a test case for bug #7098.
      mysql-test/r/select.result:
        Added a test case for bug #7098.
      15ddf2f8
  20. 12 Feb, 2005 1 commit
    • unknown's avatar
      Fix for BUG#8218: · bc100544
      unknown authored
      Remove TMP_TABLE_PARAM::copy_funcs_it. TMP_TABLE_PARAM is a member of JOIN which is 
      copied via memcpy, and List_iterator_fast TMP_TABLE_PARAM::copy_funcs_it ends up 
      pointing to the wrong List.
      
      
      mysql-test/r/subselect.result:
        Testcase for BUG#8218
      mysql-test/t/subselect.test:
        Testcase for BUG#8218
      sql/sql_select.cc:
        Fix for BUG#8218: Create/use own iterator since TMP_TABLE_PARAM::copy_funcs_it is removed.
      bc100544
  21. 11 Feb, 2005 1 commit
  22. 08 Feb, 2005 3 commits
    • unknown's avatar
      Precision Math implementation · c346d5c3
      unknown authored
      BitKeeper/etc/ignore:
        Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
      c346d5c3
    • unknown's avatar
      Fix for BUG#8371: wrong rec_per_key value for hash index on temporary table · cb5f7976
      unknown authored
      mysql-test/r/heap_hash.result:
        Testcase for BUG#8371: wrong rec_per_key value for hash index on temporary table
      mysql-test/t/heap_hash.test:
        Testcase for BUG#8371: wrong rec_per_key value for hash index on temporary table
      sql/ha_heap.cc:
        Fix for BUG#8371: wrong rec_per_key value for hash index on temporary table:
        Don't assume that table->rec_per_key==NULL if table->tmp_table != NO_TMP_TABLE, 
        this is not true for tables created with "CREATE TEMPORARY TABLE" (while it holds
        for temporary tables created during query execution)
      sql/sql_select.cc:
        Initialize rec_per_key for all keys in temporary table.
      cb5f7976
    • unknown's avatar
      Better bugfix for "HAVING when refering to RAND()" (Bug #8216) · 8bbefca5
      unknown authored
      Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
      This will ensure that any reference to these has a valid value.
      Generalized the code for split_sum_func()
      
      
      BitKeeper/etc/ignore:
        added support-files/ndb-config-2-node.ini
      mysql-test/r/group_by.result:
        More complicated test to assure that rand() is only calulated once
      mysql-test/r/user_var.result:
        Back to old results :(  (ok but not perfect)
      mysql-test/t/group_by.test:
        More complicated test to assure that rand() is only calulated once
      sql/item.cc:
        Better bugfix for "HAVING when refering to RAND()"
        This will ensure that when refering to things like RAND() in HAVING through an alias we will not recalculate that rand() value in the HAVING part but use the value in the row
        Generalize split_sum_func()
      sql/item.h:
        Better bugfix for "HAVING when refering to RAND()"
        T
      sql/item_cmpfunc.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/item_func.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/item_row.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/item_strfunc.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/sql_list.h:
        Add functions to concatenate lists
      sql/sql_select.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
        This will ensure that any reference to these has a valid value.
      8bbefca5
  23. 05 Feb, 2005 1 commit
    • unknown's avatar
      Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only... · e2c82051
      unknown authored
      Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only (2nd patch after Monty's comments).
      
      
      sql/mysql_priv.h:
        Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
      sql/opt_range.cc:
        Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
      sql/sql_base.cc:
        Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
      sql/sql_select.cc:
        Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
      sql/table.h:
        Outer joins cleanup: 
         * Remove TABLE::outer_join and use TABLE::maybe_null only.
         * Added comments.
      e2c82051
  24. 01 Feb, 2005 1 commit
  25. 31 Jan, 2005 1 commit
    • unknown's avatar
      fixed problem with groupping by view (BUG#7116) · b458ce2f
      unknown authored
      mysql-test/r/view.result:
        view and group_concat()
      mysql-test/t/view.test:
        view and group_concat()
      sql/item.cc:
        comments added
      sql/sql_select.cc:
        fixed ORDER/GROUP BY processing for view support
      b458ce2f
  26. 25 Jan, 2005 2 commits
    • unknown's avatar
      Cleanups during review · b91c6082
      unknown authored
      BitKeeper/etc/ignore:
        added libmysqld/examples/mysqltest_embedded
      client/mysqlbinlog.cc:
        Call mysql_close() before die()
      innobase/include/eval0eval.ic:
        Remove assert that fails on 64 bit machines
        (Tested with BUILD/compile-pentium64-valgrind-max on 64 bit Intel CPU)
      sql/mysqld.cc:
        Force lower_case_table_names to 0 if set to 2 on case insensitive file name
      sql/sql_select.cc:
        Remove #if 0
      b91c6082
    • unknown's avatar
      Fix two typos in comments. · e56d97ea
      unknown authored
      sql/sql_parse.cc:
        Fix a comment.
      sql/sql_select.cc:
        Fix a comment.
      e56d97ea
  27. 22 Jan, 2005 1 commit
    • unknown's avatar
      select_found.result, select_found.test: · 2afeecfc
      unknown authored
        Added a test case for bug #7945.
      sql_select.cc:
        Fixed bug #7945. If DISTINCT is used only with constants
        in a query with GROUP BY, we can apply an optimization
        that set LIMIT to 1 only in the case when there is 
        no SQL_CALC_FOUND_ROWS.
      
      
      sql/sql_select.cc:
        Fixed bug #7945. If DISTINCT is used only with constants
        in a query with GROUP BY, we can apply an optimization
        that set LIMIT to 1 only in the case when there is 
        no SQL_CALC_FOUND_ROWS.
      mysql-test/t/select_found.test:
        Added a test case for bug #7945.
      mysql-test/r/select_found.result:
        Added a test case for bug #7945.
      2afeecfc
  28. 20 Jan, 2005 1 commit
  29. 19 Jan, 2005 1 commit
    • unknown's avatar
      BUG#6034 - Error code 124: Wrong medium type. · a8d57b4b
      unknown authored
      Version for 5.0. Committed for merge.
      If the result table is one of the select tables in INSERT SELECT,
      we must not disable the result tables indexes before selecting.
      Now the preparation is split into two prepare methods.
      The first detects the situation and defers some preparations
      until the second phase.
      
      
      mysql-test/r/insert_select.result:
        BUG#6034 - Error code 124:  Wrong medium type.
        The test results.
      mysql-test/t/insert_select.test:
        BUG#6034 - Error code 124:  Wrong medium type.
        The test case.
      sql/sql_class.h:
        BUG#6034 - Error code 124:  Wrong medium type.
        Added a new method for deferred preparation actions.
      sql/sql_insert.cc:
        BUG#6034 - Error code 124:  Wrong medium type.
        If the insert table is one of the select tables, a part 
        of the result table preparations like disabling indexes
        has to be done after the select phase.
        This is now done in the new method select_insert::prepare2().
      sql/sql_select.cc:
        BUG#6034 - Error code 124:  Wrong medium type.
        The result table preparation is now split into prepare() and
        prepare2(). Disabling indexes and other preparation stuff
        is deferred until after the selection phase.
      a8d57b4b