# ERP5 buildout my.cnf template based on my-huge.cnf shipped with mysql
# The MySQL server
[mysqld]
# ERP5 by default requires InnoDB storage. MySQL by default fallbacks to using
# different engine, like MyISAM. Such behaviour generates problems only, when
# tables requested as InnoDB are silently created with MyISAM engine.
#
# Loud fail is really required in such case.
sql-mode="NO_ENGINE_SUBSTITUTION"

# Workaround for https://bugs.launchpad.net/maria/+bug/985828
# that causes wrong result in Resource_zGetInventoryList etc.
optimizer_switch = derived_merge=off

skip-show-database
%(networking)s
socket = %(socket)s
datadir = %(data_directory)s
pid-file = %(pid_file)s
log-error = %(error_log)s
slow_query_log
slow_query_log_file = %(slow_query_log)s
long_query_time = 1
max_allowed_packet = 128M
query_cache_size = 0
query_cache_type = 0
innodb_file_per_table = 0

plugin-load = ha_mroonga.so;handlersocket.so

# By default only 100 connections are allowed, when using zeo
# we may have much more connections
max_connections = 1000

# The following are important to configure and depend a lot on to the size of
# your database and the available resources.
#innodb_buffer_pool_size = 4G
#innodb_log_file_size = 256M
#innodb_log_buffer_size = 8M

# very important to allow parallel indexing
innodb_locks_unsafe_for_binlog = 1

# Some dangerous settings you may want to uncomment if you only want
# performance or less disk access. Useful for unit tests.
#innodb_flush_log_at_trx_commit = 0
#innodb_flush_method = nosync
#innodb_doublewrite = 0
#sync_frm = 0

%(log_bin)s
%(expire_logs_days)s

# Force utf8 usage
collation_server = utf8_unicode_ci
character_set_server = utf8
skip-character-set-client-handshake

[mysql]
no-auto-rehash
socket = %(socket)s

[mysqlhotcopy]
interactive-timeout
