Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Unified Data IO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Utils
FACT Unified Data IO
Commits
bd39d88d
Commit
bd39d88d
authored
11 months ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
fixing MySQL duration and size parameters
parent
9a67bf15
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utilsDB.jl
+3
-4
3 additions, 4 deletions
src/utilsDB.jl
with
3 additions
and
4 deletions
src/utilsDB.jl
+
3
−
4
View file @
bd39d88d
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment