You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.8 KiB

26 years ago
22 years ago
26 years ago
26 years ago
22 years ago
26 years ago
26 years ago
Manual merge of patch for Bug#46364 from mysql-next-mr-bugfixing. Conflicts: - mysql-test/r/mysqld--help-win.result - sql/sys_vars.cc Original revsion (in next-mr-bugfixing): ------------------------------------------------------------ revno: 2971 [merge] revision-id: alfranio.correia@sun.com-20100121210527-rbuheu5rnsmcakh1 committer: Alfranio Correia <alfranio.correia@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-01-21 21:05:27 +0000 message: BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default. ------------------------------------------------------------ revno: 2970.1.1 revision-id: alfranio.correia@sun.com-20100121131034-183r4qdyld7an5a0 parent: alik@sun.com-20100121083914-r9rz2myto3tkdya0 committer: Alfranio Correia <alfranio.correia@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-01-21 13:10:34 +0000 message: BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default.
16 years ago
26 years ago
26 years ago
26 years ago
  1. # Example MySQL config file for small systems.
  2. #
  3. # This is for a system with little memory (<= 64M) where MySQL is only used
  4. # from time to time and it's important that the mysqld daemon
  5. # doesn't use much resources.
  6. #
  7. # MySQL programs look for option files in a set of
  8. # locations which depend on the deployment platform.
  9. # You can copy this option file to one of those
  10. # locations. For information about these locations, see:
  11. # http://dev.mysql.com/doc/mysql/en/option-files.html
  12. #
  13. # In this file, you can use all long options that a program supports.
  14. # If you want to know which options a program supports, run the program
  15. # with the "--help" option.
  16. # The following options will be passed to all MySQL clients
  17. [client]
  18. #password = your_password
  19. port = @MYSQL_TCP_PORT@
  20. socket = @MYSQL_UNIX_ADDR@
  21. # Here follows entries for some specific programs
  22. # The MySQL server
  23. [mysqld]
  24. port = @MYSQL_TCP_PORT@
  25. socket = @MYSQL_UNIX_ADDR@
  26. skip-external-locking
  27. key_buffer_size = 16K
  28. max_allowed_packet = 1M
  29. table_open_cache = 4
  30. sort_buffer_size = 64K
  31. read_buffer_size = 256K
  32. read_rnd_buffer_size = 256K
  33. net_buffer_length = 2K
  34. thread_stack = 128K
  35. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  36. # if all processes that need to connect to mysqld run on the same host.
  37. # All interaction with mysqld must be made via Unix sockets or named pipes.
  38. # Note that using this option without enabling named pipes on Windows
  39. # (using the "enable-named-pipe" option) will render mysqld useless!
  40. #
  41. #skip-networking
  42. server-id = 1
  43. # Uncomment the following if you want to log updates
  44. #log-bin=mysql-bin
  45. # binary logging format - mixed recommended
  46. #binlog_format=mixed
  47. # Causes updates to non-transactional engines using statement format to be
  48. # written directly to binary log. Before using this option make sure that
  49. # there are no dependencies between transactional and non-transactional
  50. # tables such as in the statement INSERT INTO t_myisam SELECT * FROM
  51. # t_innodb; otherwise, slaves may diverge from the master.
  52. #binlog_direct_non_transactional_updates=TRUE
  53. # Uncomment the following if you are using InnoDB tables
  54. #innodb_data_home_dir = @localstatedir@
  55. #innodb_data_file_path = ibdata1:10M:autoextend
  56. #innodb_log_group_home_dir = @localstatedir@
  57. # You can set .._buffer_pool_size up to 50 - 80 %
  58. # of RAM but beware of setting memory usage too high
  59. #innodb_buffer_pool_size = 16M
  60. #innodb_additional_mem_pool_size = 2M
  61. # Set .._log_file_size to 25 % of buffer pool size
  62. #innodb_log_file_size = 5M
  63. #innodb_log_buffer_size = 8M
  64. #innodb_flush_log_at_trx_commit = 1
  65. #innodb_lock_wait_timeout = 50
  66. [mysqldump]
  67. quick
  68. max_allowed_packet = 16M
  69. [mysql]
  70. no-auto-rehash
  71. # Remove the next comment character if you are not familiar with SQL
  72. #safe-updates
  73. [myisamchk]
  74. key_buffer_size = 8M
  75. sort_buffer_size = 8M
  76. [mysqlhotcopy]
  77. interactive-timeout