An error occurred fetching the project authors.
  1. 15 Feb, 2013 2 commits
  2. 14 Feb, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · cb5a5388
      unknown authored
      Slave now loads the GTID state from the master when connecting with
      old-style filename/offset position.
      
      This allows the user to use MASTER_GTID_POS=AUTO on next CHANGE MASTER
      without any other action needed.
      cb5a5388
  3. 25 Jan, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · 1d357776
      unknown authored
      When starting slave, check binlog state in addition to mysql.rpl_slave.state.
      
      This allows to switch a previous master to be a slave directly
      with MASTER_GTID_POS=AUTO.
      1d357776
  4. 22 Jan, 2013 1 commit
  5. 15 Nov, 2012 1 commit
    • unknown's avatar
      MDEV-26: Global transaction id: Intermediate commit. · bdbce30d
      unknown authored
      Now slave can connect to master, sending start position as slave state
      rather than old-style binlog name/position.
      
      This enables to switch to a new master by changing just connection
      information, replication slave GTID state ensures that slave starts
      at the correct point in the new master.
      bdbce30d
  6. 05 Nov, 2012 1 commit
  7. 23 Oct, 2012 1 commit
    • unknown's avatar
      MDEV-500: Session variable for server_id · ab8e8f4b
      unknown authored
      MDEV-26: Global transaction id, partial commit
      
      Change server_id to be a session variable.
      User with SUPER can set it to binlog with different server_id.
      Implement backward-compatible ::server_id mirror for plugins.
      ab8e8f4b
  8. 23 Jan, 2013 2 commits
    • Sergei Golubchik's avatar
      cleanup: · 52051882
      Sergei Golubchik authored
      * remove unused mysql_option
      * don't allocate 5GB of memory in the mtr tests
      * restore the behavior in dynamic_column_offset_byte(), put the ifdef correctly
      * prefer __attribute__((unused)) to #ifdef
      * prefer UNINIT_VAR to LINT_INIT
      * make most Warning_info users blissfully unaware of the postponed initialization
      * use my_offsetof instead of offsetof where the compiler thinks the latter is incorrect
      52051882
    • Michael Widenius's avatar
      MDEV-4011 Added per thread memory counting and usage · a260b155
      Michael Widenius authored
      Base code and idea from a patch from by plinux at Taobao.
      
      The idea is that we mark all memory that are thread specific with MY_THREAD_SPECIFIC.
      Memory counting is done per thread in the my_malloc_size_cb_func callback function from my_malloc().
      There are plenty of new asserts to ensure that for a debug server the counting is correct.
      
      Information_schema.processlist gets two new columns: MEMORY_USED and EXAMINED_ROWS.
      - The later is there mainly to show how query is progressing.
      
      The following changes in interfaces was needed to get this to work:
      - init_alloc_root() amd init_sql_alloc() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
      - One now have to use alloc_root_set_min_malloc() to set min memory to be allocated by alloc_root()
      - my_init_dynamic_array()  has extra option so that one can mark memory with MY_THREAD_SPECIFIC
      - my_net_init() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
      - Added flag for hash_init() so that one can mark hash table to be thread specific.
      - Added flags to init_tree() so that one can mark tree to be thread specific.
      - Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
      - Added flag to Warning_info::Warning_info() if the structure should be fully initialized.
      - String elements can now be marked as thread specific.
      - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
      - Changed type of myf from int to ulong, as this is always a set of bit flags.
      
      Other things:
      - Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
      - We now also show EXAMINED_ROWS in SHOW PROCESSLIST
      - Added new variable 'memory_used'
      - Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
      - Removed calls to the obsoleted function init_dynamic_array()
      - Use set_current_thd() instead of my_pthread_setspecific_ptr(THR_THD,...)
      
      
      client/completion_hash.cc:
        Updated call to init_alloc_root()
      client/mysql.cc:
        Updated call to init_alloc_root()
      client/mysqlbinlog.cc:
        init_dynamic_array() -> my_init_dynamic_array()
        Updated call to init_alloc_root()
      client/mysqlcheck.c:
        Updated call to my_init_dynamic_array()
      client/mysqldump.c:
        Updated call to init_alloc_root()
      client/mysqltest.cc:
        Updated call to init_alloc_root()
        Updated call to my_init_dynamic_array()
        Fixed compiler warnings
      extra/comp_err.c:
        Updated call to my_init_dynamic_array()
      extra/resolve_stack_dump.c:
        Updated call to my_init_dynamic_array()
      include/hash.h:
        Added HASH_THREAD_SPECIFIC
      include/heap.h:
        Added flag is internal temporary table.
      include/my_dir.h:
        Safety fix: Ensure that MY_DONT_SORT and MY_WANT_STAT don't interfer with other mysys flags
      include/my_global.h:
        Changed type of myf from int to ulong, as this is always a set of bit flags.
      include/my_sys.h:
        Added MY_THREAD_SPECIFIC and MY_THREAD_MOVE
        Added malloc_flags to DYNAMIC_ARRAY
        Added extra mysys flag argument to my_init_dynamic_array()
        Removed deprecated functions init_dynamic_array() and my_init_dynamic_array.._ci
        Updated paramaters for init_alloc_root()
      include/my_tree.h:
        Added my_flags to allow one to use MY_THREAD_SPECIFIC with hash tables.
        Removed with_delete. One should now instead use MY_TREE_WITH_DELETE_FLAG
        Updated parameters to init_tree()
      include/myisamchk.h:
        Added malloc_flags to allow one to use MY_THREAD_SPECIFIC for checks.
      include/mysql.h:
        Added MYSQL_THREAD_SPECIFIC_MALLOC
        Used 'unused1' to mark memory as thread specific.
      include/mysql.h.pp:
        Updated file
      include/mysql_com.h:
        Used 'unused1' to mark memory as thread specific.
        Updated parameters for my_net_init()
      libmysql/libmysql.c:
        Updated call to init_alloc_root() to mark memory thread specific.
      libmysqld/emb_qcache.cc:
        Updated call to init_alloc_root()
      libmysqld/lib_sql.cc:
        Updated call to init_alloc_root()
      mysql-test/r/create.result:
        Updated results
      mysql-test/r/user_var.result:
        Updated results
      mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
        Update to handle new format of SHOW PROCESSLIST
      mysql-test/suite/funcs_1/datadict/processlist_val.inc:
        Update to handle new format of SHOW PROCESSLIST
      mysql-test/suite/funcs_1/r/is_columns_is.result:
        Update to handle new format of SHOW PROCESSLIST
      mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
        Updated results
      mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
        Updated results
      mysql-test/t/show_explain.test:
        Fixed usage of debug variable so that one can run test with --debug
      mysql-test/t/user_var.test:
        Added test of memory_usage variable.
      mysys/array.c:
        Added extra my_flags option to init_dynamic_array() and init_dynamic_array2() so that one can mark memory with MY_THREAD_SPECIFIC
        All allocated memory is marked with the given my_flags.
        Removed obsolete function init_dynamic_array()
      mysys/default.c:
        Updated call to init_alloc_root()
        Updated call to my_init_dynamic_array()
      mysys/hash.c:
        Updated call to my_init_dynamic_array_ci().
        Allocated memory is marked with MY_THREAD_SPECIFIC if HASH_THREAD_SPECIFIC is used.
      mysys/ma_dyncol.c:
        init_dynamic_array() -> my_init_dynamic_array()
        Added #if to get rid of compiler warnings
      mysys/mf_tempdir.c:
        Updated call to my_init_dynamic_array()
      mysys/my_alloc.c:
        Added extra parameter to init_alloc_root() so that one can mark memory with MY_THREAD_SPECIFIC
        Extend MEM_ROOT with a flag if memory is thread specific.
        This is stored in block_size, to keep the size of the MEM_ROOT object identical as before.
        Allocated memory is marked with MY_THREAD_SPECIFIC if used with init_alloc_root()
      mysys/my_chmod.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_chsize.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_copy.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_create.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_delete.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_error.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_fopen.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_fstream.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_getwd.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_lib.c:
        Updated call to init_alloc_root()
        Updated call to my_init_dynamic_array()
        Updated DBUG_PRINT because of change of myf type
      mysys/my_lock.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_malloc.c:
        Store at start of each allocated memory block the size of the block and if the block is thread specific.
        Call malloc_size_cb_func, if set, with the memory allocated/freed.
        Updated DBUG_PRINT because of change of myf type
      mysys/my_open.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_pread.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_read.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_redel.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_rename.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_seek.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_sync.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/my_thr_init.c:
        Ensure that one can call my_thread_dbug_id() even if thread is not properly initialized.
      mysys/my_write.c:
        Updated DBUG_PRINT because of change of myf type
      mysys/mysys_priv.h:
        Updated parameters to sf_malloc and sf_realloc()
      mysys/safemalloc.c:
        Added checking that for memory marked with MY_THREAD_SPECIFIC that it's the same thread that is allocation and freeing the memory.
        Added sf_malloc_dbug_id() to allow MariaDB to specify which THD is handling the memory.
        Added my_flags arguments to sf_malloc() and sf_realloc() to be able to mark memory with MY_THREAD_SPECIFIC.
        Added sf_report_leaked_memory() to get list of memory not freed by a thread.
      mysys/tree.c:
        Added flags to init_tree() so that one can mark tree to be thread specific.
        Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
        Updated call to init_alloc_root()
        All allocated memory is marked with the given malloc flags
      mysys/waiting_threads.c:
        Updated call to my_init_dynamic_array()
      sql-common/client.c:
        Updated call to init_alloc_root() and my_net_init() to mark memory thread specific.
        Updated call to my_init_dynamic_array().
        Added MYSQL_THREAD_SPECIFIC_MALLOC so that client can mark memory as MY_THREAD_SPECIFIC.
      sql-common/client_plugin.c:
        Updated call to init_alloc_root()
      sql/debug_sync.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/event_scheduler.cc:
        Removed calls to net_end() as this is now done in ~THD()
        Call set_current_thd() to ensure that memory is assigned to right thread.
      sql/events.cc:
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/filesort.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/filesort_utils.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/ha_ndbcluster.cc:
        Updated call to init_alloc_root()
        Updated call to my_net_init()
        Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
      sql/ha_ndbcluster_binlog.cc:
        Updated call to my_net_init()
        Updated call to init_sql_alloc()
        Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
      sql/ha_partition.cc:
        Updated call to init_alloc_root()
      sql/handler.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
        Added missing call to my_dir_end()
      sql/item_func.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/item_subselect.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/item_sum.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/log.cc:
        More DBUG
        Updated call to init_alloc_root()
      sql/mdl.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/mysqld.cc:
        Added total_memory_used
        Updated call to init_alloc_root()
        Move mysql_cond_broadcast() before my_thread_end()
        Added mariadb_dbug_id() to count memory per THD instead of per thread.
        Added my_malloc_size_cb_func() callback function for my_malloc() to count memory.
        Move initialization of mysqld_server_started and mysqld_server_initialized earlier.
        Updated call to my_init_dynamic_array().
        Updated call to my_net_init().
        Call my_pthread_setspecific_ptr(THR_THD,...) to ensure that memory is assigned to right thread.
        Added status variable 'memory_used'.
        Updated call to init_alloc_root()
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/mysqld.h:
        Added set_current_thd()
      sql/net_serv.cc:
        Added new parameter to my_net_init() so that one can mark memory with MY_THREAD_SPECIFIC.
        Store in net->thread_specific_malloc if memory is thread specific.
        Mark memory to be thread specific if requested.
      sql/opt_range.cc:
        Updated call to my_init_dynamic_array()
        Updated call to init_sql_alloc()
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/opt_subselect.cc:
        Updated call to init_sql_alloc() to mark memory thread specific.
      sql/protocol.cc:
        Fixed compiler warning
      sql/records.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/rpl_filter.cc:
        Updated call to my_init_dynamic_array()
      sql/rpl_handler.cc:
        Updated call to my_init_dynamic_array2()
      sql/rpl_handler.h:
        Updated call to init_sql_alloc()
      sql/rpl_mi.cc:
        Updated call to my_init_dynamic_array()
      sql/rpl_tblmap.cc:
        Updated call to init_alloc_root()
      sql/rpl_utility.cc:
        Updated call to my_init_dynamic_array()
      sql/slave.cc:
        Initialize things properly before calling functions that allocate memory.
        Removed calls to net_end() as this is now done in ~THD()
      sql/sp_head.cc:
        Updated call to init_sql_alloc()
        Updated call to my_init_dynamic_array()
        Added parameter to warning_info() that it should be fully initialized.
      sql/sp_pcontext.cc:
        Updated call to my_init_dynamic_array()
      sql/sql_acl.cc:
        Updated call to init_sql_alloc()
        Updated call to my_init_dynamic_array()
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_admin.cc:
        Added parameter to warning_info() that it should be fully initialized.
      sql/sql_analyse.h:
        Updated call to init_tree() to mark memory thread specific.
      sql/sql_array.h:
        Updated call to my_init_dynamic_array() to mark memory thread specific.
      sql/sql_audit.cc:
        Updated call to my_init_dynamic_array()
      sql/sql_base.cc:
        Updated call to init_sql_alloc()
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_cache.cc:
        Updated comment
      sql/sql_class.cc:
        Added parameter to warning_info() that not initialize it until THD is fully created.
        Updated call to init_sql_alloc()
        Mark THD::user_vars has to be thread specific.
        Updated call to my_init_dynamic_array()
        Ensure that memory allocated by THD is assigned to the THD.
        More DBUG
        Always acll net_end() in ~THD()
        Assert that all memory signed to this THD is really deleted at ~THD.
        Fixed set_status_var_init() to not reset memory_used.
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_class.h:
        Added MY_THREAD_SPECIFIC to allocated memory.
        Added malloc_size to THD to record allocated memory per THD.
      sql/sql_delete.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/sql_error.cc:
        Added 'initialize' parameter to Warning_info() to say if should allocate memory for it's structures.
        This is used by THD::THD() to not allocate memory until THD is ready.
        Added Warning_info::free_memory()
      sql/sql_error.h:
        Updated Warning_info() class.
      sql/sql_handler.cc:
        Updated call to init_alloc_root() to mark memory thread specific.
      sql/sql_insert.cc:
        More DBUG
      sql/sql_join_cache.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/sql_lex.cc:
        Updated call to my_init_dynamic_array()
      sql/sql_lex.h:
        Updated call to my_init_dynamic_array()
      sql/sql_load.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/sql_parse.cc:
        Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
        Ensure that examined_row_count() is reset before query.
        Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
        Don't restore thd->status_var.memory_used when restoring thd->status_var
      sql/sql_plugin.cc:
        Updated call to init_alloc_root()
        Updated call to my_init_dynamic_array()
        Don't allocate THD on the stack, as this causes problems with valgrind when doing thd memory counting.
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_prepare.cc:
        Added parameter to warning_info() that it should be fully initialized.
        Updated call to init_sql_alloc() to mark memory thread specific.
      sql/sql_reload.cc:
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_select.cc:
        Updated call to my_init_dynamic_array() and init_sql_alloc() to mark memory thread specific.
        Added MY_THREAD_SPECIFIC to allocated memory.
        More DBUG
      sql/sql_servers.cc:
        Updated call to init_sql_alloc() to mark memory some memory thread specific.
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_show.cc:
        Updated call to my_init_dynamic_array()
        Mark my_dir() memory thread specific.
        Use my_pthread_setspecific_ptr(THR_THD,...) to mark that allocated memory should be allocated to calling thread.
        More DBUG.
        Added malloc_size and examined_row_count to SHOW PROCESSLIST.
        Added MY_THREAD_SPECIFIC to allocated memory.
        Updated call to init_sql_alloc()
        Added parameter to warning_info() that it should be fully initialized.
      sql/sql_statistics.cc:
        Fixed compiler warning
      sql/sql_string.cc:
        String elements can now be marked as thread specific.
      sql/sql_string.h:
        String elements can now be marked as thread specific.
      sql/sql_table.cc:
        Updated call to init_sql_alloc() and my_malloc() to mark memory thread specific
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
        Fixed compiler warning
      sql/sql_test.cc:
        Updated call to my_init_dynamic_array() to mark memory thread specific.
      sql/sql_trigger.cc:
        Updated call to init_sql_alloc()
      sql/sql_udf.cc:
        Updated call to init_sql_alloc()
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/sql_update.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      sql/table.cc:
        Updated call to init_sql_alloc().
        Mark memory used by temporary tables, that are not for slave threads, as MY_THREAD_SPECIFIC
        Updated call to init_sql_alloc()
      sql/thr_malloc.cc:
        Added my_flags argument to init_sql_alloc() to be able to mark memory as MY_THREAD_SPECIFIC.
      sql/thr_malloc.h:
        Updated prototype for init_sql_alloc()
      sql/tztime.cc:
        Updated call to init_sql_alloc()
        Updated call to init_alloc_root() to mark memory thread specific.
        my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
      sql/uniques.cc:
        Updated calls to init_tree(), my_init_dynamic_array() and my_malloc() to mark memory thread specific.
      sql/unireg.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      storage/csv/ha_tina.cc:
        Updated call to init_alloc_root()
      storage/federated/ha_federated.cc:
        Updated call to init_alloc_root()
        Updated call to my_init_dynamic_array()
        Ensure that memory allocated by fedarated is registered for the system, not for the thread.
      storage/federatedx/federatedx_io_mysql.cc:
        Updated call to my_init_dynamic_array()
      storage/federatedx/ha_federatedx.cc:
        Updated call to init_alloc_root()
        Updated call to my_init_dynamic_array()
      storage/heap/ha_heap.cc:
        Added MY_THREAD_SPECIFIC to allocated memory.
      storage/heap/heapdef.h:
        Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
      storage/heap/hp_block.c:
        Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
      storage/heap/hp_create.c:
        - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
        - Use MY_TREE_WITH_DELETE instead of removed option 'with_delete'.
      storage/heap/hp_open.c:
        Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
      storage/heap/hp_write.c:
        Added new parameter to hp_get_new_block()
      storage/maria/ma_bitmap.c:
        Updated call to my_init_dynamic_array()
      storage/maria/ma_blockrec.c:
        Updated call to my_init_dynamic_array()
      storage/maria/ma_check.c:
        Updated call to init_alloc_root()
      storage/maria/ma_ft_boolean_search.c:
        Updated calls to init_tree() and init_alloc_root()
      storage/maria/ma_ft_nlq_search.c:
        Updated call to init_tree()
      storage/maria/ma_ft_parser.c:
        Updated call to init_tree()
        Updated call to init_alloc_root()
      storage/maria/ma_loghandler.c:
        Updated call to my_init_dynamic_array()
      storage/maria/ma_open.c:
        Updated call to my_init_dynamic_array()
      storage/maria/ma_sort.c:
        Updated call to my_init_dynamic_array()
      storage/maria/ma_write.c:
        Updated calls to my_init_dynamic_array() and init_tree()
      storage/maria/maria_pack.c:
        Updated call to init_tree()
      storage/maria/unittest/sequence_storage.c:
        Updated call to my_init_dynamic_array()
      storage/myisam/ft_boolean_search.c:
        Updated call to init_tree()
        Updated call to init_alloc_root()
      storage/myisam/ft_nlq_search.c:
        Updated call to init_tree()
      storage/myisam/ft_parser.c:
        Updated call to init_tree()
        Updated call to init_alloc_root()
      storage/myisam/ft_stopwords.c:
        Updated call to init_tree()
      storage/myisam/mi_check.c:
        Updated call to init_alloc_root()
      storage/myisam/mi_write.c:
        Updated call to my_init_dynamic_array()
        Updated call to init_tree()
      storage/myisam/myisamlog.c:
        Updated call to init_tree()
      storage/myisam/myisampack.c:
        Updated call to init_tree()
      storage/myisam/sort.c:
        Updated call to my_init_dynamic_array()
      storage/myisammrg/ha_myisammrg.cc:
        Updated call to init_sql_alloc()
      storage/perfschema/pfs_check.cc:
        Rest current_thd
      storage/perfschema/pfs_instr.cc:
        Removed DBUG_ENTER/DBUG_VOID_RETURN as at this point my_thread_var is not allocated anymore, which can cause problems.
      support-files/compiler_warnings.supp:
        Disable compiler warning from offsetof macro.
      a260b155
  9. 17 Dec, 2012 1 commit
  10. 02 Oct, 2012 1 commit
    • Michael Widenius's avatar
      Changed SHOW_FUNC variabels that don't return SHOW_ARRAY to SHOW_SIMPLE_FUNC. · 572560f3
      Michael Widenius authored
      This allows us to avoid calculating variables (including those involving mutex) that doesn't match the given
      wildcard in SHOW STATUS LIKE '...'
      Removed all references to active_mi that could cause problems for multi-source replication.
      
      Added START|STOP ALL SLAVES
      Added SHOW ALL SLAVES STATUS
      
      
      include/mysql/plugin.h:
        Added SHOW_SIMPLE_FUNC
      include/mysql/plugin_audit.h.pp:
        Updated .pp file
      include/mysql/plugin_auth.h.pp:
        Updated .pp file
      include/mysql/plugin_ftparser.h.pp:
        Updated .pp file
      mysql-test/suite/multi_source/info_logs.result:
        New columns in SHOW ALL SLAVES STATUS
      mysql-test/suite/multi_source/info_logs.test:
        Test new syntax
      mysql-test/suite/multi_source/simple.result:
        New columns in SHOW ALL SLAVES STATUS
      mysql-test/suite/multi_source/simple.test:
        test new syntax
      mysql-test/suite/multi_source/syntax.result:
        Updated result
      mysql-test/suite/multi_source/syntax.test:
        Test new syntax
      mysql-test/suite/rpl/r/rpl_skip_replication.result:
        Updated result
      plugin/semisync/semisync_master_plugin.cc:
        SHOW_FUNC -> SHOW_SIMPLE_FUNC
      sql/item_create.cc:
        Simplify code
      sql/lex.h:
        Added SLAVES keyword
      sql/log.cc:
        Constant -> define
      sql/log_event.cc:
        Added comment
      sql/mysqld.cc:
        SHOW_FUNC -> SHOW_SIMPLE_FUNC
        Made slave_retried_trans, slave_received_heartbeats and heartbeat_period multi-source safe
        Clear variable denied_connections and slave_retried_transactions on startup
      sql/mysqld.h:
        Added slave_retried_transactions
      sql/rpl_mi.cc:
        create_signed_file_name -> create_logfile_name_with_suffix
        Added start_all_slaves() and stop_all_slaves()
      sql/rpl_mi.h:
        Added prototypes
      sql/rpl_rli.cc:
        create_signed_file_name -> create_logfile_name_with_suffix
        added executed_entries
      sql/rpl_rli.h:
        Added executed_entries
      sql/share/errmsg-utf8.txt:
        More and better error messages
      sql/slave.cc:
        Added more fields to SHOW ALL SLAVES STATUS
        Added slave_retried_transactions
        Changed constants -> defines
      sql/sql_class.h:
        Added comment
      sql/sql_insert.cc:
        active_mi.rli -> thd->rli_slave
      sql/sql_lex.h:
        Added SQLCOM_SLAVE_ALL_START & SQLCOM_SLAVE_ALL_STOP
      sql/sql_load.cc:
        active_mi.rli -> thd->rli_slave
      sql/sql_parse.cc:
        Added START|STOP ALL SLAVES
      sql/sql_prepare.cc:
        Added SQLCOM_SLAVE_ALL_START & SQLCOM_SLAVE_ALL_STOP
      sql/sql_reload.cc:
        Made REFRESH RELAY LOG multi-source safe
      sql/sql_repl.cc:
        create_signed_file_name -> create_logfile_name_with_suffix
        Don't send my_ok() from start_slave() or stop_slave() so that we can call it for all master connections
      sql/sql_show.cc:
        Compare wild cards early for all variables
      sql/sql_yacc.yy:
        Added START|STOP ALL SLAVES
        Added SHOW ALL SLAVES STATUS
      sql/sys_vars.cc:
        Made replicate_events_marked_for_skip,slave_net_timeout and rpl_filter multi-source safe.
      sql/sys_vars.h:
        Simplify Sys_var_rpl_filter
      572560f3
  11. 27 Sep, 2012 1 commit
    • Michael Widenius's avatar
      Implementation of Multi-source replication (MDEV:253) · 1864d959
      Michael Widenius authored
      Documentation of the feature can be found at: http://kb.askmonty.org/en/multi-source-replication/
      This code is based on code from Taobao, developed by Plinux
      
      BUILD/SETUP.sh:
        Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
      client/mysqltest.cc:
        Added support for error names starting with 'W'
        Added connection_name support to --sync_with_master
      cmake/maintainer.cmake:
        Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
      mysql-test/r/mysqltest.result:
        Updated results
      mysql-test/r/parser.result:
        Updated results
      mysql-test/suite/multi_source/my.cnf:
        Setup of multi-master tests
      mysql-test/suite/multi_source/simple.result:
        Simple basic test of multi-source functionality
      mysql-test/suite/multi_source/simple.test:
        Simple basic test of multi-source functionality
      mysql-test/suite/multi_source/syntax.result:
        Test of multi-source syntax
      mysql-test/suite/multi_source/syntax.test:
        Test of multi-source syntax
      mysql-test/suite/rpl/r/rpl_rotate_logs.result:
        Updated results because of new error messages
      mysql-test/t/parser.test:
        Updated test as master_pos_wait() now takes more arguments than before
      sql/event_scheduler.cc:
        No reason to initialize slave_thread (it's guaranteed to be zero here)
      sql/item_create.cc:
        Added connection_name argument to master_pos_wait()
        Simplified code
      sql/item_func.cc:
        Added connection_name argument to master_pos_wait()
      sql/item_func.h:
        Added connection_name argument to master_pos_wait()
      sql/log.cc:
        Added tag "Master 'connection_name'" to slave errors that has a connection name.
      sql/mysqld.cc:
        Added variable mysqld_server_initialized so that other functions can test if server is fully initialized.
        Free all slave data in one place (fewer ifdef's)
        Removed not needed call to close_active_mi()
        Initialize slaves() later in startup to ensure that everthing is really initialized when slaves start.
        Made status variable slave_running multi-source safe
      sql/mysqld.h:
        Added mysqld_server_initialized
      sql/rpl_mi.cc:
        Store connection name and cmp_connection_name (only used for show full slave status) in Master_info
        Added code for Master_info_index, which handles storage of multi-master information
        Don't write the empty "" connection_name to multi-master.info file. This is handled by the original code.
      sql/rpl_mi.h:
        Added connection_name and Master_info_index
      sql/rpl_rli.cc:
        Added connection_name to relay log files.
      sql/rpl_rli.h:
        Fixed type of slave_skip_counter as we now access it directly in sys_vars.cc, so it must be uint
      sql/share/errmsg-utf8.txt:
        Added new error messages needed for multi-source
        Added multi-source name to error ER_MASTER_INFO and WARN_NO_MASTER_INFO
      sql/slave.cc:
        Moved things a bit around to make it easier to handle error conditions.
        Create a global master_info_index and add the "" connection to it
        Ensure that new Master_info doesn't fail.
        Don't call terminate_slave_threads(active_mi..) on end_slave() as this is now done automaticly when deleting master_info_index.
        Delete not needed function close_active_mi(). One can achive same thing by calling end_slave().
        Added support for SHOW FULL SLAVE STATUS (show status for all master connections with connection_name as first column)
      sql/slave.h:
        Added new prototypes
      sql/sql_base.cc:
        More DBUG_PRINT
      sql/sql_class.cc:
        Reset thd->connection_name and thd-->default_master_connection
      sql/sql_class.h:
        Added thd->connection_name and thd-->default_master_connection
        Added slave_skip_count to variables to make changing the @@sql_slave_skip_count variable thread safe
      sql/sql_const.h:
        Added MAX_CONNECTION_NAME
      sql/sql_lex.cc:
        Reset 'lex->verbose' (to simplify some sql_yacc.yy code)
      sql/sql_lex.h:
        Added connection_name
      sql/sql_parse.cc:
        Added support for connection_name to all SLAVE commands.
        - Instead of using active_mi, we now get the current Master_info from master_info_index.
        - Create new replication threads with CHANGE MASTER
        - Added support for show_all_master_info()
      sql/sql_reload.cc:
        Made reset/full slave use master_info_index->get_master_info() instead of active_mi.
        If one uses 'RESET SLAVE "connection_name" all' the connection is removed from master_info_index.
      sql/sql_repl.cc:
        sql_slave_skip_counter is moved to thd->variables to make it thread safe and fix some bugs with it
        Add connection name to relay log files.
        Added connection name to errors.
        Added some logging for multi-master if log_warnings > 1
        stop_slave():
        - Don't check if thd is set. It's guaranteed to always be set.
        change_master():
        - Check for duplicate connection names in change_master()
        - Check for wrong arguments first in file (to simplify error handling)
        - Register new connections in master_info_index
      sql/sql_yacc.yy:
        Added optional connection_name to a all relevant master/slave commands
      sql/strfunc.cc:
        my_global.h shoud always be included first.
      sql/sys_vars.cc:
        Added variable default_master_connection
        Made variable sql_slave_skip_counter multi-source safe
      sql/sys_vars.h:
        Added Sys_var_session_lexstring (needed for default_master_connection)
        Added Sys_var_multi_source_uint (needed for sql_slave_skip_counter).
      1864d959
  12. 13 Sep, 2012 1 commit
    • unknown's avatar
      MDEV-232: Remove one fsync() from commit phase. · 288eeb3a
      unknown authored
      Introduce a new storage engine API method commit_checkpoint_request().
      This is used to replace the fsync() at the end of every storage engine
      commit with a single fsync() when a binlog is rotated.
      
      Binlog rotation is now done during group commit instead of being
      delayed until unlog(), removing some server stall and avoiding an
      expensive lock/unlock of LOCK_log inside unlog().
      288eeb3a
  13. 14 Aug, 2012 1 commit
    • unknown's avatar
      MDEV-450: Deadlock between starting a slave and reading system variables · 47929af5
      unknown authored
      Starting the SQL thread might deadlock with reading the values of the
      replication filtering options.
      
      The deadlock is due to a lock order violation when the variables are
      read or set. For example, reading replicate_ignore_table first
      acquires LOCK_global_system_variables in sys_var::value_ptr and later
      acquires LOCK_active_mi in Sys_var_rpl_filter::global_value_ptr. This
      violates the order established when starting a SQL thread, where
      LOCK_active_mi is acquired before start_slave, and ends up creating a
      thread (handle_slave_sql) that allocates a THD handle whose
      constructor acquires LOCK_global_system_variables in THD::init.
      
      The solution is to unlock LOCK_global_system_variables before the
      replication filtering options are set or read. This way the lock
      order is preserved and the data being read/set is still protected
      given that it acquires LOCK_active_mi.
      47929af5
  14. 22 Jun, 2012 1 commit
    • unknown's avatar
      MDEV-225: Replace with dummy events an event that is not understood by a slave... · 9fe317ff
      unknown authored
      MDEV-225: Replace with dummy events an event that is not understood by a slave to which it should be sent
      
      Add function to replace arbitrary event with dummy event.
      
      Add code which uses this to fix the bug that enabling row_annotate events
      on the master breaks slaves which do not request such events.
      
      Add that slaves set a variable @mariadb_slave_capability to inform the
      master in a robust way about which events it can, and cannot, handle.
      
      Add tests.
      
      9fe317ff
  15. 31 May, 2012 1 commit
    • Michael Widenius's avatar
      Increased the version number to 10.0 · 83c02f32
      Michael Widenius authored
      - Fixed code that was not ready for a major version number > 9
      - Fixed test cases that assumed max major version number could be 9
      Updated version number for depricated options (will be removed in a later commit)
      
      VERSION:
        Version number 10.0.0
      client/mysqlbinlog.cc:
        Added support for major version numbers > 9
      cmake/mysql_version.cmake:
        Added support for version numbers that is 0
      mysql-test/r/comments.result:
        Modified test to handle version number 100000
      mysql-test/r/func_system.result:
        Modified test to handle version number 100000
      mysql-test/r/log_state.result:
        Updated depricated error message
      mysql-test/r/sp.result:
        Modified test to handle version number 100000
      mysql-test/r/subselect4.result:
        Updated depricated error message
      mysql-test/r/variables.result:
        Updated depricated error message
      mysql-test/suite/rpl/r/rpl_conditional_comments.result:
        Modified test to handle version number 100000
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
        Modified test to handle version number 100000
      mysql-test/suite/rpl/t/rpl_conditional_comments.test:
        Modified test to handle version number 100000
      mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
        Modified test to handle version number 100000
      mysql-test/suite/sys_vars/r/debug_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/log_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/log_slow_queries_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/multi_range_count_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/sql_big_selects_func.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result:
        Updated depricated error message
      mysql-test/suite/sys_vars/r/sql_max_join_size_func.result:
        Updated depricated error message
      mysql-test/t/comments.test:
        Modified test to handle version number 100000
      mysql-test/t/file_contents.test:
        Modified test to handle version number 100000
      mysql-test/t/func_system.test:
        Modified test to handle version number 100000
      mysql-test/t/parser_not_embedded.test:
        Modified test to handle version number 100000
      mysql-test/t/sp.test:
        Modified test to handle version number 100000
      sql/mysqld.cc:
        Updated version number for depricated options (will be removed in a later commit)
      sql/slave.cc:
        Modified test to handle version number 100000
        Better error messages
      sql/sql_lex.cc:
        Modified test to handle version number 100000 in comment syntax
      sql/sys_vars.cc:
        Updated version number for depricated options (will be removed in a later commit)
      83c02f32
  16. 21 May, 2012 1 commit
    • Manish Kumar's avatar
      BUG#12400221 - 60926: BINARY LOG EVENTS LARGER THAN MAX_ALLOWED_PACKET · 1605b7f6
      Manish Kumar authored
      Problem
      ========
                  
      SQL statements close to the size of max_allowed_packet produce binary
      log events larger than max_allowed_packet.
                    
      The reason why this failure is occuring is because the event length is
      more than the total size of the max_allowed_packet + max_event_header
      length. Now since the event length exceeds this size master Dump
      thread is unable to send the packet on to the slave.
                            
      That can happen e.g with row-based replication in Update_rows event.
                  
      Fix
      ====
                
      The problem was fixed by increasing the max_allowed_packet for the
      slave's threads (IO/SQL) by increasing it to 1GB.
      This is done using the new server option included which is used to
      regulate the max_allowed_packet of the slave thread (IO/SQL).
      This causes the large packets to be received by the slave and apply
      it successfully.
      
      sql/log_event.h:
        Added the new option in the log_event.h file.
      sql/mysqld.cc:
        Added a new option to the server.
      sql/slave.cc:
        Increasing the session max_allowed_packet to a large value ,
        i.e. not taking global(max_allowed) into consideration, for the slave's threads.
      1605b7f6
  17. 18 May, 2012 1 commit
  18. 17 May, 2012 1 commit
    • Gopal Shankar's avatar
      Bug#12636001 : deadlock from thd_security_context · 21faded5
      Gopal Shankar authored
      PROBLEM:
      Threads end-up in deadlock due to locks acquired as described
      below,
      
      con1: Run Query on a table. 
        It is important that this SELECT must back-off while
        trying to open the t1 and enter into wait_for_condition().
        The SELECT then is blocked trying to lock mysys_var->mutex
        which is held by con3. The very significant fact here is
        that mysys_var->current_mutex will still point to LOCK_open,
        even if LOCK_open is no longer held by con1 at this point.
      
      con2: Try dropping table used in con1 or query some table.
        It will hold LOCK_open and be blocked trying to lock
        kernel_mutex held by con4.
      
      con3: Try killing the query run by con1.
        It will hold THD::LOCK_thd_data belonging to con1 while
        trying to lock mysys_var->current_mutex belonging to con1.
        But current_mutex will point to LOCK_open which is held
        by con2.
      
      con4: Get innodb engine status
        It will hold kernel_mutex, trying to lock THD::LOCK_thd_data
        belonging to con1 which is held by con3.
      
      So while technically only con2, con3 and con4 participate in the
      deadlock, con1's mysys_var->current_mutex pointing to LOCK_open
      is a vital component of the deadlock.
      
      CYCLE = (THD::LOCK_thd_data -> LOCK_open ->
               kernel_mutex -> THD::LOCK_thd_data)
      
      FIX:
      LOCK_thd_data has responsibility of protecting,
      1) thd->query, thd->query_length
      2) VIO
      3) thd->mysys_var (used by KILL statement and shutdown)
      4) THD during thread delete.
      
      Among above responsibilities, 1), 2)and (3,4) seems to be three
      independent group of responsibility. If there is different LOCK
      owning responsibility of (3,4), the above mentioned deadlock cycle
      can be avoid. This fix introduces LOCK_thd_kill to handle
      responsibility (3,4), which eliminates the deadlock issue.
      
      Note: The problem is not found in 5.5. Introduction MDL subsystem 
      caused metadata locking responsibility to be moved from TDC/TC to
      MDL subsystem. Due to this, responsibility of LOCK_open is reduced. 
      As the use of LOCK_open is removed in open_table() and 
      mysql_rm_table() the above mentioned CYCLE does not form.
      Revision ID for changes,
      open_table() = dlenev@mysql.com-20100727133458-m3ua9oslnx8fbbvz
      mysql_rm_table() = jon.hauglid@oracle.com-20101116100012-kxep9txz2fxy3nmw
      
      21faded5
  19. 20 Apr, 2012 1 commit
    • 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
  20. 13 Apr, 2012 1 commit
  21. 28 Mar, 2012 1 commit
  22. 12 Mar, 2012 1 commit
    • Luis Soares's avatar
      BUG#12400313 RELAY_LOG_SPACE_LIMIT IS NOT WORKING IN MANY CASES · 4a6c4d86
      Luis Soares authored
      BUG#64503: mysql frequently ignores --relay-log-space-limit
      
      When the SQL thread goes to sleep, waiting for more events, it sets
      the flag ignore_log_space_limit to true. This gives the IO thread a
      chance to queue some more events and ultimately the SQL thread will be
      able to purge the log once it is rotated. By then the SQL thread
      resets the ignore_log_space_limit to false. However, between the time
      the SQL thread has set the ignore flag and the time it resets it, the
      IO thread will be queuing events in the relay log, possibly going way
      over the limit.
      
      This patch makes the IO and SQL thread to synchronize when they reach
      the space limit and only ask for one event at a time. Thus the SQL
      thread sets ignore_log_space_limit flag and the IO thread resets it to
      false everytime it processes one more event. In addition, everytime
      the SQL thread processes the next event, and the limit has been
      reached, it checks if the IO thread should rotate. If it should, it
      instructs the IO thread to rotate, giving the SQL thread a chance to
      purge the logs (freeing space). Finally, this patch removes the
      resetting of the ignore_log_space_limit flag from purge_first_log,
      because this is now reset by the IO thread every time it processes the
      next event when the limit has been reached.
      
      If the SQL thread is in a transaction, it cannot purge so, there is no
      point in asking the IO thread to rotate. The only thing it can do is
      to ask for more events until the transaction is over (then it can ask
      the IO to rotate and purge the log right away). Otherwise, there would
      be a deadlock (SQL would not be able to purge and IO thread would not
      be able to queue events so that the SQL would finish the transaction).
      4a6c4d86
  23. 13 Feb, 2012 1 commit
    • unknown's avatar
      When we fail during slave thread initialisation, keep mi->run_lock · 27dfa45e
      unknown authored
      locked until we have finished clean up.
      
      Previously, the code released the lock without marking that the thread
      was running. This allowed a new slave thread to start while the old one
      was still in the middle of cleaning up, causing assertions and probably
      general mayhem.
      27dfa45e
  24. 23 Jan, 2012 1 commit
    • Manish Kumar's avatar
      BUG#11752315 - 43460: STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS TRYING TO RECONNECT TO · e69da6dc
      Manish Kumar authored
      Problem : The basic problem is the way the thread sleeps in mysql-5.5 and also in mysql-5.1
                when we execute a stop slave on windows platform.
                On windows platform if the stop slave is executed after the master dies, we have 
                this long wait before the stop slave return a value. This is because there is a 
                sleep of the thread. The sleep is uninterruptable in the two above version,
                which was fixed by Davi patch for the BUG#11765860 for mysql-trunk. Backporting 
                his patch for mysql-5.5 fixes the problem. 
      
      Solution : A new pair of mutex and condition variable is introduced to synchronize thread 
                 sleep and finalization. A new mutex is required because the slave threads are 
                 terminated while holding the slave thread locks (run_lock), which can not be 
                 relinquished during termination as this would affect the lock order.
      
      mysql-test/suite/rpl/r/rpl_start_stop_slave.result:
        The result file associated with the test added.
      mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
        A test to check the new functionality.
      sql/rpl_mi.cc:
        The constructor using the new mutex and condition variables for the master_info.
      sql/rpl_mi.h:
        The condition variable and mutex have been added for the master_info.
      sql/rpl_rli.cc:
        The constructor using the new mutex and condition variables for the realy_log_info.
      sql/rpl_rli.h:
        The condition variable and mutex have been added for the relay_log_info.
      sql/slave.cc:
        Use a timed wait on a condition variable to implement a interruptible sleep. 
        The wait is registered with the THD object so that the thread will be woken 
        up if killed.
      e69da6dc
  25. 14 Dec, 2011 1 commit
    • unknown's avatar
      After-merge fixes for 5.5 merge. · 79479ee9
      unknown authored
      Fix typo causing too low timeout value for wait_for_slave_param.inc.
      Fix binlog checksums following 5.5 merge.
      Make sure the rpl suite can run with --mysqld=--binlog-checksum=CRC32
      Fix a number of problems in the code when checksums are enabled.
      79479ee9
  26. 29 Nov, 2011 2 commits
    • Michael Widenius's avatar
      Fixed compiler warnings · 47575bd0
      Michael Widenius authored
      dbug/tests.c:
        Added __attribute__((unused)) to get rid of compiler warning
      server-tools/instance-manager/guardian.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/filesort.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/slave.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/sql_load.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/sql_table.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/maria/ma_blockrec.c:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/maria/ma_check.c:
        Added missing cast
      storage/maria/ma_loghandler.c:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/maria/ma_recovery.c:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/pbxt/src/cache_xt.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/xtradb/fil/fil0fil.c:
        Removed not used variable
      storage/xtradb/handler/ha_innodb.cc:
        Use unused variable
      vio/viosocket.c:
        Remove usage of not used variable
      vio/viosslfactories.c:
        Added cast
      47575bd0
    • Andrei Elkin's avatar
  27. 24 Nov, 2011 1 commit
    • Luis Soares's avatar
      BUG#13427949: CHANGE MASTER TO USER='' (EMPTY USER) CAUSES ERRORS ON VALGRING · 4b157e15
      Luis Soares authored
        
      When passing an empty user to the connect function will cause
      valgrind warnings. Seems that the client code is not prepared 
      to handle empty users. On 5.6 this can even be triggered by 
      START SLAVE PASSWORD='...'; i.e., without setting USER='...' on
      the START SLAVE command (see WL#4143 for details on the new
      additional START SLAVE commands).
        
      To fix this, we disallow empty users when configuring the slave
      connection parameters (this decision might be revisited if the 
      client code accepts empty users in the future).
      
      sql/slave.cc:
        We throw an error if an empty user is supplied to the connection 
        function.
      4b157e15
  28. 19 Oct, 2011 2 commits
  29. 27 Sep, 2011 1 commit
  30. 23 Sep, 2011 1 commit
  31. 22 Sep, 2011 1 commit
    • Michael Widenius's avatar
      Added new options to KILL. New syntax is KILL [HARD|SOFT] [CONNECTION|QUERY] [ID | USER user_name] · 22e79363
      Michael Widenius authored
      - If USER is given, all threads for that user is signaled
      - If SOFT is used then the KILL will not be sent to the handler. This can be used to not interrupt critical things in the handler like 'REPAIR'.
      
      Internally added more kill signals. This gives us more information of why a query/connection was killed.
      - KILL_SERVER is used when server is going down. In this case the users gets ER_SHUTDOWN as the reason connection was killed.
      - Changed signals to number in correct order, which makes it easier to test how the signal should affect the code.
      - New error message ER_CONNECTION_KILLED if connection was killed by 'KILL CONNECTION'. Before we got error ER_SHUTDOWN.
      
      Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server
      
      
      include/mysql.h.pp:
        Updated file
      include/mysql_com.h:
        Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server
      mysql-test/r/kill.result:
        Added test of KILL USER
      mysql-test/suite/rpl/r/rpl_stm_000001.result:
        Updated error code
      mysql-test/suite/rpl/t/rpl_stm_000001.test:
        Updated error codes
      mysql-test/t/flush_read_lock_kill.test:
        Updated error codes
      mysql-test/t/kill.test:
        Added test of KILL USER
      plugin/handler_socket/handlersocket/database.cpp:
        Removed THD:: from KILL
      sql/debug_sync.cc:
        Removed THD:: from KILL
      sql/event_scheduler.cc:
        Removed THD:: from KILL
      sql/filesort.cc:
        Removed THD:: from KILL
      sql/ha_ndbcluster_binlog.cc:
        Removed THD:: from KILL
      sql/handler.cc:
        Removed THD:: from KILL
        Simplify code.
      sql/lex.h:
        Added new keywords HARD | SOFT
      sql/log.cc:
        Removed THD:: from KILL
        Added testing of new error ER_CONNECTION_KILLED
      sql/log_event.cc:
        Removed THD:: from KILL
        Added testing of new error ER_CONNECTION_KILLED
      sql/mysql_priv.h:
        Added new prototypes
      sql/mysqld.cc:
        Removed THD:: from KILL
        Use KILL_SERVER_HARD signal on shutdown.
      sql/scheduler.cc:
        Removed THD:: from KILL
        Simplify test if connection should be killed
      sql/share/errmsg.txt:
        New error message ER_CONNECTION_KILLED
      sql/slave.cc:
        Removed THD:: from KILL
      sql/sp_head.cc:
        Removed THD:: from KILL
      sql/sql_base.cc:
        Removed THD:: from KILL
      sql/sql_cache.cc:
        Removed THD:: from KILL
      sql/sql_class.cc:
        Removed THD:: from KILL
        Added killed_errno()
        Only signal kill to storage engine if HARD bit is set.
      sql/sql_class.h:
        Move KILL options out from THD to make them easier to use in sql_yacc.yy
      sql/sql_connect.cc:
        Removed THD:: from KILL
      sql/sql_delete.cc:
        Removed THD:: from KILL
      sql/sql_error.cc:
        Removed THD:: from KILL
      sql/sql_insert.cc:
        Removed THD:: from KILL
        Simplifed testing if thread is killed.
      sql/sql_lex.h:
        Added kill options to st_lex
      sql/sql_load.cc:
        Removed THD:: from KILL
      sql/sql_parse.cc:
        Added kill options to st_lex
        Simplifed and optimzed testing of thd->killed at end of query
        Added support for KILL USER
        Extended sql_kill() to allow use of more kill signals.
      sql/sql_repl.cc:
        Removed THD:: from KILL
      sql/sql_show.cc:
        Removed THD:: from KILL
        Simplied testing if query/connection was killed
      sql/sql_table.cc:
        Removed THD:: from KILL
      sql/sql_update.cc:
        Removed THD:: from KILL
      sql/sql_yacc.yy:
        Added support for new KILL syntax: KILL [HARD|SOFT] [CONNECTION|QUERY] [ID | USER user_name]
      storage/archive/ha_archive.cc:
        Simplify compilation
      storage/maria/ha_maria.cc:
        Removed THD:: from KILL
      22e79363
  32. 14 Sep, 2011 1 commit
    • Rafal Somla's avatar
      Bug#12897501 REPLICATION DOES NOT SUPPORT WINDOWS AUTH PLUG-IN · 93f2daf3
      Rafal Somla authored
      Connection of slave to master using a replication account which authenticates
      with an external plugin was not possible.
      
      Fixed by making sure that the CLIENT_PLUGIN_AUTH capability is set when client connects using mysql_real_connect(). Also, a plugin-dir path used by client library to locate authentication plugins is set based on the analogous server setting. This is done in connect_to_master() function before a call to mysql_real_connect().
      93f2daf3
  33. 09 Sep, 2011 1 commit
    • Michael Widenius's avatar
      Fixed that automatic killing of delayed insert thread (in flush, alter table... · 8fb10c24
      Michael Widenius authored
      Fixed that automatic killing of delayed insert thread (in flush, alter table etc) will not abort auto-repair of MyISAM table.
      Give more information when finding an error in a MyISAM table.
      When killing system thread, use KILL_SYSTEM_THREAD instead of KILL_CONNECTION to make it easier to ignore the signal in sensitive context (like auto-repair)
      Added new kill level: KILL_SERVER that will in the future to be used to signal killed by shutdown.
      Add more warnings about killed connections when warning level > 3
      
      include/myisamchk.h:
        Added counting of printed info/notes
      mysys/mf_iocache.c:
        Remove duplicate assignment
      sql/handler.cc:
        Added test of KILL_SERVER
      sql/log.cc:
        Ignore new 'kill' error ER_NEW_ABORTING_CONNECTION when requesting query error code.
      sql/mysqld.cc:
        Add more warnings for killed connections when warning level > 3
      sql/scheduler.cc:
        Added checks for new kill signals
      sql/slave.cc:
        Ignore new kill signal ER_NEW_ABORTING_CONNECTION
      sql/sp_head.cc:
        Fixed assignment to bool
        Added testing of new kill signals
      sql/sql_base.cc:
        Use KILL_SYSTEM_THREAD to auto-kill system threads
      sql/sql_class.cc:
        Add more warnings for killed connections when warning level > 3
        thd_killed() now ignores KILL_BAD_DATA and THD::KILL_SYSTEM_THREAD as these should not abort sensitive operations.
      sql/sql_class.h:
        Added KILL_SYSTEM_THREAD and KILL_SERVER
      sql/sql_connect.cc:
        Added handling of KILL_SERVER
      sql/sql_insert.cc:
        Use KILL_SYSTEM_THREAD to auto-kill system threads
        Added handling of KILL_SERVER
      sql/sql_parse.cc:
        Add more warnings for killed connections when warning level > 3
        Added checking that thd->abort_on_warning is reset at end of query.
      sql/sql_show.cc:
        Update condition for when a query is 'killed'
      storage/myisam/ha_myisam.cc:
        Added counting of info/notes printed
      storage/myisam/mi_check.c:
        Always print an an error if we find data errors when checking/repairing a MyISAM table.
        When a repair was killed, don't retry repair.
        Added assert if sort_get_next_record() returned an error without an error message.
        Removed nonsence check "if (sort_param->read_cache.error < 0)" in repair.
      storage/myisam/myisamchk.c:
        Added counting of notes printed
      storage/pbxt/src/thread_xt.cc:
        Better error message.
      8fb10c24
  34. 26 Aug, 2011 1 commit
    • Rohit Kalhans's avatar
      BUG#11878104: FIXES OF BUG 11752963 - 44312 TO BACKPORT TO MYSQL-5.1 · e46b3453
      Rohit Kalhans authored
      Background: Backporting fix for BUG 11752963 to Mysql5.1 branch.
      Problem: Fix of bug 11752963 was only available for trunk and 5.5 branch.
      Partial fix has been pushed to 5.1 branch as well. 
      Fix: backporting the fixes of bug 11752963 to 5.1 branch. 
      1. Made all major changes to make 5.1 branch in line with 5.5 and the trunk.
      2. skipped the partial patch that was already applied to the 5.1 branch. 
      
      sql/rpl_rli.h:
        Made inited Volatile (find inline comments)
      sql/slave.cc:
        backported all changes from the fix of BUG#11752963.
      e46b3453
  35. 16 Aug, 2011 1 commit
  36. 12 Aug, 2011 1 commit