1. 23 Apr, 2012 9 commits
  2. 21 Apr, 2012 3 commits
  3. 20 Apr, 2012 4 commits
    • Mayank Prasad's avatar
      BUG#12427262 : 60961: SHOW TABLES VERY SLOW WHEN NOT IN SYSTEM DISK CACHE · dcb5071b
      Mayank Prasad authored
      Details:
       - test case bug12427262.test was failing on windows because
         on windows '/' was not recognized. And this was used in
         LIKE clause of the query being run in this test case.
      
      Fix:
       - Windows needs '\\\\' for path seperater in mysql. I was 
         not sure how to keep a single query with two different 
         syntax based on platform. So modifying query to make sure
         it runs correctly on both platform.
      dcb5071b
    • Nuno Carvalho's avatar
      BUG#13979418: SHOW BINLOG EVENTS MAY CRASH THE SERVER · d3968407
      Nuno Carvalho authored
      Merge from 5.1 into 5.5.
      
      Conflicts:
       * sql/log.h
       * sql/sql_repl.cc
      d3968407
    • Nuno Carvalho's avatar
      BUG#13979418: SHOW BINLOG EVENTS MAY CRASH THE SERVER · cdaae169
      Nuno Carvalho authored
      The function mysql_show_binlog_events has a local stack variable
      'LOG_INFO linfo;', which is assigned to thd->current_linfo, however
      this variable goes out of scope and is destroyed before clean
      thd->current_linfo.
      
      The problem is solved by moving 'LOG_INFO linfo;' to function scope.
      cdaae169
    • Andrei Elkin's avatar
      BUG#11754117 incorrect logging of INSERT into auto-increment · 49e484c8
      Andrei Elkin authored
      BUG#11761686 insert_id event is not filtered.
        
      Two issues are covered.
        
      INSERT into autoincrement field which is not the first part in the composed primary key 
      is unsafe by autoincrement logging design. The case is specific to MyISAM engine
      because Innodb does not allow such table definition.
        
      However no warnings and row-format logging in the MIXED mode was done, and
      that is fixed.
        
      Int-, Rand-, User-var log-events were not filtered along with their parent
      query that made possible them to screw up execution context of the following
      query.
        
      Fixed with deferring their execution until the parent query.
      
      ******
      Bug#11754117 
      
      Post review fixes.
      
      mysql-test/suite/rpl/r/rpl_auto_increment_bug45679.result:
        a new result file is added.
      mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result:
        results updated.
      mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test:
        regression test for BUG#11754117-45670 is added.
      mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test:
        regression test for filtering issue of BUG#11754117 - 45670 is added.
      sql/log_event.cc:
        Logics are added for deferring and executing events associated 
        with the Query event.
      sql/log_event.h:
        Interface to deferred events batch execution is added.
      sql/rpl_rli.cc:
        initialization for new RLI members is added.
      sql/rpl_rli.h:
        New members to RLI are added to facilitate deferred events gathering
        and execution control;
        two general character RLI cleanup methods are constructed.
      sql/rpl_utility.cc:
        Deferred_log_events methods are difined.
      sql/rpl_utility.h:
        A new class Deferred_log_events is defined to implement
        IRU events gathering, execution and cleanup.
      sql/slave.cc:
        Necessary changes to initialize `rli->deferred_events' and prevent
        deferred event deletion in the main read-exec branch.
      sql/sql_base.cc:
        A new safe-check function for multi-part pk with auto-increment is defined
        and deployed in lock_tables().
      sql/sql_class.cc:
        Initialization for a new member and replication cleanups are added
        to THD class.
      sql/sql_class.h:
        THD class receives a new member to hold a specific execution
        context for slave applier.
      sql/sql_parse.cc:
        Execution of the deferred event in started prior to its parent query.
      49e484c8
  4. 19 Apr, 2012 2 commits
  5. 18 Apr, 2012 10 commits
    • Tor Didriksen's avatar
      NULL merge 5.1 => 5.5 · 83303713
      Tor Didriksen authored
      83303713
    • Tor Didriksen's avatar
      892106db
    • Tor Didriksen's avatar
      NULL merge 5.1 => 5.5 · 0bd0de71
      Tor Didriksen authored
      0bd0de71
    • Tor Didriksen's avatar
      Backport 5.5=>5.1 Patch for Bug#13805127: · 11b2cf4f
      Tor Didriksen authored
      Stored program cache produces wrong result in same THD.
      11b2cf4f
    • Annamalai Gurusami's avatar
      Bug #12902967 Creating self referencing fk on same index unhandled, · b73da023
      Annamalai Gurusami authored
      confusing error. Updated the test script to work properly on
      windows platform. 
      b73da023
    • Nuno Carvalho's avatar
      WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT · 5e126b50
      Nuno Carvalho authored
      Merge from 5.1 into 5.5.
      5e126b50
    • Nuno Carvalho's avatar
      WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT · 448c3d62
      Nuno Carvalho authored
      Currently SHOW MASTER LOGS and SHOW BINARY LOGS require the SUPER
      privilege. Monitoring tools (such as MEM) often want to check this 
      output - for instance MEM generates the SUM of the sizes of the logs 
      reported here, and puts that in the Replication overview within the MEM
      Dashboard.
      However, because of the SUPER requirement, these tools often have an 
      account that holds open the connection whilst monitoring, and can lock
      out administrators when the server gets overloaded and reaches
      max_connections - there is already another SUPER privileged account
      connected, the "monitor". 
      
      As SHOW MASTER STATUS, and all other replication related statements,
      return with either REPLICATION CLIENT or SUPER privileges, this worklog 
      is to make SHOW MASTER LOGS and SHOW BINARY LOGS be consistent with this
      as well, and allow both of these commands with either SUPER or 
      REPLICATION CLIENT. 
      This allows monitoring tools to not require a SUPER privilege any more,
      so is safer in overloaded situations, as well as being more secure, as 
      lighter privileges can be given to users of such tools or scripts.
      448c3d62
    • Chaithra Gopalareddy's avatar
      Merge from 5.1 to 5.5 · eff1ec5f
      Chaithra Gopalareddy authored
      mysql-test/r/select.result:
        Added test result for Bug#12713907
      mysql-test/t/select.test:
        Added test case for Bug#12713907
      sql/sql_select.cc:
        Remove the call to set_keyread as we do it from access
        functions 'join_read_first' and 'join_read_last'
      eff1ec5f
    • Chaithra Gopalareddy's avatar
      Bug#12713907:STRANGE OPTIMIZE & WRONG RESULT UNDER · 25f82f8a
      Chaithra Gopalareddy authored
                         ORDER BY COUNT(*) LIMIT.
      
      PROBLEM:
      With respect to problem in the bug description, we
      exhibit different behaviors for the two tables
      presented, because innodb statistics (rec_per_key
      in this case) are updated for the first table
      and not so for the second one. As a result the
      query plan gets changed in test_if_skip_sort_order
      to use 'index' scan. Hence the difference in the
      explain output. (NOTE: We can reproduce the problem
      with first table by reducing the number of tuples
      and changing the table structure)
      
      The varied output w.r.t the query on the second table
      is because of the result in the query plan change.
      When a query plan is changed to use 'index' scan,
      after the call to test_if_skip_sort_order, we set
      keyread to TRUE immedietly. If for some reason
      we drop this index scan for a filesort later on,
      we fetch only the keys not the entire tuple.
      As a result we would see junk values in the result set.
      
      Following is the code flow:
      
      Call test_if_skip_sort_order
      -Choose an index to give sorted output
      -If this is a covering index, set_keyread to TRUE
      -Set the scan to INDEX scan
      
      Call test_if_skip_sort_order second time
      -Index is not chosen (note that we do not pass the
      actual limit value second time. Hence we do not choose
      index scan second time which in itself is a bug fixed
      in 5.6 with WL#5558)
      -goto filesort
      
      Call filesort
      -Create quick range on a different index
      -Since keyread is set to TRUE, we fetch only the columns of
      the index
      -results in the required columns are not fetched
      
      FIX:
      Remove the call to set_keyread(TRUE) from
      test_if_skip_sort_order. The access function which is
      'join_read_first' or 'join_read_last' calls set_keyread anyways.
      
      
      mysql-test/r/func_group_innodb.result:
        Added test result for Bug#12713907
      mysql-test/t/func_group_innodb.test:
        Added test case for Bug#12713907
      sql/sql_select.cc:
        Remove the call to set_keyread as we do it from access
        functions 'join_read_first' and 'join_read_last'
      25f82f8a
    • Annamalai Gurusami's avatar
      Bug #12902967 Creating self referencing fk on same index unhandled, · 75ff20a2
      Annamalai Gurusami authored
      confusing error. I have added the not_embedded.inc in the test file.
      75ff20a2
  6. 17 Apr, 2012 3 commits
  7. 16 Apr, 2012 1 commit
  8. 12 Apr, 2012 1 commit
    • Sujatha Sivakumar's avatar
      BUG#12662190:COM_COMMIT IS NOT INCREMENTED FROM THE BINARY LOGS ON SLAVE, COM_BEGIN IS · 64e74d48
      Sujatha Sivakumar authored
      PROBLEM:
      
      --------
      
      When binary log statements are replayed on the slave, BEGIN is represented
      
      in com_counters but COMMIT is not. Similarly in 'ROW' based replication
      
      'INSERT','UPDATE',and 'DELETE' com_counters are not getting incremented
      
      when the binary log statements are replayed at slave.
      
      ANALYSIS:
      ---------
      
      In 'ROW' based replication for COMMIT,INSERT,UPDATE and DELETE operations
      following special events are invoked.
      Xid_log_event,Write_rows_log_event,Update_rows_log_event,Update_rows_log_event.
      
      The above mentioned events doesn't go through the parser where the
      'COM_COUNTERS' are incremented.
      
      
      FIX:
      -----
      Increment statements are added at appropriate events.
      Respective functions are listed below.
      
      'Xid_log_event::do_apply_event'
      'Write_rows_log_event::do_before_row_operations'
      'Update_rows_log_event::do_before_row_operations'
      'Delete_rows_log_event::do_before_row_operations' 
      
      sql/log_event.cc:
        Added code to increment counts for 'COM_INSERT','COM_UPDATE',
        'COM_DELETE' and 'COM_COMMIT'during ROW based replicaiton
      64e74d48
  9. 11 Apr, 2012 1 commit
    • unknown's avatar
      Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM · 99b18a03
      unknown authored
                          TABLES IN INCORRECT ENGINE
      
      PROBLEM:
        CREATE/ALTER TABLE currently can move system tables like
      mysql.db, user, host etc, to engines other than MyISAM. This is not
      completely supported as of now, by mysqld. When some of system tables
      like plugin, servers, event, func, *_priv, time_zone* are moved
      to innodb, mysqld restart crashes. Currently system tables
      can be moved to BLACKHOLE also!!!.
      
      ANALYSIS:
        The problem is that there is no check before creating or moving
      a system table to some particular engine.
      
        System tables are suppose to be residing in MyISAM. We can think
      of restricting system tables to exist only in MyISAM. But, there could
      be future needs of these system tables to be part of other engines
      by design. For eg, NDB cluster expects some tables to be on innodb
      or ndb engine. This calls for a solution, by which system
      tables can be supported by any desired engine, with minimal effort.
      
      FIX:
        The solution provides a handlerton interface using which,
      mysqld server can query particular storage engine handlerton for
      system tables that it supports. This way each storage engine
      layer can define their own system database and system tables.
      
        The check_engine() function uses the new handlerton function
      ha_check_if_supported_system_table() to check if db.tablename
      provided in the DDL is supported by the SE.
      
      Note: This fix has modified a test in help.test, which was moving
      mysql.help_* to innodb. The primary intention of the test was not
      to move them between engines.
      99b18a03
  10. 10 Apr, 2012 2 commits
    • Manish Kumar's avatar
      BUG#13917335 - ASSERTION `REPORT_PORT != 0' FAILED IN NETWORK_INIT () · 26713f5a
      Manish Kumar authored
      Problem - The cause of the failure is mainly due to the assert added in
                the code as a result of the fix of the BUG-13333431. When we
                start the server with the --skip-networking option enabled
                we have the mysqld_port explicitly to 0. Since the value of
                report_port is set to mysqld_port, the assertion that
                (report_port!= 0) fails.
      
      Fix - the fix of the problem is to assert the not zero value of
            report_port only in the case the --skip-networking option is not
            used to start the mysqld server.
      
      sql/mysqld.cc:
        Added the code to check for the skip-networking option while starting
        the server.
      26713f5a
    • Manish Kumar's avatar
      BUG#13812374 - RPL.RPL_REPORT_PORT FAILS OCCASIONALLY ON PB2 · 20459a71
      Manish Kumar authored
      Problem - this failure occured in the test added for the fix of the 
                bug-13333431. The basic problem of the failure was the 
                value of the report_port which persisted even after the end 
                of the test (ie. rpl_end.inc). So this causes the assertion 
                in the test to fail if it is executed again.
      
      Fix - restarted the server with the default value being passed to the 
            report_port after testing the two expected case so that in the 
            next run of the test we will not encounter the previous value of
            report_port.
      
      
      
      mysql-test/suite/rpl/r/rpl_report_port.result:
        Updated the corresponding result file.
      mysql-test/suite/rpl/t/rpl_report_port-slave.opt:
        Removed the slave option file.
      mysql-test/suite/rpl/t/rpl_report_port.test:
        Added the restart server option before ending the test.
      20459a71
  11. 09 Apr, 2012 3 commits
  12. 06 Apr, 2012 1 commit