1. 11 Oct, 2006 1 commit
    • unknown's avatar
      Merge polly.local:/tmp/maint/bug11655/my41-bug11655 · 3baf2034
      unknown authored
      into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
      
      
      sql/field.cc:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      mysql-test/r/func_time.result:
        Manually merged
      mysql-test/t/func_time.test:
        Manually merged
      3baf2034
  2. 04 Oct, 2006 1 commit
    • unknown's avatar
      Fixes a number of problems with time/datetime <-> string conversion functions: · 634d3ff2
      unknown authored
      - bug #11655 "Wrong time is returning from nested selects - maximum time exists
      - input and output TIME values were not validated properly in several conversion functions
      - bug #20927 "sec_to_time treats big unsigned as signed"
      - integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
      - BIGINT UNSIGNED values were treated as SIGNED in several functions
      - in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced
      
      
      include/my_time.h:
        Added defines for the TIME limits
        Added defines for the warning flags set by str_to_time() and check_time_range()
        Added check_time_range() declaration
      mysql-test/r/func_sapdb.result:
        Fixed testcases which relied on incorrect TIMEDIFF() behaviour
      mysql-test/r/func_time.result:
        Fixed testcase which relied on incorrect behaviour
        Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
      mysql-test/t/func_time.test:
        Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
      sql-common/my_time.c:
        Added check_time_range() to be used from str_to_time() and item_timefunc.cc
        Added new out-of-range flag to str_to_time() warnings
        Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
      sql/field.cc:
        Replaced out-of-range checks with checks for flags returned by str_to_time()
      sql/item_timefunc.cc:
        Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
        Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
        Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
        Checks for 'unsigned int' overflows in Item_func_maketime
        Use make_time_with_warn() instead of make_time() in Item_func_maketime
        Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
      sql/time.cc:
        Check for return value of str_to_time() along with warning flags
      634d3ff2
  3. 22 Sep, 2006 3 commits
  4. 21 Sep, 2006 3 commits
    • unknown's avatar
      Merge knielsen.mysql.internal:/usr/local/mysql/mysql-4.1 · c9983fcf
      unknown authored
      into  bk-internal.mysql.com:/tmp/knielsen/mysql-4.1-maint
      
      
      c9983fcf
    • unknown's avatar
      Fix for bug #20204: "order by" changes the results returned · 5d3a59fa
      unknown authored
      Item_substr's results are improperly stored in a temporary table due to       
      wrongly calculated max_length value for multi-byte charsets if two            
      arguments specified.                                                          
      
      
      mysql-test/r/ctype_utf8.result:
        Fix for bug #20204: "order by" changes the results returned
          - test case.
      mysql-test/t/ctype_utf8.test:
        Fix for bug #20204: "order by" changes the results returned
          - test result.
      sql/item_strfunc.cc:
        Fix for bug #20204: "order by" changes the results returned
          - always take into account current mbmaxlen value calculating max_length.
      5d3a59fa
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1 · c19ac9ec
      unknown authored
      into  mysql.com:/usr/home/ram/work/mysql-4.1-maint
      
      
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      c19ac9ec
  5. 19 Sep, 2006 2 commits
  6. 18 Sep, 2006 2 commits
  7. 15 Sep, 2006 2 commits
  8. 14 Sep, 2006 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt · 76c48d43
      unknown authored
      into  moonbone.local:/work/21677-bug-4.1-opt-mysql
      
      
      76c48d43
    • unknown's avatar
      type_date.test, type_date.result: · cca7be1c
      unknown authored
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
      
      
      mysql-test/t/type_date.test:
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
      mysql-test/r/type_date.result:
        Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
      cca7be1c
  9. 13 Sep, 2006 2 commits
    • unknown's avatar
      Merge polly.local:/tmp/20924/bug20294/my41-bug20294 · 5d7cdfb3
      unknown authored
      into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      5d7cdfb3
    • unknown's avatar
      Cset exclude: kaa@polly.local|ChangeSet|20060912122540|09861 · 418ae41b
      unknown authored
      Cset exclude: kaa@polly.local|ChangeSet|20060908100829|09983
      
      
      sql/item_cmpfunc.cc:
        Exclude
      sql/item_cmpfunc.h:
        Exclude
      sql/item_func.cc:
        Exclude
      sql/item_func.h:
        Exclude
      sql/log_event.cc:
        Exclude
      sql/sql_class.h:
        Exclude
      mysql-test/r/case.result:
        Exclude
      mysql-test/r/func_if.result:
        Exclude
      mysql-test/r/func_test.result:
        Exclude
      mysql-test/r/user_var.result:
        Exclude
      mysql-test/t/case.test:
        Exclude
      mysql-test/t/func_if.test:
        Exclude
      mysql-test/t/func_test.test:
        Exclude
      mysql-test/t/user_var.test:
        Exclude
      418ae41b
  10. 12 Sep, 2006 3 commits
    • unknown's avatar
      Merge polly.local:/tmp/20924/bug20294/my41-bug20294 · b479dcd1
      unknown authored
      into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      b479dcd1
    • unknown's avatar
      item_cmpfunc.cc: · f3e83870
      unknown authored
        Removed changes to the Item_func_between::fix_length_and_dec() made in the fix for bug#16377
      query_cache.result:
        Corrected a test case after removing a fix for bug#16377
      
      
      mysql-test/r/query_cache.result:
        Corrected a test case after removing a fix for bug#16377
      sql/item_cmpfunc.cc:
        Removed changes to the Item_func_between::fix_length_and_dec() made in the fix for bug#16377
      f3e83870
    • unknown's avatar
      Post-review fixes for bug #20924 · 5aa6e861
      unknown authored
      
      mysql-test/r/case.result:
        Post-review fix for bug #20924
      mysql-test/r/func_if.result:
        Post-review fix for bug #20924
      mysql-test/r/func_test.result:
        Post-review fix for bug #20924
      mysql-test/r/user_var.result:
        Post-review fix for bug #20924
      mysql-test/t/case.test:
        Post-review fix for bug #20924
      mysql-test/t/func_if.test:
        Post-review fix for bug #20924
      mysql-test/t/func_test.test:
        Post-review fix for bug #20924
      mysql-test/t/user_var.test:
        Post-review fix for bug #20924
      sql/item_func.cc:
        Post-review fix for bug #20924
      sql/item_func.h:
        Post-review fix for bug #20924
      sql/log_event.cc:
        Post-review fix for bug #20924
      5aa6e861
  11. 11 Sep, 2006 1 commit
    • unknown's avatar
      BUG#16282 · a5a48382
      unknown authored
      Build gcc.o as a small library, instead of passing .cpp sources to the
      linker command (causes problems with parallel make on Solaris).
      
      This fix is for 4.1. In 5.0 and up a different fix is used.
      
      
      ndb/config/common.mk.am:
        Build gcc.o as a small library, instead of passing .cpp sources to the
        linker command (causes problems with parallel make on Solaris).
      ndb/config/type_ndbapitools.mk.am:
        Build gcc.o as a small library, instead of passing .cpp sources to the
        linker command (causes problems with parallel make on Solaris).
      ndb/src/common/portlib/Makefile.am:
        Build gcc.o as a small library, instead of passing .cpp sources to the
        linker command (causes problems with parallel make on Solaris).
      ndb/src/kernel/Makefile.am:
        Build gcc.o as a small library, instead of passing .cpp sources to the
        linker command (causes problems with parallel make on Solaris).
      a5a48382
  12. 08 Sep, 2006 2 commits
    • unknown's avatar
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions · f64483cb
      unknown authored
      - Honor unsigned_flag in the corresponding functions
      - Use compare_int_signed_unsigned()/compare_int_unsigned_signed() instead of explicit comparison in GREATEST() and LEAST()
      
      
      mysql-test/r/case.result:
        Added test case for bug #20924
      mysql-test/r/func_if.result:
        Added test case for bug #20924
      mysql-test/r/func_test.result:
        Added test case for bug #20924
      mysql-test/r/user_var.result:
        Added test case for bug #20924
      mysql-test/t/case.test:
        Added test case for bug #20924
      mysql-test/t/func_if.test:
        Added test case for bug #20924
      mysql-test/t/func_test.test:
        Added test case for bug #20924
      mysql-test/t/user_var.test:
        Added test case for bug #20924
      sql/item_cmpfunc.cc:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max
        - Fixed IFNULL(), IF(), CASE() and COALESCE()
      sql/item_cmpfunc.h:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max
      sql/item_func.cc:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        Fixed LEAST(), GREATEST() and "SET @A=..." parts
      sql/item_func.h:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        Fixed "SET @A=..." part
      sql/sql_class.h:
        Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
        
        Fixed "SET @A=..." part
      f64483cb
    • unknown's avatar
      Bug#21555: incorrect behavior with INSERT ... ON DUPL KEY UPDATE and VALUES · 54caf667
      unknown authored
       VALUES() was considered a constant. This caused replacing 
       (or pre-calculating) it using uninitialized values before the actual
       execution takes place.
       Mark it as a non-constant (still not dependent of tables) to prevent
       the pre-calculation.
      
      
      mysql-test/r/insert_update.result:
        Bug#21555: incorrect behavior with INSERT ... ON DUPL KEY UPDATE and VALUES
         - test case.
         - EXPLAIN output changed due to VALUES() not being considered a constant 
           anymore
      mysql-test/t/insert_update.test:
        Bug#21555: incorrect behavior with INSERT ... ON DUPL KEY UPDATE and VALUES
         - test case.
      sql/item.h:
        Bug#21555: incorrect behavior with INSERT ... ON DUPL KEY UPDATE and VALUES
         - mark Item_insert_value as non-constant to prevent early calculation.
      54caf667
  13. 07 Sep, 2006 1 commit
    • unknown's avatar
      query_cache.result, func_time.test, type_date.result, func_time.result: · aa840645
      unknown authored
        Corrected test case after removal of fix for bug#16377         
      type_date.test:
        Corrected test case after removal of fix for bug#16377
      item_cmpfunc.cc:
        Removed changes to the agg_cmp_type() made in the for bug#16377
      
      
      mysql-test/t/type_date.test:
        Corrected test case after removal of fix for bug#16377
      mysql-test/t/func_time.test:
        Corrected test case after removal of fix for bug#16377
      mysql-test/r/type_date.result:
        Corrected test case after removal of fix for bug#16377
      mysql-test/r/query_cache.result:
        Corrected test case after removal of fix for bug#16377
      mysql-test/r/func_time.result:
        Corrected test case after removal of fix for bug#16377
      sql/item_cmpfunc.cc:
        Removed changes to the agg_cmp_type() made in the for bug#16377
      aa840645
  14. 06 Sep, 2006 4 commits
  15. 05 Sep, 2006 3 commits
  16. 04 Sep, 2006 6 commits
    • unknown's avatar
      Bug #21392: multi-table delete with alias table name fails with · 1431966d
      unknown authored
                  1003: Incorrect table name
      in multi-table DELETE the set of tables to delete from actually 
      references then tables in the other list, e.g:
      DELETE alias_of_t1 FROM t1 alias_of_t1 WHERE ....
      is a valid statement.
      So we must turn off table name syntactical validity check for alias_of_t1 
      because it's not a table name (even if it looks like one).
      In order to do that we add a special flag (TL_OPTION_ALIAS) to 
      disable the name checking for the aliases in multi-table DELETE.
      
      
      mysql-test/r/delete.result:
        Bug #21392: multi-table delete with alias table name fails with
                    1003: Incorrect table name
         - test case
      mysql-test/t/delete.test:
        Bug #21392: multi-table delete with alias table name fails with
                    1003: Incorrect table name
         - test case
      sql/mysql_priv.h:
        Bug #21392: multi-table delete with alias table name fails with
                    1003: Incorrect table name
         - add a special flag to disable the name checking for the aliases
           in multi-table DELETE
      sql/sql_parse.cc:
        Bug #21392: multi-table delete with alias table name fails with
                    1003: Incorrect table name
         - add a special flag to disable the name checking for the aliases
           in multi-table DELETE
      sql/sql_yacc.yy:
        Bug #21392: multi-table delete with alias table name fails with
                    1003: Incorrect table name
         - add a special flag to disable the name checking for the aliases
           in multi-table DELETE
      1431966d
    • unknown's avatar
      BUG#21787: COUNT(*) + ORDER BY + LIMIT returns wrong result · 10395408
      unknown authored
      Fix an error in the bug fix.
      
      
      sql/sql_select.cc:
        Use a local variable to iterate over group items, since
        'group' is used later in a condition.
      10395408
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · 19dc0e41
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
      
      
      sql/log.cc:
        Auto merged
      19dc0e41
    • unknown's avatar
      bug#21965 - replication · d2d605e4
      unknown authored
        fix deadlock if master switches log file in parallell with "show master logs"
        
      
      
      sql/log.cc:
        add raw_get_current_log which dont take log mutex
      sql/sql_class.h:
        add raw_get_current_log which dont take log mutex
      sql/sql_repl.cc:
        Fix lock order i.e first log_lock then index_lock
      d2d605e4
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · 43eeeac0
      unknown authored
      into  salvation.intern.azundris.com:/home/tnurnberg/21913/my41-21913
      
      
      mysql-test/r/func_time.result:
        manual merge
      mysql-test/t/func_time.test:
        manual merge
      43eeeac0
    • unknown's avatar
      Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver. · 52f3977e
      unknown authored
      Variable character_set_results can legally be NULL (for "no conversion.")
      This could result in a NULL deref that crashed the server.  Fixed.
      
      (Although ran some additional precursory tests to see whether I could break
      anything else, but no breakage so far.)
      
      
      mysql-test/r/func_time.result:
        Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
        
        Prove DATE_FORMAT() no longer crashes the server when character_set_results is
        NULL (which is a legal value and means, "no conversion").
      mysql-test/t/func_time.test:
        Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
        
        Prove DATE_FORMAT() no longer crashes the server when character_set_results is
        NULL (which is a legal value and means, "no conversion").
      sql/sql_string.cc:
        Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
        
        Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
        because it is magic for, "no conversion."
      52f3977e
  17. 01 Sep, 2006 2 commits
    • unknown's avatar
      Merge lamia.home:/home/timka/mysql/src/4.1-virgin · b133be17
      unknown authored
      into  lamia.home:/home/timka/mysql/src/4.1-bug-21787
      
      
      sql/sql_select.cc:
        Auto merged
      b133be17
    • unknown's avatar
      Fix for BUG#21787: COUNT(*) + ORDER BY + LIMIT returns wrong result · b017caef
      unknown authored
        
      The problem was due to a prior fix for BUG 9676, which limited
      the rows stored in a temporary table to the LIMIT clause. This
      optimization is not applicable to non-group queries with aggregate
      functions. The fix disables the optimization in this case.
      
      
      mysql-test/r/limit.result:
        Test case for BUG#21787
      mysql-test/t/limit.test:
        Test case for BUG#21787
      sql/sql_select.cc:
        If there is an aggregate function in a non-group query,
        materialize all rows in the temporary table no matter if
        there is a LIMIT clause. This is necessary, since the
        aggregate functions must be computed over all result rows,
        not just the first LIMIT rows.
      b017caef