1. 13 Jan, 2009 1 commit
  2. 12 Jan, 2009 5 commits
    • Patrick Crews's avatar
      Bug#41888: Test binlog.binlog_database causing binlog_innodb to fail on Pushbuild. · 3b80d15e
      Patrick Crews authored
      Added cleanup of status variables to the end of binlog_database.
      Re-recorded .result file to account for cleanup statement.
      NOTE:  binlog.binlog_innodb also has had an FLUSH STATUS; statement added to it as well, but
      adding this cleanup as a preventative measure.
      3b80d15e
    • Georgi Kodinov's avatar
      Fixed a warning in sql_profile.cc · bae9df80
      Georgi Kodinov authored
      bae9df80
    • Georgi Kodinov's avatar
      merged 41453 to 5.1-bugteam · 48a4d54e
      Georgi Kodinov authored
      48a4d54e
    • Davi Arnaut's avatar
      Post-merge fix for bug 37016: Update test case for row-based logging. · 3c60cf19
      Davi Arnaut authored
      mysql-test/r/commit_1innodb.result:
        Increase commit count for row-based logging.
      3c60cf19
    • Tatiana A. Nurnberg's avatar
      Bug#31177: Server variables can't be set to their current values · 7a3c3619
      Tatiana A. Nurnberg authored
      Bounds-checks and blocksize corrections were applied to user-input,
      but constants in the server were trusted implicitly. If these values
      did not actually meet the requirements, the user could not set change
      a variable, then set it back to the (wonky) factory default or maximum
      by explicitly specifying it (SET <var>=<value> vs SET <var>=DEFAULT).
      
      Now checks also apply to the server's presets. Wonky values and maxima
      get corrected at startup. Consequently all non-offsetted values the user
      sees are valid, and users can set the variable to that exact value if
      they so desire.
      
      mysql-test/r/read_buffer_size_basic.result:
        test sets out of bounds value; we now throw a warning for this.
        This is a side-effect: before, the maximum was higher than the
        value we set here. The value was corrected to block-size, the
        maximum was not, hence the value was smaller than the maximum
        in this particular case. Now that we align the maxima at startup,
        the value in SET is larger than the (corrected) maximum, and we
        see a warning in this particular case. "This means we're doing it right."
      mysql-test/r/read_rnd_buffer_size_basic.result:
        test sets out of bounds value; we now throw a warning for this.
        This is a side-effect: before, the maximum was higher than the
        value we set here. The value was corrected to block-size, the
        maximum was not, hence the value was smaller than the maximum
        in this particular case. Now that we align the maxima at startup,
        the value in SET is larger than the (corrected) maximum, and we
        see a warning in this particular case. "This means we're doing it right."
      mysys/my_getopt.c:
        Do bounds-checking at start-up time so we'll catch and correct
        wonky default values and upper limits.
      sql/mysqld.cc:
        If 0 is a legal value per the docs, not to mention the default, we shouldn't give 1 as
        the lower limit.
      storage/innobase/handler/ha_innodb.cc:
        We are setting upper bounds here.
        ~0L gives -1. That is NOT what we want!
      7a3c3619
  3. 09 Jan, 2009 17 commits
    • Tatiana A. Nurnberg's avatar
      auto-merge · 5b395e44
      Tatiana A. Nurnberg authored
      5b395e44
    • Georgi Kodinov's avatar
      merged 5.0-bugteam -> 5.1-bugteam · 12825634
      Georgi Kodinov authored
      12825634
    • Georgi Kodinov's avatar
      fixed a compile warning · 4d497431
      Georgi Kodinov authored
      4d497431
    • Georgi Kodinov's avatar
      merged 41437 to 5.1-bugteam · 3107858e
      Georgi Kodinov authored
      3107858e
    • Tatiana A. Nurnberg's avatar
      auto-merge · 4a865f18
      Tatiana A. Nurnberg authored
      4a865f18
    • Georgi Kodinov's avatar
      merged 41437 to 5.0-bugteam · a57477f4
      Georgi Kodinov authored
      a57477f4
    • Tatiana A. Nurnberg's avatar
      auto-merge · 093ad36c
      Tatiana A. Nurnberg authored
      093ad36c
    • Mattias Jonsson's avatar
      merge · 17d31586
      Mattias Jonsson authored
      17d31586
    • Mattias Jonsson's avatar
      Bug#40972: Partition pruning can lead to crash for bad dates · e6342c30
      Mattias Jonsson authored
      post push fix, added test found a valgrind warning
      
      sql/sql_partition.cc:
        Bug#40972: Partition pruning can lead to crash for bad dates
        
        Fix for valgrind warning
      e6342c30
    • Sven Sandberg's avatar
      BUG#41924: high-level replication functions are not commented · 860519a6
      Sven Sandberg authored
      Adding comments to some of the high-level functions in replication.
      
      sql/log_event.h:
        Fixed some mistakes in comments.
      sql/repl_failsafe.cc:
        Added comment for show_slave_hosts()
      sql/slave.cc:
        Added comment for show_master_info(), handle_slave_[sql|io](), and next_event()
      sql/sql_binlog.cc:
        Added @param comment.
      sql/sql_lex.h:
        Added comment for st_lex_master_info.
      sql/sql_repl.cc:
        Added comments for functions executing a statement:
            PURGE BINARY LOGS
            START SLAVE
            STOP SLAVE
            RESET SLAVE
            CHANGE MASTER
            RESET MASTER
            SHOW BINLOG EVENTS
            SHOW MASTER STATUS
            SHOW BINARY LOGS
      860519a6
    • Georgi Kodinov's avatar
      Bug #41543: Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno · 79765ac0
      Georgi Kodinov authored
      No need to mask the error code returned by getting the next row to end of file when
      doing filesort.
      
      mysql-test/r/innodb_mysql_rbk.result:
        Bug #41543: test case
      mysql-test/t/innodb_mysql_rbk-master.opt:
        Bug #41543: test case
      mysql-test/t/innodb_mysql_rbk.test:
        Bug #41543: test case
      sql/filesort.cc:
        Bug #41543: No need to mask the error code returned by getting the next row to end of file when
        doing filesort.
      79765ac0
    • Georgi Kodinov's avatar
      Bug #41437: Value stored in 'case' lacks charset, causes segfault · 20195aa2
      Georgi Kodinov authored
      When substituting system constant functions with a constant result
      the server was not expecting that the function may return NULL.
      Fixed by checking for NULL and returning Item_null (in the relevant
      collation) if the result of the system constant function was NULL.
      
      mysql-test/r/mysql.result:
        Bug #41437: test case
      mysql-test/t/mysql.test:
        Bug #41437: test case.
        Relies on database() returning NULL if no database is
        selected.
      sql/item_strfunc.cc:
        Bug #41437: Check for NULL result on evaluating the system
        constant function and return a constant NULL item.
      20195aa2
    • Sven Sandberg's avatar
    • Sven Sandberg's avatar
    • Davi Arnaut's avatar
      Bug#37016: TRUNCATE TABLE removes some rows but not all · 87f368eb
      Davi Arnaut authored
      The special TRUNCATE TABLE (DDL) transaction wasn't being properly
      rolled back if a error occurred during row by row deletion. The
      error can be caused by a foreign key restriction imposed by InnoDB
      SE and would cause the server to erroneously issue a implicit
      commit.
      
      The solution is to rollback the transaction if a truncation via row
      by row deletion fails, otherwise commit. All effects of a TRUNCATE 
      ABLE operation are rolled back if a row by row deletion fails.
      
      mysql-test/include/commit.inc:
        Truncate always starts a transaction and commits at the end.
        The commit at the end increases the count by two, one is the
        storage engine commit and the other is the binary log.
      mysql-test/r/commit_1innodb.result:
        Update test case results.
      mysql-test/r/innodb_mysql.result:
        Update test case results.
      mysql-test/t/innodb_mysql.test:
        Add test case for Bug#37016
      sql/sql_delete.cc:
        Move truncation using row by row deletion to its own function.
        If row by row deletion fails, rollback the transaction.
        
        Remove the meddling with disabling and enabling of autocommit
        as TRUNCATE transaction is now explicitly ended (committed
        or rolled back).
      87f368eb
    • Sven Sandberg's avatar
      BUG#41961: Some log_event types do not skip post-header when reading · 2d3a1a63
      Sven Sandberg authored
      Problem: when the server reads a log_event from file, it should read
      the post-header lengths from the format_description_log_event. Some
      event types which currently have post-header length 0 did not do this,
      and instead had a hard-coded zero length for the post-header. That
      means the current server version will not be able to read future
      versions of these events.
      Fix: make the reader functions read the post-header.
      
      
      sql/log_event.cc:
         - Made Format_description_log_event constructor initialize all
           post-header lengths explicitly, to make it easier to find them
           in the source code.
         - After this, it is no longer necessary to pass the MY_ZEROFILL
           flag to my_malloc. I removed the flag and added a sanity-check
           that will be executed only in debug-mode.
         - Made INTVAR, RAND, USER_VAR, and XID events skip post_header_len
           when reading from file.
      sql/log_event.h:
        Added explicit defines for the lengths of all event types.
      2d3a1a63
    • Horst Hunger's avatar
      due to merge. · 38704f69
      Horst Hunger authored
      38704f69
  4. 08 Jan, 2009 7 commits
    • Davi Arnaut's avatar
      Auto-merge from upstream 5.1-bugteam · 46a6b52b
      Davi Arnaut authored
      46a6b52b
    • Horst Hunger's avatar
      6f63a282
    • Davi Arnaut's avatar
      Bug#41889: Test main.innodb_bug38231 is failing w/embedded server (server crash) · c23629f8
      Davi Arnaut authored
      The problem is that a mysql connection instance is not thread-safe
      and reentrant, meaning that it can't be used concurrently and can't
      be re-entered while it's already running. This applies for any form
      of the server (embedded or not), but this rule can be violated in a
      test case if the test sends a new command without waiting for the
      result of previous command that was sent asynchronously and this can
      lead to hangs when over a network or to crashes under embedded server
      as the server query execution path will be re-entered concurrently
      with the same connection structure.
      
      The solution is to rework the test case so that the aforementioned
      rule is obeyed.
      
      mysql-test/t/innodb_bug38231.test:
        Remove con3 as it is not necessary to reproduce the test case
        and might cause problems as there is no guarantee on which
        LOCK TABLE request will succeed first. Also, wait for statement
        result before sending a new one on the same connection.
      c23629f8
    • Mattias Jonsson's avatar
      merge · b8d2461e
      Mattias Jonsson authored
      b8d2461e
    • Tatiana A. Nurnberg's avatar
      Bug#41470: DATE_FORMAT() crashes the complete server with a valid date · 1dee1dd4
      Tatiana A. Nurnberg authored
      Passing dubious "year zero" in non-zero date (not "0000-00-00") could
      lead to negative value for year internally, while variable was unsigned.
      This led to Really Bad Things further down the line.
      
      Now doing calculations with signed type for year internally.
      
      mysql-test/r/date_formats.result:
        show that very early dates no longer break DATE_FORMAT(..., '%W')
      mysql-test/t/date_formats.test:
        show that very early dates no longer break DATE_FORMAT(..., '%W')
      sql-common/my_time.c:
        Allow negative years numbers internally while keeping the interface.
        otherwise if somebody passes year zero for whatever reason, we'll
        get an integer wrap-around that can lead to Really Bad Things further
        down the line. Note that amusingly, calcday_nr() already had signed
        output and calc_weekday() already had signed input, anyway.
      1dee1dd4
    • Timothy Smith's avatar
      Auto-merge from upstream 5.1-bugteam · 975b8085
      Timothy Smith authored
      975b8085
    • Timothy Smith's avatar
      Fix a few problems after latest bunch of InnoDB snapshot changes: · 53464956
      Timothy Smith authored
      The binlog_innodb test was sensitive to what tests ran before it.  Now run
      FLUSH STATUS before performing operations that need to be checked.
      
      sys_var_thd_ulong::update() was improperly casting an option value from
      ulonglong to ulong before comparing it to the max allowed value.  On systems
      where ulong and ulonglong are of different size, this caused values greater
      than ULONG_MAX to wrap around (not be truncated to ULONG_MAX, which appears to
      have been the intention of the original coder), and caused some checks to work
      incorrectly.  This wasn't generally visible to the user, because later checks
      would prevent the wrapped-around value from being used.  But it caused warning
      messages to differ between 32- and 64-bit platforms.  Fix is to just remove the
      cast.  Also added a DBUG_ASSERT to ensure that the value really is capped
      properly before finally stuffing it into the ulong.
      53464956
  5. 07 Jan, 2009 6 commits
    • Mattias Jonsson's avatar
      merge · 682c4d07
      Mattias Jonsson authored
      682c4d07
    • Mattias Jonsson's avatar
      merge · 866d10a4
      Mattias Jonsson authored
      866d10a4
    • Patrick Crews's avatar
      merge · a9887074
      Patrick Crews authored
      a9887074
    • Patrick Crews's avatar
      merge · 4b836727
      Patrick Crews authored
      4b836727
    • Vladislav Vaintroub's avatar
      fix misspelling · 4f76ed9b
      Vladislav Vaintroub authored
      4f76ed9b
    • Davi Arnaut's avatar
      Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites · 1b333f64
      Davi Arnaut authored
                 locking type of temp table
      
      The problem is that INSERT INTO .. SELECT FROM .. and CREATE
      TABLE .. SELECT FROM a temporary table could inadvertently
      overwrite the locking type of the temporary table. The lock
      type of temporary tables should be a write lock by default.
      
      The solution is to reset the lock type of temporary tables
      back to its default value after they are used in a statement.
      
      mysql-test/r/innodb_mysql.result:
        Add test case result for Bug#41348
      mysql-test/r/temp_table.result:
        Add test case result for Bug#41348
      mysql-test/t/innodb_mysql.test:
        Add test case for Bug#41348
      mysql-test/t/temp_table.test:
        Add test case for Bug#41348
      sql/sql_base.cc:
        Allow the lock type of temp tables to be overwritten now that
        the the value is being restored once the table is marked as
        free for re-use. This makes the behavior consistent with that
        of non-temporary tables and avoids confusion.
      1b333f64
  6. 05 Jan, 2009 4 commits