1. 04 Nov, 2010 1 commit
    • Evgeny Potemkin's avatar
      Bug#57278: Crash on min/max + with date out of range. · 368ac9f0
      Evgeny Potemkin authored
      MySQL officially supports DATE values starting from 1000-01-01. This is
      enforced for int values, but not for string values, thus one
      could easily insert '0001-01-01' value. Int values are checked by
      number_to_datetime function and Item_cache_datetime::val_str uses it
      to fill MYSQL_TIME struct out of cached int value. This leads to the
      scenario where Item_cache_datetime caches a non-null datetime value and when
      it tries to convert it from int to string number_to_datetime function
      treats the value as out-of-range and returns an error and
      Item_cache_datetime::val_str returns NULL for a non-null value. Due to this
      inconsistency server crashes.
      
      Now number_to_datetime allows DATE values below 1000-01-01 if the
      TIME_FUZZY_DATE flag is set. Better NULL handling for Item_cache_datetime.
      Added the Item_cache_datetime::store function to reset str_value_cached flag
      when an item is stored.
      
      mysql-test/r/type_date.result:
        Added a test case for the bug#57278.
      mysql-test/t/type_date.test:
        Added a test case for the bug#57278.
      sql-common/my_time.c:
        Bug#57278: Crash on min/max + with date out of range.
        Now number_to_datetime allows DATE values below 1000-01-01 if the
        TIME_FUZZY_DATE flag is set.
      sql/item.cc:
        Bug#57278: Crash on min/max + with date out of range.
        Item_cache_datetime::val_str now better handles
        null_value.
      368ac9f0
  2. 26 Oct, 2010 3 commits
  3. 25 Oct, 2010 6 commits
  4. 23 Oct, 2010 2 commits
    • unknown's avatar
      Manual merge · 089ab763
      unknown authored
      089ab763
    • unknown's avatar
      Bug#27606 GRANT statement should be replicated with DEFINER information · 06c49d57
      unknown authored
      "Grantor" columns' data is lost when replicating mysql.tables_priv.
      Slave SQL thread used its default user ''@'' as the grantor of GRANT|REVOKE
      statements executing on it.
      
      In this patch, current user is put in query log event for all GRANT and REVOKE
      statement, SQL thread uses the user in query log event as grantor.
      
      
      mysql-test/suite/rpl/r/rpl_do_grant.result:
        Add test for this bug.
      mysql-test/suite/rpl/t/rpl_do_grant.test:
        Add test for this bug.
      sql/log_event.cc:
        Refactoring THD::current_user_used and related functions.
        current_user_used is used to judge if current user should be
        binlogged in query log event. So it is better to call it m_binlog_invoker.
        The related functions are renamed too.
      sql/sql_class.cc:
        Refactoring THD::current_user_used and related functions.
        current_user_used is used to judge if current user should be
        binlogged in query log event. So it is better to call it m_binlog_invoker.
        The related functions are renamed too.
      sql/sql_class.h:
        Refactoring THD::current_user_used and related functions.
        current_user_used is used to judge if current user should be
        binlogged in query log event. So it is better to call it m_binlog_invoker.
        The related functions are renamed too.
      sql/sql_parse.cc:
        Call binlog_invoker() for GRANT and REVOKE statements.
      06c49d57
  5. 22 Oct, 2010 2 commits
  6. 21 Oct, 2010 16 commits
  7. 20 Oct, 2010 10 commits