Skip to content

Commit 9dc8beb

Browse files
committed
Fixed debug message. Fixed enabled query optimization
1 parent 1b0db06 commit 9dc8beb

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
const (
12-
ReleemAgentVersion = "1.23.0"
12+
ReleemAgentVersion = "1.23.1"
1313
)
1414

1515
type Config struct {

current_version_agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.23.0
1+
1.23.1

install.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# install.sh - Version 1.23.0
2+
# install.sh - Version 1.23.1
33
# (C) Releem, Inc 2022
44
# All rights reserved
55

@@ -9,7 +9,7 @@ export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
99
# using the package manager.
1010

1111
set -e -E
12-
install_script_version=1.23.0
12+
install_script_version=1.23.1
1313
logfile="/var/log/releem-install.log"
1414

1515
RELEEM_WORKDIR="/opt/releem"
@@ -653,7 +653,9 @@ then
653653

654654
if [ -z "$query_optimization" ]; then
655655
echo "query_optimization=true" | $sudo_cmd tee -a $RELEEM_CONF_FILE
656-
fi
656+
else
657+
$sudo_cmd sed -i 's/query_optimization=.*/query_optimization=true/g' $RELEEM_CONF_FILE
658+
fi
657659

658660
set +e
659661
trap - ERR

metrics/mysql/dbInfo.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,19 @@ func users_security_check(DBInfo *DBInfoGatherer, metrics *models.Metrics) []mod
100100
return output_users
101101
}
102102
}
103-
DBInfo.logger.Info("DEBUG: Password column = ", PASS_COLUMN_NAME)
103+
DBInfo.logger.V(5).Info("DEBUG: Password column = ", PASS_COLUMN_NAME)
104104

105105
var Username, User, Host, Password_As_User string
106106
rows_users, err := models.DB.Query("SELECT CONCAT(QUOTE(user), '@', QUOTE(host)), user, host, (CAST(" + PASS_COLUMN_NAME + " as Binary) = PASSWORD(user) OR CAST(" + PASS_COLUMN_NAME + " as Binary) = PASSWORD(UPPER(user)) ) as Password_As_User FROM mysql.user")
107107
if err != nil || !rows_users.Next() {
108108
if err != nil {
109109
if strings.Contains(err.Error(), "Error 1064 (42000): You have an error in your SQL syntax") {
110-
DBInfo.logger.Info("DEBUG: PASSWORD() function is not supported. Try another query...")
110+
DBInfo.logger.V(5).Info("DEBUG: PASSWORD() function is not supported. Try another query...")
111111
} else {
112112
DBInfo.logger.Error(err)
113113
}
114114
} else {
115-
DBInfo.logger.Info("DEBUG: Plugin validate_password is activated. Try another query...")
115+
DBInfo.logger.V(5).Info("DEBUG: Plugin validate_password is activated. Try another query...")
116116
}
117117
rows_users, err = models.DB.Query("SELECT CONCAT(QUOTE(user), '@', QUOTE(host)), user, host, (CAST(" + PASS_COLUMN_NAME + " as Binary) = CONCAT('*',UPPER(SHA1(UNHEX(SHA1(user))))) OR CAST(" + PASS_COLUMN_NAME + " as Binary) = CONCAT('*',UPPER(SHA1(UNHEX(SHA1(UPPER(user)))))) ) as Password_As_User FROM mysql.user")
118118
if err != nil {
@@ -150,7 +150,7 @@ func users_security_check(DBInfo *DBInfoGatherer, metrics *models.Metrics) []mod
150150
rows_users, err = models.DB.Query("SELECT CONCAT(QUOTE(user), '@', QUOTE(host)) FROM mysql.global_priv WHERE ( user != '' AND JSON_CONTAINS(Priv, '\"mysql_native_password\"', '$.plugin') AND JSON_CONTAINS(Priv, '\"\"', '$.authentication_string') AND NOT JSON_CONTAINS(Priv, 'true', '$.account_locked'))")
151151
if err != nil {
152152
if strings.Contains(err.Error(), "Error 1146 (42S02): Table 'mysql.global_priv' doesn't exist") {
153-
DBInfo.logger.Info("DEBUG: Not MariaDB, try another query...")
153+
DBInfo.logger.V(5).Info("DEBUG: Not MariaDB, try another query...")
154154
} else {
155155
DBInfo.logger.Error(err)
156156
}

mysqlconfigurer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# mysqlconfigurer.sh - Version 1.23.0
2+
# mysqlconfigurer.sh - Version 1.23.1
33
# (C) Releem, Inc 2022
44
# All rights reserved
55

@@ -14,7 +14,7 @@ else
1414
fi
1515

1616
# Variables
17-
VERSION="1.23.0"
17+
VERSION="1.23.1"
1818
RELEEM_CONF_DIR="/opt/releem/conf/"
1919
RELEEM_CONF_FILE="/opt/releem/releem.conf"
2020
RELEEM_DB_VERSION_FILE="${RELEEM_CONF_DIR}db_version"

0 commit comments

Comments
 (0)