Commit 83711d96 authored by Julien Muchembled's avatar Julien Muchembled

erp5.mariadb: make long_query_time configurable

parent 087267d3
......@@ -80,6 +80,12 @@
"default": "MariaDB's default",
"type": "integer"
},
"long-query-time": {
"description": "Number of seconds above which long queries are logged",
"minimum": 0,
"default": 1,
"type": "number"
},
"mariadb-relaxed-writes": {
"description": "When enabled, sets innodb_flush_log_at_trx_commit = 0, innodb_flush_method = nosync, innodb_doublewrite = 0 and sync_frm = 0 - RTFM, those options are dangerous",
"default": false,
......
......@@ -171,7 +171,7 @@ context =
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum = a0cd428ebbc6fc1d842156e93d9196be
md5sum = 5b0df06665106f9368a5272d93fe0b5e
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
......@@ -201,7 +201,7 @@ md5sum = c4c42d06c63d33de703fc03415e34d84
[template-my-cnf]
< = download-base
filename = my.cnf.in
md5sum = 47f4adc8aca3e3e17c6e3525a8df6f80
md5sum = aa6f28a5b9602eb034baf6d57d325356
[template-mariadb-initial-setup]
< = download-base
......
......@@ -64,6 +64,7 @@ data-directory = ${directory:mariadb-data}
pid-file = ${directory:run}/mariadb.pid
error-log = ${directory:log}/mariadb_error.log
slow-query-log = ${directory:log}/mariadb_slowquery.log
long-query-time = {{ slapparameter_dict.get('long-query-time', 1) }}
innodb-buffer-pool-size = {{ dumps(slapparameter_dict.get('innodb-buffer-pool-size', 0)) }}
innodb-log-file-size = {{ dumps(slapparameter_dict.get('innodb-log-file-size', 0)) }}
innodb-log-buffer-size = {{ dumps(slapparameter_dict.get('innodb-log-buffer-size', 0)) }}
......
......@@ -27,7 +27,7 @@ pid_file = {{ parameter_dict['pid-file'] }}
log_error = {{ parameter_dict['error-log'] }}
slow_query_log
slow_query_log_file = {{ parameter_dict['slow-query-log'] }}
long_query_time = 1
long_query_time = {{ parameter_dict['long-query-time'] }}
max_allowed_packet = 128M
query_cache_size = 32M
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment