diff --git a/contrib/dbaas-mycnf/builddeb.sh b/contrib/dbaas-mycnf/builddeb.sh index e82eb994d9..9bc3acc6d6 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 6116018bac..8993648b29 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 a5e311dc60..8163027c45 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 47df9d6b0c..9340d6102c 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 a0333a92af..366dbf7c25 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 965593306c..0be154812f 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 1fd9cb6f9f..426ccbcc23 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 df555e2bd8..b3e66a9e2e 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 95490ba3ff..751307e4c3 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 2f9400bf8f..d2a35c1d15 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 3f7fc3d719..38c58e205e 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 cc7b69d75c..d5f120bf80 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