1. 01 Nov, 2006 1 commit
    • unknown's avatar
      Fix Bug #9191 "TIMESTAMP/from_unixtime() no longer accepts 2^31-1" · 8a7bc052
      unknown authored
      (4.1 version, with post-review fixes)
        
        The fix for another Bug (6439) limited FROM_UNIXTIME() to
        TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT,
        however unix timestamp in general is not considered to be limited 
        by this value. All dates up to power(2,31)-1 are valid.
        
        This patch extends allowed TIMESTAMP range so, that max
        TIMESTAMP value is power(2,31)-1. It also corrects
        FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that
        max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME()
        is fixed accordingly to allow conversion of dates up to
        2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ()
        function to allow extended range of dates.
        
        The main problem solved in the patch is possible overflows
        of variables, used in broken-time representation to time_t
        conversion (required for UNIX_TIMESTAMP).
      
      
      acinclude.m4:
        Add new macro to check time_t range
      configure.in:
        Call the macro to check time_t range
      include/my_time.h:
        Move time-related defines to proper place.
        Add a function to perform a rough check if
        a TIMESTAMP value fits into the boundaries.
        Note: it is defined as "static inline", as
        otherwise libmysql won't compile (due to the
        way how gcc handles "inline" directive).
      mysql-test/r/func_time.result:
        Update test result
      mysql-test/r/timezone.result:
        Update test result
      mysql-test/r/timezone2.result:
        Update test result
      mysql-test/t/func_time.test:
        Add test for Bug#9191 and update test to be consistent
        with new TIMESTAMP boundaries
      mysql-test/t/timezone.test:
        Update old tests to be consistent
        with new TIMESTAMP boundaries
      mysql-test/t/timezone2.test:
        Update tests for convert_tz to be consistent with new
        TIMESTAMP boundaries
      sql/item_timefunc.cc:
        Fix convert_tz to allow dates from the new (extended)
        TIMESTAMP range
      sql/mysql_priv.h:
        Move time handling defaults to my_time.h
      sql-common/my_time.c:
        Because of increased TIMESTAMP_MAX_VALUE overflows in my_system_gmt_sec()
        became possible. Here we make it safe against the overflows by stepping
        back from the boundary dates which are likely to trigger them.
      sql/time.cc:
        Update TIME_to_timestamp to allow conversion of
        extended date range
      sql/tztime.cc:
        Fix new (4.1) implementation of broken-down time representation
        to time_t conversion routine to avoid overflows during conversion
        of boundary dates
      mysql-test/r/timezone4.result:
        New BitKeeper file ``mysql-test/r/timezone4.result''
      mysql-test/t/timezone4-master.opt:
        New BitKeeper file ``mysql-test/t/timezone4-master.opt''
      mysql-test/t/timezone4.test:
        New BitKeeper file ``mysql-test/t/timezone4.test''
      8a7bc052
  2. 28 Sep, 2006 2 commits
    • unknown's avatar
      Fix for bug#22338 "Valgrind warning: uninitialized variable in · 5d46e299
      unknown authored
      create_tmp_table()".
      
      The fix for bug 21787 "COUNT(*) + ORDER BY + LIMIT returns wrong
      result" introduced valgrind warnings which occured during execution
      of information_schema.test and sp-prelocking.test in version 5.0.
      There were no user visible effects.
      
      The latter fix made create_tmp_table() dependant on
      THD::lex::current_select value. Valgrind warnings occured when this
      function was executed and THD::lex::current_select member pointed
      to uninitialized SELECT_LEX instance.
      
      This fix tries to remove this dependancy by moving some logic
      outside of create_tmp_table() function.
      
      
      sql/sql_select.cc:
        create_tmp_table():
          Moved code which is responsible for determining if optimization
          which pushes down LIMIT clause to temporary table creation is
          applicable out of this function.
          Such move made this function independant of THD::lex::current_select
          value and removed valgrind warnings which occured in cases when this
          member pointed to uninitialized SELECT_LEX object (particularly these
          warnings occured in sp-prelocking.test and information_schema.test
          in 5.0). This seems like a better solution than trying to force this
          pointer always to point to relevant select because:
          - In some cases when we use create_tmp_table() there are no relevant
            SELECT_LEX object (we use it just to create temporary table/object).
          - There is only one place in code where we call this funciton and
            where this optimization can be enabled. And in this place we
            already have some logic which tries to determine if it is applicable.
      5d46e299
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 4bbca0b6
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-4.1-runtime
      
      
      4bbca0b6
  3. 27 Sep, 2006 1 commit
  4. 24 Sep, 2006 1 commit
    • unknown's avatar
      mysql_config.sh: · 103fc806
      unknown authored
        Filter out plain -O and Sun C/C++ style optimization flags, -xO<level>
        Filter out icc specific options from cflags/libs(_r)
      
      
      scripts/mysql_config.sh:
        Filter out plain -O and Sun C/C++ style optimization flags, -xO<level>
      103fc806
  5. 23 Sep, 2006 2 commits
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1 · 1e84e31c
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
      
      
      BitKeeper/etc/ignore:
        auto-union
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/myisam.test:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      1e84e31c
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl · 14ad51e0
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
      
      
      BitKeeper/etc/ignore:
        auto-union
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/myisam.test:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      14ad51e0
  6. 21 Sep, 2006 2 commits
  7. 20 Sep, 2006 2 commits
  8. 19 Sep, 2006 1 commit
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-4.0 · 82a72ee1
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-bug14400-monty
      
      
      BitKeeper/etc/ignore:
        auto-union
      include/my_global.h:
        Auto merged
      myisam/mi_rkey.c:
        Manual null merge as a better fix is already present.
      mysql-test/r/myisam.result:
        Manual null merge as a better fix is already present.
      mysql-test/t/myisam.test:
        Manual null merge as a better fix is already present.
      sql/sql_select.cc:
        Manual merge of purify improvements.
      82a72ee1
  9. 18 Sep, 2006 2 commits
  10. 15 Sep, 2006 3 commits
  11. 14 Sep, 2006 4 commits
  12. 12 Sep, 2006 2 commits
    • 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
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines · 562763f1
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-bug14400
      
      
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/myisam.test:
        Auto merged
      myisam/mi_rkey.c:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Manual merge
      562763f1
  13. 11 Sep, 2006 1 commit
  14. 08 Sep, 2006 1 commit
    • 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
  15. 07 Sep, 2006 3 commits
    • 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
    • unknown's avatar
      Merge chilla.local:/home/mydev/mysql-4.0-bug14400 · 203d0999
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-bug14400
      
      
      myisam/mi_rkey.c:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Manual merge from 4.0
      mysql-test/r/myisam.result:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Manual merge from 4.0
      mysql-test/t/myisam.test:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Manual merge from 4.0
      203d0999
    • unknown's avatar
      Bug#14400 - Query joins wrong rows from table which is subject of · 71314617
      unknown authored
                  "concurrent insert"
      Additional fix for full keys and test case.
      
      
      myisam/mi_rkey.c:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Additional fix for full keys.
      mysql-test/r/myisam.result:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Additional results.
      mysql-test/t/myisam.test:
        Bug#14400 - Query joins wrong rows from table which is subject of
                    "concurrent insert"
        Additional test case.
      71314617
  16. 05 Sep, 2006 3 commits
  17. 04 Sep, 2006 4 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
  18. 01 Sep, 2006 5 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
    • unknown's avatar
      Backport from 5.0 · 49e2267e
      unknown authored
       - Dont test "encrypt" in ctype_ucs
      
      
      mysql-test/r/ctype_ucs.result:
        Don't test "encrypt" function in ctype_ucs.test
      mysql-test/t/ctype_ucs.test:
        Don't test "encrypt" function in ctype_ucs.test
      49e2267e
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1 · beb24fbd
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
      
      
      beb24fbd
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-4.1-maint · 6453d413
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
      
      
      6453d413