-
Christian Heusel authored
With the 11.6.2 release mariadb has made snapshot isolation a default setting which recently caused issues on the AUR and the Forums, where the respective database engines would fail due to the table changing since the last time they read it: PHP Fatal error: Uncaught mysqli_sql_exception: Record has changed since last read in table 'fluxbb_online' in /srv/http/fluxbb/include/dblayer/mysqli_innodb.php:79 Stack trace: #0 /srv/http/fluxbb/include/dblayer/mysqli_innodb.php(79): mysqli_query() #1 /srv/http/fluxbb/include/functions.php(485): DBLayer->query() #2 /srv/http/fluxbb/include/common.php(162): update_users_online() #3 /srv/http/fluxbb/viewtopic.php(10): require('...') #4 {main} We therefore introduce a config switch to restore the old behavior and apply the changed setting on the two services. Link: https://mariadb.com/kb/en/mariadb-11-6-2-release-notes/#innodb Link: https://bbs.archlinux.org/viewtopic.php?id=301802 Link: aurweb#525 Signed-off-by:
Christian Heusel <christian@heusel.eu>
Christian Heusel authoredWith the 11.6.2 release mariadb has made snapshot isolation a default setting which recently caused issues on the AUR and the Forums, where the respective database engines would fail due to the table changing since the last time they read it: PHP Fatal error: Uncaught mysqli_sql_exception: Record has changed since last read in table 'fluxbb_online' in /srv/http/fluxbb/include/dblayer/mysqli_innodb.php:79 Stack trace: #0 /srv/http/fluxbb/include/dblayer/mysqli_innodb.php(79): mysqli_query() #1 /srv/http/fluxbb/include/functions.php(485): DBLayer->query() #2 /srv/http/fluxbb/include/common.php(162): update_users_online() #3 /srv/http/fluxbb/viewtopic.php(10): require('...') #4 {main} We therefore introduce a config switch to restore the old behavior and apply the changed setting on the two services. Link: https://mariadb.com/kb/en/mariadb-11-6-2-release-notes/#innodb Link: https://bbs.archlinux.org/viewtopic.php?id=301802 Link: aurweb#525 Signed-off-by:
Christian Heusel <christian@heusel.eu>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
server.cnf.j2 2.12 KiB
[client]
port = 3306
socket = /run/mysqld/mysqld.sock
[mysqld]
bind_address = localhost
port = 3306
socket = /run/mysqld/mysqld.sock
skip-external-locking
{% if mariadb_skip_name_resolve %}
skip-name-resolve
{% endif %}
{% if mariadb_skip_networking %}
skip-networking
{% endif %}
# Memory settings
key_buffer_size = {{ mariadb_key_buffer_size }}
max_allowed_packet = {{ mariadb_max_allowed_packet }}
table_open_cache = {{ mariadb_table_open_cache }}
sort_buffer_size = {{ mariadb_sort_buffer_size }}
net_buffer_length = {{ mariadb_net_buffer_length }}
read_buffer_size = {{ mariadb_read_buffer_size }}
read_rnd_buffer_size = {{ mariadb_read_rnd_buffer_size }}
myisam_sort_buffer_size = {{ mariadb_myisam_sort_buffer_size }}
max_connections = {{ mariadb_max_connections }}
thread_cache_size = {{ mariadb_thread_cache_size }}
userstat = 1
# Query cache settings
query_cache_type = {{ mariadb_query_cache_type }}
query_cache_limit = {{ mariadb_query_cache_limit }}
{% if mariadb_query_cache_type == '0' %}
query_cache_size = 0
{% else %}
query_cache_size = {{ mariadb_query_cache_size }}
{% endif %}
# Single server setup
server-id = 1
# InnoDB settings
innodb_data_file_path = {{ mariadb_innodb_data_file_path }}
innodb_buffer_pool_size = {{ mariadb_innodb_buffer_pool_size }}
innodb_log_file_size = {{ mariadb_innodb_log_file_size }}
innodb_log_buffer_size = {{ mariadb_innodb_log_buffer_size }}
innodb_flush_log_at_trx_commit = {{ mariadb_innodb_flush_log_at_trx_commit }}
innodb_stats_sample_pages = {{ mariadb_innodb_stats_sample_pages }}
innodb_thread_concurrency = {{ mariadb_innodb_thread_concurrency }}
{% if mariadb_innodb_file_per_table %}
innodb_file_per_table
{% endif %}
{% if mariadb_innodb_disable_snapshot_isolation is defined and mariadb_innodb_disable_snapshot_isolation %}
# changed to default from OFF to ON with 11.6.2 https://mariadb.com/kb/en/mariadb-11-6-2-release-notes/
innodb_snapshot_isolation = OFF
{% endif %}
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout