Skip to content
Snippets Groups Projects
Commit bd39d88d authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

fixing MySQL duration and size parameters

parent 9a67bf15
No related branches found
No related tags found
No related merge requests found
...@@ -202,10 +202,9 @@ Establish a connection to a MySQL/MariaDB database. ...@@ -202,10 +202,9 @@ Establish a connection to a MySQL/MariaDB database.
""" """
function establish_connection(host::String, user::String, password::String, dbname::String; port::Int=3306) function establish_connection(host::String, user::String, password::String, dbname::String; port::Int=3306)
conn = MySQL.Connection(host, user, password, dbname, port, "nothing") conn = MySQL.Connection(host, user, password, dbname, port, "nothing")
# Temporarily increase max_allowed_packet size_query = "SET GLOBAL max_allowed_packet=1073741824;" # Sets max_allowed_packet to 1GB
size_query = "SET SESSION max_allowed_packet=1073741824;" # Sets max_allowed_packet to 1GB timeout_query = "SET SESSION wait_timeout = 31536000;" # Sets wait_timeout to 1 year
timeout_query = "SET SESSION wait_timeout = 31536000;" # Sets wait_timeout to 1 year maxtime_query = "SET SESSION MAX_STATEMENT_TIME=604800000;" # Sets max_execution_time to 1 week
maxtime_query = "SET SESSION max_execution_time = 604800000;" # Sets max_execution_time to 1 week
try try
# Execute session variable adjustments # Execute session variable adjustments
DBInterface.execute(conn, size_query) DBInterface.execute(conn, size_query)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment