summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-01 00:54:03 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-01 00:54:03 +0100
commit59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5 (patch)
tree3e4a302ccf3912d4d8a40aa271414003bfe7c9b6 /scripts
parentce02738d7f2f2688eeec7004dd6a30293d36044f (diff)
parent6b6d40fa6ca1fe36f2a51c2723c58dfb3fc025bb (diff)
downloadmariadb-git-59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5.tar.gz
5.5 merge
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt9
-rw-r--r--scripts/mysql_install_db.sh8
-rw-r--r--[-rwxr-xr-x]scripts/mysql_secure_installation.pl.in0
-rw-r--r--scripts/mysql_system_tables_data.sql7
-rw-r--r--scripts/mysql_system_tables_fix.sql3
-rw-r--r--[-rwxr-xr-x]scripts/mytop.sh0
6 files changed, 18 insertions, 9 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 76e92899c2a..13aeef6bac0 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -172,6 +172,10 @@ ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysqlbug.sh
${CMAKE_CURRENT_BINARY_DIR}/mysqlbug ESCAPE_QUOTES @ONLY)
+ EXECUTE_PROCESS(
+ COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysqlbug
+ )
+
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/mysqlbug
DESTINATION ${INSTALL_BINDIR}
COMPONENT Server
@@ -205,6 +209,10 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
SET(DEST ${INSTALL_SCRIPTDIR})
SET(EXT)
+ EXECUTE_PROCESS(
+ COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db
+ )
+
INSTALL_SCRIPT(
"${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db"
DESTINATION ${DEST}
@@ -212,7 +220,6 @@ INSTALL_SCRIPT(
)
ENDIF()
-
SET(prefix "${CMAKE_INSTALL_PREFIX}")
SET(sysconfdir ${prefix})
SET(bindir ${prefix}/${INSTALL_BINDIR})
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 1870dc8b32f..3ae8d681b08 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -90,7 +90,7 @@ link_to_help()
{
echo
echo "The latest information about mysql_install_db is available at"
- echo "http://kb.askmonty.org/v/installing-system-tables-mysql_install_db."
+ echo "https://mariadb.com/kb/en/installing-system-tables-mysql_install_db"
}
parse_arg()
@@ -491,7 +491,7 @@ then
echo "databases and anonymous user created by default. This is"
echo "strongly recommended for production servers."
echo
- echo "See the MariaDB Knowledgebase at http://kb.askmonty.org or the"
+ echo "See the MariaDB Knowledgebase at http://mariadb.com/kb or the"
echo "MySQL manual for more instructions."
if test "$in_rpm" -eq 0
@@ -511,9 +511,9 @@ then
echo "You can find additional information about the MySQL part at:"
echo "http://dev.mysql.com"
echo "Support MariaDB development by buying support/new features from"
- echo "Monty Program Ab. You can contact us about this at sales@montyprogram.com".
+ echo "SkySQL Ab. You can contact us about this at sales@skysql.com".
echo "Alternatively consider joining our community based development effort:"
- echo "http://kb.askmonty.org/en/contributing-to-the-mariadb-project/"
+ echo "http://mariadb.com/kb/en/contributing-to-the-mariadb-project/"
echo
fi
diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in
index 188a6bd7104..188a6bd7104 100755..100644
--- a/scripts/mysql_secure_installation.pl.in
+++ b/scripts/mysql_secure_installation.pl.in
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
index 3c84bd65374..238dcff17f9 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -24,8 +24,7 @@
-- Get the hostname, if the hostname has any wildcard character like "_" or "%"
-- add escape character in front of wildcard character to convert "_" or "%" to
-- a plain character
-SET @get_hostname= @@hostname;
-SELECT REPLACE((SELECT REPLACE(@get_hostname,'_','\_')),'%','\%') INTO @current_hostname;
+SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
-- Fill "db" table with default grants for anyone to
@@ -41,11 +40,11 @@ DROP TABLE tmp_db;
-- from local machine if "user" table didn't exist before
CREATE TEMPORARY TABLE tmp_user LIKE user;
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N');
-REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost';
+REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N' FROM dual WHERE @current_hostname != 'localhost';
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N');
REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N');
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost';
+INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user;
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index 87680b2de2a..0b7f0403551 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -639,6 +639,9 @@ INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now(
INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
DROP TABLE tmp_proxies_priv;
+# Convering the host name to lower case for existing users
+UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host;
+
# MDEV-4332 longer user names
alter table mysql.user modify User char(80) binary not null default '';
alter table mysql.db modify User char(80) binary not null default '';
diff --git a/scripts/mytop.sh b/scripts/mytop.sh
index 480805e90b1..480805e90b1 100755..100644
--- a/scripts/mytop.sh
+++ b/scripts/mytop.sh