1. 26 Mar, 2009 3 commits
  2. 25 Mar, 2009 13 commits
    • Ramil Kalimullin's avatar
      Manual merge. · 7bdc4a26
      Ramil Kalimullin authored
      7bdc4a26
    • Ramil Kalimullin's avatar
      Auto-merge · 301ac2da
      Ramil Kalimullin authored
      301ac2da
    • Ramil Kalimullin's avatar
      Fix for bug#35383: binlog playback and replication breaks · 28e9aa4d
      Ramil Kalimullin authored
      due to name_const substitution
      
      Problem:
      "In general, statements executed within a stored procedure
      are written to the binary log using the same rules that
      would apply were the statements to be executed in standalone
      fashion. Some special care is taken when logging procedure
      statements because statement execution within procedures
      is not quite the same as in non-procedure context".
      
      For example, each reference to a local variable in SP's
      statements is replaced by NAME_CONST(var_name, var_value).
      Queries like
      "CREATE TABLE ... SELECT FUNC(local_var ..."
      are logged as
      "CREATE TABLE ... SELECT FUNC(NAME_CONST("local_var", var_value) ..."
      that leads to differrent field names and
      might result in "Incorrect column name" if var_value is long enough.
      
      Fix: in 5.x we'll issue a warning in such a case.
      In 6.0 we should get rid of NAME_CONST().
      
      Note: this issue and change should be described in the documentation
      ("Binary Logging of Stored Programs").
      
      
      mysql-test/r/binlog.result:
        Fix for bug#35383: binlog playback and replication breaks
        due to name_const substitution
          - test result.
      mysql-test/t/binlog.test:
        Fix for bug#35383: binlog playback and replication breaks
        due to name_const substitution
          - test case.
      sql/sp_head.cc:
        Fix for bug#35383: binlog playback and replication breaks 
        due to name_const substitution
          - set thd->query_name_consts if there's NAME_CONST()
        substitution(s).
      sql/sql_parse.cc:
        Fix for bug#35383: binlog playback and replication breaks 
        due to name_const substitution
          - issue a warning if there's NAME_CONST() substitution and
        binary logging is on for "CREATE TABLE ... SELECT ...".
      28e9aa4d
    • Tatiana A. Nurnberg's avatar
      Bug#43748: crash when non-super user tries to kill the replication threads · 461f754c
      Tatiana A. Nurnberg authored
      manual merge. also adds test specific to 5.1+
      
      mysql-test/suite/rpl/r/rpl_temporary.result:
        show that a non-privileged user trying to
        kill system-threads no longer crashes the
        server. test in 5.1+ only.
      mysql-test/suite/rpl/t/rpl_temporary.test:
        show that a non-privileged user trying to
        kill system-threads no longer crashes the
        server. test in 5.1+ only.
      sql/sql_class.cc:
        manual merge
      sql/sql_class.h:
        manual merge
      sql/sql_parse.cc:
        manual merge
      461f754c
    • Tatiana A. Nurnberg's avatar
      Bug#43748: crash when non-super user tries to kill the replication threads · eeef9467
      Tatiana A. Nurnberg authored
      Fine-tuning. Broke out comparison into method by
      suggestion of Davi. Clarified comments. Reverting
      test-case which I find too brittle; proper test
      case in 5.1+.
      eeef9467
    • Georgi Kodinov's avatar
      Bug#43748: crash when non-super user tries to kill the replication threads · 4abb1a7d
      Georgi Kodinov authored
      (Pushing for Azundris)
            
      We allow security-contexts with NULL users (for
      system-threads and for unauthenticated users).
      If a non-SUPER-user tried to KILL such a thread,
      we tried to compare the user-fields to see whether
      they owned that thread. Comparing against NULL was
      not a good idea.
            
      If KILLer does not have SUPER-privilege, we
      specifically check whether both KILLer and KILLee
      have a non-NULL user before testing for string-
      equality. If either is NULL, we reject the KILL.
      
      mysql-test/r/rpl_temporary.result:
        Try to have a non-SUPER user KILL a system thread.
      mysql-test/t/rpl_temporary.test:
        Try to have a non-SUPER user KILL a system thread.
      sql/sql_parse.cc:
        Make sure security contexts of both KILLer *and*
                KILLee are non-NULL before testing for string-equality!
      4abb1a7d
    • Andrei Elkin's avatar
      Bug#42977 RBR logs for rows with more than 250 column results in corrupt binlog · 6df3b6fe
      Andrei Elkin authored
                  
      The issue happened to be two-fold.
      The table map event was recorded into binlog having
      an incorrect size when number of columns exceeded 251. 
      The Row-based event had incorrect recording and restoring m_width member within
      the same as above conditions.
      
      Fixed with correcting m_data_size and m_width.
      
      
      mysql-test/suite/rpl/r/rpl_row_wide_table.result:
        the new test results.
      mysql-test/suite/rpl/t/rpl_row_wide_table.test:
        regression test for bug#42977.
      sql/log_event.cc:
        0. all buffers that used in net_store_length() are augmented with 1 for safety
        to be able to contain the magic and the content of ulonglong as well;
        1. Rows_log_event::get_data_size() yieled incorrect size |m_width/8| whereas 
           it should be m_width;
        2. Table_map_log_event::Table_map_log_event yieled incorrect value for
           `m_data_size' probably presuming 1-byte integer max for the column number;
      sql/rpl_utility.h:
        DBUG_PRINT_BITSET() macro is left 256-cols limited but has made safe and commented.
      6df3b6fe
    • Leonard Zhou's avatar
      Merge · e9b62249
      Leonard Zhou authored
      e9b62249
    • Alexey Kopytov's avatar
    • Leonard Zhou's avatar
      Empty merge for fixing only in 5.0 · c6d1b82e
      Leonard Zhou authored
      c6d1b82e
    • Leonard Zhou's avatar
      Fix the test case error in PB. · 1aee9058
      Leonard Zhou authored
      1aee9058
    • Alexey Kopytov's avatar
      Fix for bug #43801: mysql.test takes too long, fails due to · dcc0ee7a
      Alexey Kopytov authored
                          expired timeout on debx86-b in PB
      
      Turned off general log when importing DB dump in the test 
      case for bug #41486 due to the bug in CSV engine code that 
      makes logging long SQL query too slow.
      
      mysql-test/r/mysql-bug41486.result:
        Turned off general log when importing DB dump in the test 
        case for bug #41486 due to the bug in CSV engine code that 
        makes logging long SQL query too slow.
      mysql-test/t/mysql-bug41486.test:
        Turned off general log when importing DB dump in the test 
        case for bug #41486 due to the bug in CSV engine code that 
        makes logging long SQL query too slow.
      dcc0ee7a
    • Leonard Zhou's avatar
      Fix test case erro in sles10-ia64-a. · 5afaec41
      Leonard Zhou authored
      Reset master before next test.
      
      mysql-test/suite/rpl/r/rpl_timezone.result:
        Test result.
      mysql-test/suite/rpl/t/rpl_timezone.test:
        Reset master before next test.
      5afaec41
  3. 24 Mar, 2009 15 commits
    • Alexey Kopytov's avatar
      Automerge. · a0f81507
      Alexey Kopytov authored
      a0f81507
    • Alexey Kopytov's avatar
      Automerge. · 18b0413b
      Alexey Kopytov authored
      18b0413b
    • Alexey Kopytov's avatar
      Automerge. · 7db610db
      Alexey Kopytov authored
      7db610db
    • Alexey Kopytov's avatar
      Manuel merge. · cb726fd4
      Alexey Kopytov authored
      cb726fd4
    • Alexey Kopytov's avatar
      Fix for bug #43801: mysql.test takes too long, fails due to · 808a99e9
      Alexey Kopytov authored
                          expired timeout on debx86-b in PB 
      
      Moved the resource-intensive test case for bug #41486 into 
      a separate test file to reduce execution time for mysql.test. 
      
      
      mysql-test/include/wait_until_disconnected.inc:
        Used in mysql-bug41486.test.
      mysql-test/r/mysql-bug41486.result:
        Moved the resource-intensive test case for bug #41486 into 
        a separate test file to reduce execution time for mysql.test.
      mysql-test/r/mysql.result:
        Moved the resource-intensive test case for bug #41486 into 
        a separate test file to reduce execution time for mysql.test.
      mysql-test/t/mysql-bug41486.test:
        Moved the resource-intensive test case for bug #41486 into 
        a separate test file to reduce execution time for mysql.test.
      mysql-test/t/mysql.test:
        Moved the resource-intensive test case for bug #41486 into 
        a separate test file to reduce execution time for mysql.test.
      808a99e9
    • Luis Soares's avatar
      BUG#39701: Mixed binlog format does not switch to row mode on · ca72b898
      Luis Soares authored
      LOAD_FILE
                  
      LOAD_FILE is not safe to replicate in STATEMENT mode, because it
      depends on a file (which is loaded on master and may not exist in
      slave(s)). This leads to scenarios on which the slave replicates the
      statement with 'load_file' and it will try to load the file from local
      file system. Given that the file may not exist in the slave filesystem
      the operation will not succeed (probably returning NULL), causing
      master and slave(s) to diverge. However, when using MIXED mode
      replication, this can be made to work, if the statement including
      LOAD_FILE is marked as unsafe, triggering a switch to ROW mode,
      meaning that the contents of the file are written to binlog as row
      events. Consequently, the contents from the file in the master will
      reach the slave via the binlog.
                 
      This patch addresses this bug by marking the load_file function as
      unsafe. When in mixed mode and when LOAD_FILE is issued, there will be
      a switch to row mode. Furthermore, when in statement mode, the
      LOAD_FILE will raise a warning that the statement is unsafe in that
      mode.
      
      
      mysql-test/extra/rpl_tests/rpl_loadfile.test:
        Extra file that is "sourced" on both rpl_loadfile and rpl_stm_loadfile
        test files.
      mysql-test/suite/rpl/r/rpl_loadfile.result:
        Updated with the results from the test case added to this file.
      mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
        Result file for rpl_loadfile test split with the warnings in statement
        mode.
      mysql-test/suite/rpl/t/rpl_loadfile.test:
        After splitting the original rpl_loadfile file, this one is only 
        required to be executed in mixed or row format.
        Appended the test for 39701 to this file.
      mysql-test/suite/rpl/t/rpl_stm_loadfile.test:
        Split the original rpl_loadfile test because load_file now raises
        a warning when in statement mode. The goal of this split is 
        two-fold: i) make the test case more resilient; ii) assert that 
        warnings are indeed raised when in statement mode.
      sql/item_create.cc:
        Added the set_stmt_unsafe call to lex.
      ca72b898
    • Georgi Kodinov's avatar
      Fixed initialization order warining. · 1e5b7bf3
      Georgi Kodinov authored
      1e5b7bf3
    • Georgi Kodinov's avatar
      merged 5.0-bugteam -> 5.1-bugteam · f8c6bbdd
      Georgi Kodinov authored
      f8c6bbdd
    • Leonard Zhou's avatar
      Merge · 612ffe79
      Leonard Zhou authored
      612ffe79
    • Leonard Zhou's avatar
      Merge · a8d84114
      Leonard Zhou authored
      a8d84114
    • Horst Hunger's avatar
      Merge to be able to push. · 80ad6381
      Horst Hunger authored
      80ad6381
    • Sergey Glukhov's avatar
      compiler warning fix · 01d80bf2
      Sergey Glukhov authored
      01d80bf2
    • Leonard Zhou's avatar
      Merge · f9c12ae8
      Leonard Zhou authored
      f9c12ae8
    • Leonard Zhou's avatar
      Merge · c4cfea2b
      Leonard Zhou authored
      c4cfea2b
    • Leonard Zhou's avatar
      BUG#41719 delayed INSERT into timestamp col needs set time_zone for concurrent binlogging · 9c3cbc04
      Leonard Zhou authored
      When do 'insert delayed' operation, the time_zone info doesn't be keeped in the row info.
      So when we do insert sometime later, time_zone didn't write into binlog.
      This will cause wrong result for timestamp column in slave.
      
      Our solution is that adding time_zone info with the delayed-row and
      restoring time_zone from row-info when execute that row in the furture by another thread.
      So we can write correct time_zone info into binlog and got correct result in slave.
      
      
      mysql-test/r/rpl_timezone.result:
        Test result
      mysql-test/t/rpl_timezone.test:
        Add test for bug#41719
      sql/sql_insert.cc:
        Add time_zone info in the delayed-row and restore time_zone when execute the row in the furture by another thread.
      9c3cbc04
  4. 23 Mar, 2009 9 commits