summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNirmal Ranganathan <rnirmal@gmail.com>2012-06-17 12:36:41 -0500
committerNirmal Ranganathan <rnirmal@gmail.com>2012-06-18 10:42:55 -0500
commit46108e36f1230248c44e24aacbeebed51030d52a (patch)
tree4108838a0982310e8965bb5af6d3bc4d7fd8080d /contrib
parent3380bbb738333d9a7ef31a087ecc1d380021647a (diff)
downloadtrove-46108e36f1230248c44e24aacbeebed51030d52a.tar.gz
Disabling local-infile in my.cnf
Adding max_user_connections and updating max_connections to +10 of user_connections.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/dbaas-mycnf/builddeb.sh7
-rw-r--r--contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst6
-rw-r--r--contrib/dbaas-mycnf/etc/my.cnf.base3
-rw-r--r--contrib/dbaas-mycnf/etc/my.cnf.default5
-rwxr-xr-xcontrib/dbaas-mycnf/test/build_templates.sh7
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.16G5
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.1G5
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.2G5
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.32G5
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.4G5
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.512M5
-rw-r--r--contrib/dbaas-mycnf/test/etc/my.cnf.8G5
12 files changed, 52 insertions, 11 deletions
diff --git a/contrib/dbaas-mycnf/builddeb.sh b/contrib/dbaas-mycnf/builddeb.sh
index e82eb994..9bc3acc6 100755
--- a/contrib/dbaas-mycnf/builddeb.sh
+++ b/contrib/dbaas-mycnf/builddeb.sh
@@ -35,7 +35,12 @@ for i in "${MEMSIZE[@]}"; do
cat ../etc/my.cnf.base | while read line; do
if [[ `expr "$line" : ".*{.*}"` != "0" ]]; then
oldval=`echo $line | sed -e 's/.*{\(.*\)}.*/\1/'`
- newval=`echo "$oldval * $multiplier" | bc`
+ prop=`echo $line | sed -e 's/^\(.*\) = {100}/\1/'`
+ if [[ $prop == "max_connections" ]]; then
+ newval=`echo "($oldval * $multiplier) + 10" | bc`
+ else
+ newval=`echo "$oldval * $multiplier" | bc`
+ fi
line=`echo $line | sed -e "s/{$oldval}/$newval/"`
fi
echo $line >> etc/my.cnf.$key
diff --git a/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst b/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst
index 6116018b..8993648b 100644
--- a/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst
+++ b/contrib/dbaas-mycnf/debian/dbaas-mycnf.postinst
@@ -25,7 +25,11 @@ if [ -e "$MYSQL_CONF_DIR/my.cnf.base" ]; then
cat $MYSQL_CONF_DIR/my.cnf.base | while read line; do
if [[ `expr "$line" : ".*{.*}"` != "0" ]]; then
oldval=`echo $line | sed -e 's/.*{\(.*\)}.*/\1/'`
- newval=`echo "$oldval * $multiplier" | bc`
+ if [[ $prop == "max_connections" ]]; then
+ newval=`echo "($oldval * $multiplier) + 10" | bc`
+ else
+ newval=`echo "$oldval * $multiplier" | bc`
+ fi
line=`echo $line | sed -e "s/{$oldval}/$newval/"`
fi
echo $line >> $MYSQL_CONF_DIR/my.cnf.default.tmp
diff --git a/contrib/dbaas-mycnf/etc/my.cnf.base b/contrib/dbaas-mycnf/etc/my.cnf.base
index a5e311dc..8163027c 100644
--- a/contrib/dbaas-mycnf/etc/my.cnf.base
+++ b/contrib/dbaas-mycnf/etc/my.cnf.base
@@ -132,6 +132,7 @@ table_definition_cache = {256}
open_files_limit = {512}
# Connections limit
+max_user_connections = {100}
max_connections = {100}
# Default Storage Engine
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/etc/my.cnf.default b/contrib/dbaas-mycnf/etc/my.cnf.default
index 47df9d6b..9340d610 100644
--- a/contrib/dbaas-mycnf/etc/my.cnf.default
+++ b/contrib/dbaas-mycnf/etc/my.cnf.default
@@ -134,7 +134,8 @@ table_definition_cache = 256
open_files_limit = 512
# Connections limit
-max_connections = 100
+max_user_connections = 100
+max_connections = 110
# Default Storage Engine
default_storage_engine = innodb
@@ -159,6 +160,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/build_templates.sh b/contrib/dbaas-mycnf/test/build_templates.sh
index a0333a92..366dbf7c 100755
--- a/contrib/dbaas-mycnf/test/build_templates.sh
+++ b/contrib/dbaas-mycnf/test/build_templates.sh
@@ -10,7 +10,12 @@ for i in "${MEMSIZE[@]}"; do
cat ../etc/my.cnf.base | while read line; do
if [[ `expr "$line" : ".*{.*}"` != "0" ]]; then
oldval=`echo $line | sed -e 's/.*{\(.*\)}.*/\1/'`
- newval=`echo "$oldval * $multiplier" | bc`
+ prop=`echo $line | sed -e 's/^\(.*\) = {100}/\1/'`
+ if [[ $prop == "max_connections" ]]; then
+ newval=`echo "($oldval * $multiplier) + 10" | bc`
+ else
+ newval=`echo "$oldval * $multiplier" | bc`
+ fi
line=`echo $line | sed -e "s/{$oldval}/$newval/"`
fi
echo $line >> etc/my.cnf.$key
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.16G b/contrib/dbaas-mycnf/test/etc/my.cnf.16G
index 96559330..0be15481 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.16G
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.16G
@@ -132,7 +132,8 @@ table_definition_cache = 8192
open_files_limit = 16384
# Connections limit
-max_connections = 3200
+max_user_connections = 3200
+max_connections = 3210
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.1G b/contrib/dbaas-mycnf/test/etc/my.cnf.1G
index 1fd9cb6f..426ccbcc 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.1G
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.1G
@@ -132,7 +132,8 @@ table_definition_cache = 512
open_files_limit = 1024
# Connections limit
-max_connections = 200
+max_user_connections = 200
+max_connections = 210
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.2G b/contrib/dbaas-mycnf/test/etc/my.cnf.2G
index df555e2b..b3e66a9e 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.2G
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.2G
@@ -132,7 +132,8 @@ table_definition_cache = 1024
open_files_limit = 2048
# Connections limit
-max_connections = 400
+max_user_connections = 400
+max_connections = 410
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.32G b/contrib/dbaas-mycnf/test/etc/my.cnf.32G
index 95490ba3..751307e4 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.32G
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.32G
@@ -132,7 +132,8 @@ table_definition_cache = 16384
open_files_limit = 32768
# Connections limit
-max_connections = 6400
+max_user_connections = 6400
+max_connections = 6410
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.4G b/contrib/dbaas-mycnf/test/etc/my.cnf.4G
index 2f9400bf..d2a35c1d 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.4G
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.4G
@@ -132,7 +132,8 @@ table_definition_cache = 2048
open_files_limit = 4096
# Connections limit
-max_connections = 800
+max_user_connections = 800
+max_connections = 810
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.512M b/contrib/dbaas-mycnf/test/etc/my.cnf.512M
index 3f7fc3d7..38c58e20 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.512M
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.512M
@@ -132,7 +132,8 @@ table_definition_cache = 256
open_files_limit = 512
# Connections limit
-max_connections = 100
+max_user_connections = 100
+max_connections = 110
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick
diff --git a/contrib/dbaas-mycnf/test/etc/my.cnf.8G b/contrib/dbaas-mycnf/test/etc/my.cnf.8G
index cc7b69d7..d5f120bf 100644
--- a/contrib/dbaas-mycnf/test/etc/my.cnf.8G
+++ b/contrib/dbaas-mycnf/test/etc/my.cnf.8G
@@ -132,7 +132,8 @@ table_definition_cache = 4096
open_files_limit = 8192
# Connections limit
-max_connections = 1600
+max_user_connections = 1600
+max_connections = 1610
# Default Storage Engine
default_storage_engine = innodb
@@ -157,6 +158,8 @@ default_storage_engine = innodb
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+# Disable LOAD DATA LOCAL INFILE
+local-infile = 0
[mysqldump]
quick