1. 09 Jul, 2006 5 commits
    • unknown's avatar
      fixes in test results (using # for positions in SHOW BINLOG EVENTS). · f94e8d78
      unknown authored
      
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
        As in other tests, we should replace both position columns of SHOW BINLOG
        EVENTS; otherwise a small change (like here, the fact that CREATE TEMPORARY
        TABLE is not binlogged in RBR as a consequence of the bugfix for BUG#20522)
        causes a large diff in the result file.
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        result update: positions in SHOW BINLOG EVENTS become #, and
        the CREATE TEMPORARY TABLE disappear from binlog (consequence of fix for
        BUG#20522 "RBR: CREATE TEMPORARY TABLE SELECT writes to binlog though
        unneeded").
      f94e8d78
    • unknown's avatar
      post-merge fixes · 15c321f6
      unknown authored
      
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        result update.
        I noticed the appearance of an additional table_map+rows in the binlog
        when INSERT DELAYED, since I pulled the latest fixes to RBR of 
        INSERT DELAYED. This is ok, I put the reason why into sql_insert.cc.
      sql/sql_insert.cc:
        A comment about the new row-based binlogging of INSERT DELAYED.
        Removing duplicate MY_HOOKS (from a wrong merge of the past??).
      15c321f6
    • unknown's avatar
      Merge gbichot3.local:/home/mysql_src/mysql-5.1-new-WL3146-handler · 9fe33acb
      unknown authored
      into  gbichot3.local:/home/mysql_src/mysql-5.1
      
      
      sql/sql_insert.cc:
        Auto merged
      9fe33acb
    • unknown's avatar
      Manual merge of test from 5.0 (needs to be manual because the test files · 94201860
      unknown authored
      were copied/split between 5.0 and 5.1).
      
      
      mysql-test/extra/rpl_tests/rpl_auto_increment.test:
        manual merge of test from 5.0
      mysql-test/extra/rpl_tests/rpl_insert_id.test:
        manuel merge of test from 5.0
      mysql-test/r/rpl_auto_increment.result:
        error messages changed compared to 5.0
      94201860
    • unknown's avatar
      Merge gbichot3.local:/home/mysql_src/mysql-5.0 · f85f9ac2
      unknown authored
      into  gbichot3.local:/home/mysql_src/mysql-5.1
      
      
      mysql-test/r/rpl_auto_increment.result:
        Auto merged
      mysql-test/r/rpl_insert_id.result:
        Auto merged
      mysql-test/t/rpl_openssl.test:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      mysql-test/t/rpl_auto_increment.test:
        will fix by hand
      mysql-test/t/rpl_insert_id.test:
        will fix by hand
      sql/handler.cc:
        comment
      sql/handler.h:
        manual merge
      sql/sql_insert.cc:
        manual merge
      f85f9ac2
  2. 08 Jul, 2006 1 commit
    • unknown's avatar
      BUG#20821 (INSERT DELAYED failes to write some rows to binlog): · a92e1c4a
      unknown authored
      Fixing typo and potential memory problem.
      Reducing number of concurrent mysqlslap threads since tests fail
      in pushbuild due to too many threads.
      
      
      mysql-test/r/rpl_insert.result:
        Result change.
      mysql-test/t/rpl_insert.test:
        Reducing number of threads since it doesn't pass pushbuild.
      sql/sql_insert.cc:
        Fixing typo and potential memory problem.
      a92e1c4a
  3. 07 Jul, 2006 10 commits
  4. 06 Jul, 2006 8 commits
    • unknown's avatar
      Testcase for BUG#20633 "INSERT DELAYED RAND() or @user_var does not replicate · d2dc70dc
      unknown authored
      statement-based" (bugfix was committed today):
      we verify that now it works in mixed mode. And a comment.
      
      
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        result update
      mysql-test/t/rpl_switch_stm_row_mixed.test:
        testcase for BUG#20633
      sql/sql_insert.cc:
        the #ifdef was not necessary; a comment.
      d2dc70dc
    • unknown's avatar
      Fix for BUG#20349 "mysql-test-run.pl needs to add --debug to · 94b92361
      unknown authored
      mysql_client_test like mysql-test-run". Nothing to document.
      
      
      mysql-test/mysql-test-run.pl:
        if --debug, add debugging of mysql_client_test (useful at least to know what
        insert_id values it receives in the ok packets of INSERT).
      94b92361
    • unknown's avatar
      Merge gbichot3.local:/home/mysql_src/mysql-5.1 · b5faf11a
      unknown authored
      into  gbichot3.local:/home/mysql_src/mysql-5.1-new-WL3146-handler
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/rpl_row_create_table.result:
        Auto merged
      mysql-test/t/rpl_row_create_table.test:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      b5faf11a
    • unknown's avatar
      Fix for BUG#20649 "mixed replication mode does not work with INSERT DELAYED". · 986679a2
      unknown authored
      The bug was that if the server was running in mixed binlogging mode,
      and an INSERT DELAYED used some needing-row-based components like UUID(),
      the server didn't binlog this row-based but statement-based, which
      thus failed to insert correct data on the slave.
      This changeset implements that when a delayed_insert thread is created,
      if the server's global binlog mode is "mixed", that thread will use row-based.
      This also fixes BUG#20633 "INSERT DELAYED RAND() or @user_var does not
      replicate statement-based": we don't fix it in statement-based mode (would
      require bookeeping of rand seeds and user variables used by each row),
      but at least it will now work in mixed mode (as row-based will be used).
      We re-enable rpl_switch_stm_row_mixed.test (so BUG#18590
      which was about re-enabling this test, will be closed) to test the fixes.
      Between when it was disabled and now, some good changes to row-based
      binlogging (no generation of table map events for non-changed tables)
      induce changes in the test's result file.
      
      
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        result update.
        Note that some pieces of binlog are gone, not due to my test but to changes
        to the row-based binlogging code (non-changed tables don't generate
        table map binlog events now) done while the test was disabled.
      mysql-test/t/disabled.def:
        this test works now
      mysql-test/t/rpl_switch_stm_row_mixed.test:
        testing fix to make INSERT DELAYED work in mixed mode
      sql/sql_insert.cc:
        In mixed binlogging mode, the delayed_insert system thread now always
        uses row-based binlogging.
        This makes replication of INSERT DELAYED VALUES(RAND()) or VALUES(@A)
        work in mixed mode (it does not in statement-based).
      986679a2
    • unknown's avatar
      Behaviour change of mysql-test-run.pl: · 81bb604c
      unknown authored
      by default we never run disabled tests (even if they're
      explicitely listed on the command-line). We add an option --enable-disabled
      which will run tests even though they are disabled, and will print, for each
      such test, the comment explaining why it was disabled.
      The reason for the change is when you want to run "all tests which are about
      NDB" for example: mysql-test-run.pl t/*ndb*.test used to run some disabled
      NDB tests, causing failures, causing investigations.
      Code amended and approved by Kent.
      
      
      mysql-test/lib/mtr_cases.pl:
        always detect if a test is listed as disabled, and read the comment why is is.
        If it is listed, don't run the test, except if
        --enable-disabled was given, then mark the test as to-run-even-
        though-it-is-listed-as-disabled.
      mysql-test/lib/mtr_report.pl:
        Report tests which will run though they are listed as disabled
        (does something only if --enable-disabled).
      mysql-test/mysql-test-run.pl:
        New behaviour: by default we never run disabled tests (even if they're
        explicitely listed on the command-line). We add an option --enable-disabled
        which will run tests even though they are disabled, and will print, for each
        such test, the comment explaining why it was disabled.
      81bb604c
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 9ba38382
      unknown authored
      into  gbichot3.local:/home/mysql_src/mysql-5.0
      
      
      9ba38382
    • unknown's avatar
      Merge gbichot3.local:/home/mysql_src/mysql-5.0-20524 · 90cf816f
      unknown authored
      into  gbichot3.local:/home/mysql_src/mysql-5.0
      
      
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      90cf816f
    • unknown's avatar
      Fix for BUG#20524 "auto_increment_* not observed when inserting · 8646be88
      unknown authored
      a too large value": the bug was that if MySQL generated a value for an
      auto_increment column, based on auto_increment_* variables, and this value
      was bigger than the column's max possible value, then that max possible
      value was inserted (after issuing a warning). But this didn't honour
      auto_increment_* variables (and so could cause conflicts in a master-master
      replication where one master is supposed to generated only even numbers,
      and the other only odd numbers), so now we "round down" this max possible
      value to honour auto_increment_* variables, before inserting it.
      
      
      mysql-test/r/rpl_auto_increment.result:
        result update. Before the fix, the result was that master inserted 127 in t1
        (which didn't honour auto_increment_* variables!),
        instead of failing with "duplicate key 125" like now.
      mysql-test/t/rpl_auto_increment.test:
        Test for BUG#20524 "auto_increment_* not observed when inserting
        a too large value".
        We also check the pathological case (table t2) where it's impossible to
        "round down".
        The fixer of BUG#20573 will be able to use table t2 for testing his fix.
      sql/handler.cc:
        If handler::update_auto_increment() generates a value larger than the field's
        max possible value, we used to simply insert this max possible value
        (after pushing a warning). Now we "round down" this max possible value to
        honour auto_increment_* variables (if at all possible), before trying the
        insertion.
      8646be88
  5. 05 Jul, 2006 4 commits
    • unknown's avatar
      Switching to use INSERT DELAYED, which it should be, for rpl_insert. · ae0e8aff
      unknown authored
      
      mysql-test/t/rpl_insert.test:
        Fixing to use INSERT DELAYED.
      ae0e8aff
    • unknown's avatar
      Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl · 77e82450
      unknown authored
      into  mysql.com:/home/bk/b20821-mysql-5.1-new-rpl
      
      
      sql/sql_class.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      77e82450
    • unknown's avatar
      BUG#20821 (INSERT DELAYED fails to write some rows to binlog): · 53def7bd
      unknown authored
      Reverting to old behaviour of writing the query before all rows
      have been written.
      
      
      mysql-test/r/rpl_row_delayed_ins.result:
        Result change
      sql/sql_class.cc:
        Adding debug message to binlog_query()
      sql/sql_insert.cc:
        - Changing write_delayed() to use a LEX_STRING for the query.
        - Adding query string to class delayed_row.
        - Removing query string from class delayed_insert.
        - Adding code to copy query string and delete it when the row
          is executed.
        - Logging query at first row instead of after all rows are 
          inserted (reverting to old behaviour).
        - Flushing the pending row event after all rows have been inserted.
          This is necessary since binlog_query() is called before all rows
          instead of after.
      mysql-test/r/rpl_insert.result:
        New BitKeeper file ``mysql-test/r/rpl_insert.result''
      mysql-test/t/rpl_insert.test:
        New BitKeeper file ``mysql-test/t/rpl_insert.test''
      53def7bd
    • unknown's avatar
      Fix for BUG#20188 "REPLACE or ON DUPLICATE KEY UPDATE in · 4e9d7d6c
      unknown authored
      auto_increment breaks binlog":
      if slave's table had a higher auto_increment counter than master's (even
      though all rows of the two tables were identical), then in some cases,
      REPLACE and INSERT ON DUPLICATE KEY UPDATE failed to replicate
      statement-based (it inserted different values on slave from on master).
      write_record() contained a "thd->next_insert_id=0" to force an adjustment
      of thd->next_insert_id after the update or replacement. But it is this
      assigment introduced indeterminism of the statement on the slave, thus
      the bug. For ON DUPLICATE, we replace that assignment by a call to
      handler::adjust_next_insert_id_after_explicit_value() which is deterministic
      (does not depend on slave table's autoinc counter). For REPLACE, this
      assignment can simply be removed (as REPLACE can't insert a number larger
      than thd->next_insert_id).
      We also move a too early restore_auto_increment() down to when we really know
      that we can restore the value.
      
      
      mysql-test/r/rpl_insert_id.result:
        result update, without the bugfix, slave's "3 350" were "4 350".
      mysql-test/t/rpl_insert_id.test:
        test for BUG#20188 "REPLACE or ON DUPLICATE KEY UPDATE in
        auto_increment breaks binlog".
        There is, in this order:
        - a test of the bug for the case of REPLACE
        - a test of basic ON DUPLICATE KEY UPDATE functionality which was not
        tested before
        - a test of the bug for the case of ON DUPLICATE KEY UPDATE
      sql/handler.cc:
        the adjustment of next_insert_id if inserting a big explicit value, is
        moved to a separate method to be used elsewhere.
      sql/handler.h:
        see handler.cc
      sql/sql_insert.cc:
        restore_auto_increment() means "I know I won't use this autogenerated
        autoincrement value, you are free to reuse it for next row". But we were
        calling restore_auto_increment() in the case of REPLACE: if write_row() fails
        inserting the row, we don't know that we won't use the value, as we are going to
        try again by doing internally an UPDATE of the existing row, or a DELETE
        of the existing row and then an INSERT. So I move restore_auto_increment()
        further down, when we know for sure we failed all possibilities for the row.
        Additionally, in case of REPLACE, we don't need to reset THD::next_insert_id:
        the value of thd->next_insert_id will be suitable for the next row.
        In case of ON DUPLICATE KEY UPDATE, resetting thd->next_insert_id is also
        wrong (breaks statement-based binlog), but cannot simply be removed, as
        thd->next_insert_id must be adjusted if the explicit value exceeds it.
        We now do the adjustment by calling
        handler::adjust_next_insert_id_after_explicit_value() (which, contrary to
        thd->next_insert_id=0, does not depend on the slave table's autoinc counter,
        and so is deterministic).
      4e9d7d6c
  6. 03 Jul, 2006 5 commits
  7. 01 Jul, 2006 6 commits
    • unknown's avatar
      Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1 · d4350444
      unknown authored
      into  dator5.(none):/home/pappa/bug17138
      
      
      sql/item_sum.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      d4350444
    • unknown's avatar
      Merge dator5.(none):/home/pappa/bug20583 · 60d070b2
      unknown authored
      into  dator5.(none):/home/pappa/bug17138
      
      
      mysql-test/r/partition.result:
        manual merge
      mysql-test/t/partition.test:
        manual merge
      60d070b2
    • unknown's avatar
      Merge dator5.(none):/home/pappa/clean-mysql-5.1 · 3ed74d0e
      unknown authored
      into  dator5.(none):/home/pappa/bug20583
      
      
      mysql-test/r/partition.result:
        Auto merged
      mysql-test/t/partition.test:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      3ed74d0e
    • unknown's avatar
      Merge dator5.(none):/home/pappa/clean-mysql-5.1 · a8e6d7f6
      unknown authored
      into  dator5.(none):/home/pappa/bug17138
      
      
      BUILD/compile-pentium-gcov:
        Auto merged
      sql/ha_ndbcluster.h:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      a8e6d7f6
    • unknown's avatar
      BUG#17138: Crashes in stored procedure · c92b025b
      unknown authored
      Last round of review fixes
      
      
      BUILD/compile-pentium-gcov:
        No change
      sql/ha_ndbcluster.h:
        Last round of review changes
      sql/ha_partition.h:
        Last round of review changes
      sql/handler.h:
        Last round of review changes
      sql/item_sum.cc:
        Last round of review changes
      sql/sql_acl.cc:
        Last round of review changes
      sql/sql_insert.cc:
        Last round of review changes
      sql/sql_select.cc:
        Last round of review changes
      sql/sql_table.cc:
        Last round of review changes
      sql/sql_union.cc:
        Last round of review changes
      sql/sql_update.cc:
        Last round of review changes
      c92b025b
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1 · 50a8fba8
      unknown authored
      into moonbone.local:/work/merge-5.1
      
      
      50a8fba8
  8. 30 Jun, 2006 1 commit
    • unknown's avatar
      Reverted wrong bug fix (Bug#11228) · b3523520
      unknown authored
      
      mysql-test/t/key.test:
        Added SHOW CREATE TABLE, which is the proper way to check for table definitions
      mysql-test/r/key.result:
        Fixed result after removing wrong bug fix
      sql/table.cc:
        Reverted wrong bug fix.
        The intention with the original code was to show that MySQL treats the first
        given unique key as a primary key. Clients can use the marked primary key as a
        real primary key to validate row changes in case of conflicting updates.  The
        ODBC driver (and other drivers) may also use this fact to optimize/check
        updates and handle conflicts.  The marked key also shows what some engines, like InnoDB or NDB,
        will use as it's internal primary key.
        For checking if someone has declared a true PRIMARY KEY, one should use 'SHOW CREATE TABLE'
      b3523520