mattiabasone / tuning-primer

MySQL performance tuning primer script (with MariaDB patch)
GNU General Public License v2.0
69 stars 37 forks source link

No InnoDB Support Enabled! #5

Open jabodk opened 6 years ago

jabodk commented 6 years ago

Found this script reading https://haydenjames.io/mysql-performance-tuning-tips-scripts-tools/ and everything seams to work great except, it complaints about InnoDB Support.

Im running MariaDB 10.2 and for some reason it does not evaluate the regex correctly, instead i get the following output.

./tuning-primer.sh: 1280: ./tuning-primer.sh: [[: not found No InnoDB Support Enabled!

If i change line 1280 from elif [[ $major_version = 10* ]] ; then to elif echo "$major_version" | grep -qe '10.*' ; then

InnoDB is shown as it should.

slarti-b commented 6 years ago

Try elif [[ $major_version =~ 10* ]] ; then

it works for me as-is, but can be shell dependent

mattiabasone commented 6 years ago

Try with @slarti-b fix and let me know if it works.

P.s I'm using sh (tcsh on FreeBSD) and it works as-is and with @slarti-b fix.

slarti-b commented 6 years ago

I'm using bash on centos and on cygwin, and both the original and my fix work (I just tried the if-block tot est) but i think the fix I propose is more portable. Otherwise, what shell?

jabodk commented 6 years ago

I tried the fix suggested by @slarti-b , but with the same result:

./tuning-primer.sh: 1280: ./tuning-primer.sh: [[: not found

Im GNU bash, version 4.3.42(1)-release (x86_64-pc-linux-gnu) on a Ubuntu 16.04 LTS But anyway, it works with: elif echo "$major_version" | grep -qe '10.*' ; then

anonymiz commented 6 years ago

will be support for MySQL version 5.5.56-MariaDB

ianw1974 commented 6 years ago

I had to make two changes to the script. The first changing

#!/bin/sh

to:

#!/bin/bash

and then the change noted by @slarti-b then for me innodb support works, and the error isn't generated. On Debian 9.