summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2018-08-02 11:44:02 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2018-08-02 11:44:02 +0300
commitc5a8583b3146613429d88c1c044de88a4c4c94b0 (patch)
treefe8c0476ae87e918655483aa1b417189c938780c /scripts
parentc863159c320008676aff978a7cdde5732678f975 (diff)
parente023f9a4d5a620b54d7f7132567150d80b630692 (diff)
downloadmariadb-git-c5a8583b3146613429d88c1c044de88a4c4c94b0.tar.gz
Merge tag 'mariadb-10.0.36' into 10.0-galera
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt2
-rw-r--r--scripts/mysql_install_db.pl.in2
-rw-r--r--scripts/mysql_install_db.sh7
-rw-r--r--scripts/mysql_system_tables_fix.sql50
-rw-r--r--scripts/mysqld_multi.sh2
5 files changed, 40 insertions, 23 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 3df515ff3d6..ee4ea0ce088 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -74,6 +74,7 @@ IF(UNIX)
)
ENDIF()
+IF (NOT WITHOUT_SERVER)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
@@ -83,6 +84,7 @@ INSTALL(FILES
${FIX_PRIVILEGES_SQL}
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
)
+ENDIF()
# TCMalloc hacks
IF(MALLOC_LIB)
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
index c33fb269a3a..2103afc1e63 100644
--- a/scripts/mysql_install_db.pl.in
+++ b/scripts/mysql_install_db.pl.in
@@ -326,7 +326,7 @@ else
$opt->{basedir} = '@prefix@';
$bindir = '@bindir@';
$extra_bindir = $bindir;
- $mysqld = '@libexecdir@/mysqld';
+ $mysqld = '@sbindir@/mysqld';
$pkgdatadir = '@pkgdatadir@';
$scriptdir = '@scriptdir@';
}
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index d04a6f497da..43ff4191e08 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -213,6 +213,11 @@ cannot_find_file()
echo "If you don't want to do a full install, you can use the --srcddir"
echo "option to only install the mysql database and privilege tables"
echo
+ echo "If you compiled from source, you need to either run 'make install' to"
+ echo "copy the software into the correct location ready for operation."
+ echo "If you don't want to do a full install, you can use the --srcdir"
+ echo "option to only install the mysql database and privilege tables"
+ echo
echo "If you are using a binary release, you must either be at the top"
echo "level of the extracted archive, or pass the --basedir option"
echo "pointing to that location."
@@ -308,7 +313,7 @@ else
basedir="@prefix@"
bindir="@bindir@"
resolveip="$bindir/resolveip"
- mysqld="@libexecdir@/mysqld"
+ mysqld="@sbindir@/mysqld"
pkgdatadir="@pkgdatadir@"
fi
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index 1bb601ef5f9..194b1615c2b 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -1,5 +1,5 @@
-- Copyright (C) 2003, 2013 Oracle and/or its affiliates.
--- Copyright (C) 2010, 2014 SkySQL Ab.
+-- Copyright (C) 2010, 2018 MariaDB Corporation
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -27,15 +27,24 @@
set sql_mode='';
set storage_engine=MyISAM;
-ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;
+ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
# Detect whether or not we had the Grant_priv column
SET @hadGrantPriv:=0;
SELECT @hadGrantPriv:=1 FROM user WHERE Grant_priv LIKE '%';
-ALTER TABLE user add Grant_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add References_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Index_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Alter_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;
-ALTER TABLE host add Grant_priv enum('N','Y') NOT NULL,add References_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Index_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Alter_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;
-ALTER TABLE db add Grant_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add References_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Index_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Alter_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;
+ALTER TABLE user add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
+ALTER TABLE host add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
+ALTER TABLE db add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ add Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
# Fix privileges for old tables
UPDATE user SET Grant_priv=File_priv,References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE @hadGrantPriv = 0;
@@ -47,11 +56,11 @@ UPDATE host SET References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Cr
# Adding columns needed by GRANT .. REQUIRE (openssl)
ALTER TABLE user
-ADD ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci NOT NULL,
+ADD ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL,
ADD ssl_cipher BLOB NOT NULL,
ADD x509_issuer BLOB NOT NULL,
ADD x509_subject BLOB NOT NULL;
-ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL;
+ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL;
#
# tables_priv
@@ -62,9 +71,9 @@ ALTER TABLE tables_priv
ALTER TABLE tables_priv
MODIFY Host char(60) NOT NULL default '',
MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(80) NOT NULL default '',
+ MODIFY User char(80) binary NOT NULL default '',
MODIFY Table_name char(64) NOT NULL default '',
- MODIFY Grantor char(141) NOT NULL default '',
+ MODIFY Grantor char(141) COLLATE utf8_bin NOT NULL default '',
ENGINE=MyISAM,
CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
@@ -90,7 +99,7 @@ ALTER TABLE columns_priv
ALTER TABLE columns_priv
MODIFY Host char(60) NOT NULL default '',
MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(80) NOT NULL default '',
+ MODIFY User char(80) binary NOT NULL default '',
MODIFY Table_name char(64) NOT NULL default '',
MODIFY Column_name char(64) NOT NULL default '',
ENGINE=MyISAM,
@@ -161,7 +170,7 @@ alter table func comment='User defined functions';
# and reset all char columns to correct width
ALTER TABLE user
MODIFY Host char(60) NOT NULL default '',
- MODIFY User char(80) NOT NULL default '',
+ MODIFY User char(80) binary NOT NULL default '',
ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE user
MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '',
@@ -191,7 +200,7 @@ ALTER TABLE user
ALTER TABLE db
MODIFY Host char(60) NOT NULL default '',
MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(80) NOT NULL default '',
+ MODIFY User char(80) binary NOT NULL default '',
ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE db
MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
@@ -451,7 +460,7 @@ ALTER TABLE proc MODIFY db
MODIFY definer
char(141) collate utf8_bin DEFAULT '' NOT NULL,
MODIFY comment
- char(64) collate utf8_bin DEFAULT '' NOT NULL;
+ text collate utf8_bin NOT NULL;
ALTER TABLE proc ADD character_set_client
char(32) collate utf8_bin DEFAULT NULL
@@ -515,19 +524,18 @@ ALTER TABLE proc MODIFY comment
SET @hadEventPriv := 0;
SELECT @hadEventPriv :=1 FROM user WHERE Event_priv LIKE '%';
-ALTER TABLE user add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
+ALTER TABLE user ADD Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
ALTER TABLE user MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
UPDATE user SET Event_priv=Super_priv WHERE @hadEventPriv = 0;
-ALTER TABLE db add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
+ALTER TABLE db ADD Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
ALTER TABLE db MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
#
# EVENT table
#
-ALTER TABLE event DROP PRIMARY KEY;
-ALTER TABLE event ADD PRIMARY KEY(db, name);
+ALTER TABLE event DROP PRIMARY KEY, ADD PRIMARY KEY(db, name);
# Add sql_mode column just in case.
ALTER TABLE event ADD sql_mode set ('IGNORE_BAD_TABLE_OPTIONS') AFTER on_completion;
# Update list of sql_mode values.
@@ -567,8 +575,8 @@ ALTER TABLE event MODIFY sql_mode
) DEFAULT '' NOT NULL AFTER on_completion;
ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default '';
-ALTER TABLE event MODIFY COLUMN originator INT UNSIGNED NOT NULL;
ALTER TABLE event ADD COLUMN originator INT UNSIGNED NOT NULL AFTER comment;
+ALTER TABLE event MODIFY COLUMN originator INT UNSIGNED NOT NULL;
ALTER TABLE event MODIFY COLUMN status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED';
@@ -630,10 +638,12 @@ ALTER TABLE user MODIFY Create_tablespace_priv enum('N','Y') COLLATE utf8_genera
UPDATE user SET Create_tablespace_priv = Super_priv WHERE @hadCreateTablespacePriv = 0;
-ALTER TABLE user ADD plugin char(64) DEFAULT '', ADD authentication_string TEXT;
+ALTER TABLE user ADD plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
+ ADD authentication_string TEXT NOT NULL;
+ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
+ MODIFY authentication_string TEXT NOT NULL;
ALTER TABLE user ADD password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL, MODIFY authentication_string TEXT NOT NULL;
-- Somewhere above, we ran ALTER TABLE user .... CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin.
-- we want password_expired column to have collation utf8_general_ci.
ALTER TABLE user MODIFY password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 6a917561154..8b9bb02fa85 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -30,7 +30,7 @@ $opt_example = 0;
$opt_help = 0;
$opt_log = undef();
$opt_mysqladmin = "@bindir@/mysqladmin";
-$opt_mysqld = "@libexecdir@/mysqld";
+$opt_mysqld = "@sbindir@/mysqld";
$opt_no_log = 0;
$opt_password = undef();
$opt_tcp_ip = 0;