summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt2
-rw-r--r--scripts/Makefile.am192
-rw-r--r--scripts/make_binary_distribution.sh4
-rw-r--r--scripts/make_sharedlib_distribution.sh136
-rwxr-xr-xscripts/make_win_bin_dist4
-rw-r--r--scripts/mysql_system_tables.sql44
-rw-r--r--scripts/mysql_system_tables_data.sql10
-rw-r--r--scripts/mysql_system_tables_fix.sql9
8 files changed, 40 insertions, 361 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 0a8d4f9658d..56b7f779bb0 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -310,7 +310,7 @@ IF(WIN32)
FOREACH(file ${SH_FILES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
- INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
+ INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT Server_Scripts)
ENDFOREACH()
ELSE()
# On Unix, most of the files end up in the bin directory
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
deleted file mode 100644
index 0200410fd8f..00000000000
--- a/scripts/Makefile.am
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright (C) 2000-2006 MySQL AB
-#
-# 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
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-## Process this file with automake to create Makefile.in
-
-BUILT_SOURCES = mysql_fix_privilege_tables.sql \
- mysql_fix_privilege_tables_sql.c
-
-EXTRA_PROGRAMS = comp_sql
-
-bin_SCRIPTS = @server_scripts@ \
- msql2mysql \
- mysql_config \
- mysql_fix_extensions \
- mysql_setpermission \
- mysql_secure_installation \
- mysql_zap \
- mysqlaccess \
- mysqlbug \
- mysql_convert_table_format \
- mysql_find_rows \
- mysqlhotcopy \
- mysqldumpslow \
- mysqld_multi
-
-noinst_SCRIPTS = make_binary_distribution \
- make_sharedlib_distribution \
- dheadgen.pl
-
-EXTRA_SCRIPTS = make_binary_distribution.sh \
- make_sharedlib_distribution.sh \
- msql2mysql.sh \
- mysql_config.sh \
- mysql_config.pl.in \
- mysql_fix_extensions.sh \
- mysql_install_db.sh \
- mysql_install_db.pl.in \
- mysql_setpermission.sh \
- mysql_secure_installation.sh \
- mysql_secure_installation.pl.in \
- mysql_zap.sh \
- mysqlaccess.sh \
- mysqlbug.sh \
- mysql_convert_table_format.sh \
- mysql_find_rows.sh \
- mysqlhotcopy.sh \
- mysqldumpslow.sh \
- mysqld_multi.sh \
- mysqld_safe.sh \
- dheadgen.pl
-
-EXTRA_DIST = $(EXTRA_SCRIPTS) \
- mysqlaccess.conf \
- mysqlbug \
- make_win_bin_dist \
- mysql_fix_privilege_tables_sql.c \
- mysql_system_tables_fix.sql \
- CMakeLists.txt
-
-dist_pkgdata_DATA = fill_help_tables.sql \
- mysql_fix_privilege_tables.sql \
- mysql_system_tables.sql \
- mysql_system_tables_data.sql \
- mysql_test_data_timezone.sql
-
-CLEANFILES = @server_scripts@ \
- make_binary_distribution \
- make_sharedlib_distribution \
- msql2mysql \
- mysql_config \
- mysql_fix_extensions \
- mysql_setpermission \
- mysql_secure_installation \
- mysql_zap \
- mysqlaccess \
- mysql_convert_table_format \
- mysql_find_rows \
- mysqlhotcopy \
- mysqldumpslow \
- mysqld_multi
-
-pkgplugindir = $(pkglibdir)/plugin
-
-# Default same as 'pkgdatadir', but we can override it
-pkgsuppdir = $(datadir)/@PACKAGE@
-
-# mysqlbug should be distributed built so that people can report build
-# failures with it.
-DISTCLEANFILES = $(BUILT_SOURCES) mysqlbug
-
-# We want the right version and configure comand line in mysqlbug
-mysqlbug: ${top_builddir}/config.status mysqlbug.sh
-
-# Build mysql_fix_privilege_tables.sql from the files that contain
-# the system tables for this version of MySQL plus any commands
-# needed to upgrade the system tables from an older version
-mysql_fix_privilege_tables.sql: mysql_system_tables.sql \
- mysql_system_tables_fix.sql
- @echo "Building $@";
- @cat mysql_system_tables.sql mysql_system_tables_fix.sql > $@
-
-#
-# Build mysql_fix_privilege_tables_sql.c from
-# mysql_fix_privileges_tables.sql using comp_sql
-# The "sleep" ensures the generated file has a younger timestamp than its source
-# (which may have been generated in this very same "make" run).
-#
-mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql
- $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT)
- sleep 2
- $(top_builddir)/scripts/comp_sql$(EXEEXT) \
- mysql_fix_privilege_tables \
- $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@
-
-
-SUFFIXES = .sh
-
-.sh:
- @RM@ -f $@ $@-t
- @SED@ \
- -e 's!@''bindir''@!$(bindir)!g' \
- -e 's!@''sbindir''@!$(sbindir)!g' \
- -e 's!@''scriptdir''@!$(bindir)!g' \
- -e 's!@''prefix''@!$(prefix)!g' \
- -e 's!@''datadir''@!$(datadir)!g' \
- -e 's!@''localstatedir''@!$(localstatedir)!g' \
- -e 's!@''libexecdir''@!$(libexecdir)!g' \
- -e 's!@''pkglibdir''@!$(pkglibdir)!g' \
- -e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \
- -e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \
- -e 's!@''pkgplugindir''@!$(pkgplugindir)!g' \
- -e 's!@''pkgsuppdir''@!$(pkgsuppdir)!g' \
- -e 's!@''sysconfdir''@!$(sysconfdir)!g' \
- -e 's!@''mandir''@!$(mandir)!g' \
- -e 's!@''infodir''@!$(infodir)!g' \
- -e 's!@''CC''@!@CC@!'\
- -e 's!@''CXX''@!@CXX@!'\
- -e 's!@''GXX''@!@GXX@!'\
- -e 's!@''SAVE_CC''@!@SAVE_CC@!'\
- -e 's!@''SAVE_CXX''@!@SAVE_CXX@!'\
- -e 's!@''CC_VERSION''@!@CC_VERSION@!'\
- -e 's!@''CXX_VERSION''@!@CXX_VERSION@!'\
- -e 's!@''PERL''@!@PERL@!' \
- -e 's!@''SAVE_ASFLAGS''@!@SAVE_ASFLAGS@!'\
- -e 's!@''SAVE_CFLAGS''@!@SAVE_CFLAGS@!'\
- -e 's!@''SAVE_CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
- -e 's!@''SAVE_LDFLAGS''@!@SAVE_LDFLAGS@!'\
- -e 's!@''ASFLAGS''@!@ASFLAGS@!'\
- -e 's!@''CFLAGS''@!@CFLAGS@!'\
- -e 's!@''CXXFLAGS''@!@CXXFLAGS@!'\
- -e 's!@''LDFLAGS''@!@LDFLAGS@!'\
- -e 's!@''LIBDL''@!@LIBDL@!'\
- -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
- -e 's!@''ZLIB_LIBS''@!@ZLIB_LIBS@!' \
- -e 's!@''LIBS''@!@LIBS@!' \
- -e 's!@''WRAPLIBS''@!@WRAPLIBS@!' \
- -e 's!@''openssl_libs''@!@openssl_libs@!' \
- -e 's!@''VERSION''@!@VERSION@!' \
- -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
- -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
- -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
- -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \
- -e 's!@''HOSTNAME''@!@HOSTNAME@!' \
- -e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \
- -e 's!@''CHECK_PID''@!@CHECK_PID@!' \
- -e 's!@''FIND_PROC''@!@FIND_PROC@!' \
- -e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
- -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
- -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
- -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \
- -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
- -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
- -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
- -e 's!@''STATIC_NSS_FLAGS''@!@STATIC_NSS_FLAGS@!' \
- -e 's!@''NON_THREADED_LIBS''@!@NON_THREADED_LIBS@!' \
- -e 's!@''ZLIB_DEPS''@!@ZLIB_DEPS@!' \
- -e "s!@MAKE@!$(MAKE)!" \
- $< > $@-t
- @CHMOD@ +x $@-t
- @MV@ $@-t $@
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 951699317fd..455bc93e642 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -304,8 +304,8 @@ mv $DEST/bin/mysql_install_db $DEST/scripts/
# Copy readme and license files
cp README Docs/INSTALL-BINARY $DEST/
-if [ -f COPYING -a -f EXCEPTIONS-CLIENT ] ; then
- cp COPYING EXCEPTIONS-CLIENT $DEST/
+if [ -f COPYING ] ; then
+ cp COPYING $DEST/
elif [ -f LICENSE.mysql ] ; then
cp LICENSE.mysql $DEST/
else
diff --git a/scripts/make_sharedlib_distribution.sh b/scripts/make_sharedlib_distribution.sh
deleted file mode 100644
index f6669788233..00000000000
--- a/scripts/make_sharedlib_distribution.sh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2003-2004, 2006 MySQL AB
-#
-# 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
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The default path should be /usr/local
-
-# Get some info from configure
-# chmod +x ./scripts/setsomevars
-
-machine=@MACHINE_TYPE@
-system=@SYSTEM_TYPE@
-version=@VERSION@
-export machine system version
-SOURCE=`pwd`
-CP="cp -p"
-MV="mv"
-
-STRIP=1
-DEBUG=0
-SILENT=0
-TMP=/tmp
-SUFFIX=""
-
-parse_arguments() {
- for arg do
- case "$arg" in
- --debug) DEBUG=1;;
- --tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
- --suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
- --no-strip) STRIP=0 ;;
- --silent) SILENT=1 ;;
- *)
- echo "Unknown argument '$arg'"
- exit 1
- ;;
- esac
- done
-}
-
-parse_arguments "$@"
-
-BASE=$TMP/my_dist$SUFFIX
-
-if [ -d $BASE ] ; then
- rm -r -f $BASE
-fi
-
-mkdir -p $BASE/lib
-
-for i in \
- libmysql/.libs/libmysqlclient.so* \
- libmysql/.libs/libmysqlclient.sl* \
- libmysql/.libs/libmysqlclient*.dylib \
- libmysql_r/.libs/libmysqlclient_r.so* \
- libmysql_r/.libs/libmysqlclient_r.sl* \
- libmysql_r/.libs/libmysqlclient_r*.dylib
-do
- if [ -f $i ]
- then
- $CP $i $BASE/lib
- fi
-done
-
-# Change the distribution to a long descriptive name
-NEW_NAME=mysql-shared-$version-$system-$machine$SUFFIX
-BASE2=$TMP/$NEW_NAME
-rm -r -f $BASE2
-mv $BASE $BASE2
-BASE=$BASE2
-
-#if we are debugging, do not do tar/gz
-if [ x$DEBUG = x1 ] ; then
- exit
-fi
-
-# This is needed to prefer GNU tar instead of tar because tar can't
-# always handle long filenames
-
-PATH_DIRS=`echo $PATH | sed -e 's/^:/. /' -e 's/:$/ ./' -e 's/::/ . /g' -e 's/:/ /g' `
-which_1 ()
-{
- for cmd
- do
- for d in $PATH_DIRS
- do
- for file in $d/$cmd
- do
- if test -x $file -a ! -d $file
- then
- echo $file
- exit 0
- fi
- done
- done
- done
- exit 1
-}
-
-#
-# Create the result tar file
-#
-
-tar=`which_1 gnutar gtar`
-if test "$?" = "1" -o "$tar" = ""
-then
- tar=tar
-fi
-
-echo "Using $tar to create archive"
-cd $TMP
-
-OPT=cvf
-if [ x$SILENT = x1 ] ; then
- OPT=cf
-fi
-
-$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
-cd $SOURCE
-echo "Compressing archive"
-gzip -9 $NEW_NAME.tar
-echo "Removing temporary directory"
-rm -r -f $BASE
-
-echo "$NEW_NAME.tar.gz created"
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index aa106a3dfc4..3174d61792a 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -183,8 +183,8 @@ cp ChangeLog $DESTDIR/Docs/ || /bin/true
cp support-files/my-*.ini $DESTDIR/
if [ -f COPYING ] ; then
- cp COPYING EXCEPTIONS-CLIENT $DESTDIR/
- cp COPYING $DESTDIR/Docs/
+ cp COPYING $DESTDIR/
+ cp COPYING $DESTDIR/Docs/
fi
# ----------------------------------------------------------------------
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index 977907c9c14..70e1d4fcdce 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -171,7 +171,7 @@ set @have_pfs= (select count(engine) from information_schema.engines where engin
-- TABLE COND_INSTANCES
--
-SET @l1="CREATE TABLE performance_schema.COND_INSTANCES(";
+SET @l1="CREATE TABLE performance_schema.cond_instances(";
SET @l2="NAME VARCHAR(128) not null,";
SET @l3="OBJECT_INSTANCE_BEGIN BIGINT not null";
SET @l4=")ENGINE=PERFORMANCE_SCHEMA;";
@@ -187,7 +187,7 @@ DROP PREPARE stmt;
-- TABLE EVENTS_WAITS_CURRENT
--
-SET @l1="CREATE TABLE performance_schema.EVENTS_WAITS_CURRENT(";
+SET @l1="CREATE TABLE performance_schema.events_waits_current(";
SET @l2="THREAD_ID INTEGER not null,";
SET @l3="EVENT_ID BIGINT unsigned not null,";
SET @l4="EVENT_NAME VARCHAR(128) not null,";
@@ -217,7 +217,7 @@ DROP PREPARE stmt;
-- TABLE EVENTS_WAITS_HISTORY
--
-SET @l1="CREATE TABLE performance_schema.EVENTS_WAITS_HISTORY(";
+SET @l1="CREATE TABLE performance_schema.events_waits_history(";
-- lines 2 to 18 are unchanged from EVENTS_WAITS_CURRENT
SET @cmd=concat(@l1,@l2,@l3,@l4,@l5,@l6,@l7,@l8,@l9,@l10,@l11,@l12,@l13,@l14,@l15,@l16,@l17,@l18);
@@ -231,7 +231,7 @@ DROP PREPARE stmt;
-- TABLE EVENTS_WAITS_HISTORY_LONG
--
-SET @l1="CREATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG(";
+SET @l1="CREATE TABLE performance_schema.events_waits_history_long(";
-- lines 2 to 18 are unchanged from EVENTS_WAITS_CURRENT
SET @cmd=concat(@l1,@l2,@l3,@l4,@l5,@l6,@l7,@l8,@l9,@l10,@l11,@l12,@l13,@l14,@l15,@l16,@l17,@l18);
@@ -245,7 +245,7 @@ DROP PREPARE stmt;
-- TABLE EVENTS_WAITS_SUMMARY_BY_INSTANCE
--
-SET @l1="CREATE TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE(";
+SET @l1="CREATE TABLE performance_schema.events_waits_summary_by_instance(";
SET @l2="EVENT_NAME VARCHAR(128) not null,";
SET @l3="OBJECT_INSTANCE_BEGIN BIGINT not null,";
SET @l4="COUNT_STAR BIGINT unsigned not null,";
@@ -266,7 +266,7 @@ DROP PREPARE stmt;
-- TABLE EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
--
-SET @l1="CREATE TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME(";
+SET @l1="CREATE TABLE performance_schema.events_waits_summary_by_thread_by_event_name(";
SET @l2="THREAD_ID INTEGER not null,";
SET @l3="EVENT_NAME VARCHAR(128) not null,";
SET @l4="COUNT_STAR BIGINT unsigned not null,";
@@ -287,7 +287,7 @@ DROP PREPARE stmt;
-- TABLE EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
--
-SET @l1="CREATE TABLE performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME(";
+SET @l1="CREATE TABLE performance_schema.events_waits_summary_global_by_event_name(";
SET @l2="EVENT_NAME VARCHAR(128) not null,";
SET @l3="COUNT_STAR BIGINT unsigned not null,";
SET @l4="SUM_TIMER_WAIT BIGINT unsigned not null,";
@@ -307,7 +307,7 @@ DROP PREPARE stmt;
-- TABLE FILE_INSTANCES
--
-SET @l1="CREATE TABLE performance_schema.FILE_INSTANCES(";
+SET @l1="CREATE TABLE performance_schema.file_instances(";
SET @l2="FILE_NAME VARCHAR(512) not null,";
SET @l3="EVENT_NAME VARCHAR(128) not null,";
SET @l4="OPEN_COUNT INTEGER unsigned not null";
@@ -324,7 +324,7 @@ DROP PREPARE stmt;
-- TABLE FILE_SUMMARY_BY_EVENT_NAME
--
-SET @l1="CREATE TABLE performance_schema.FILE_SUMMARY_BY_EVENT_NAME(";
+SET @l1="CREATE TABLE performance_schema.file_summary_by_event_name(";
SET @l2="EVENT_NAME VARCHAR(128) not null,";
SET @l3="COUNT_READ BIGINT unsigned not null,";
SET @l4="COUNT_WRITE BIGINT unsigned not null,";
@@ -343,7 +343,7 @@ DROP PREPARE stmt;
-- TABLE FILE_SUMMARY_BY_INSTANCE
--
-SET @l1="CREATE TABLE performance_schema.FILE_SUMMARY_BY_INSTANCE(";
+SET @l1="CREATE TABLE performance_schema.file_summary_by_instance(";
SET @l2="FILE_NAME VARCHAR(512) not null,";
SET @l3="EVENT_NAME VARCHAR(128) not null,";
SET @l4="COUNT_READ BIGINT unsigned not null,";
@@ -363,7 +363,7 @@ DROP PREPARE stmt;
-- TABLE MUTEX_INSTANCES
--
-SET @l1="CREATE TABLE performance_schema.MUTEX_INSTANCES(";
+SET @l1="CREATE TABLE performance_schema.mutex_instances(";
SET @l2="NAME VARCHAR(128) not null,";
SET @l3="OBJECT_INSTANCE_BEGIN BIGINT not null,";
SET @l4="LOCKED_BY_THREAD_ID INTEGER";
@@ -380,7 +380,7 @@ DROP PREPARE stmt;
-- TABLE PERFORMANCE_TIMERS
--
-SET @l1="CREATE TABLE performance_schema.PERFORMANCE_TIMERS(";
+SET @l1="CREATE TABLE performance_schema.performance_timers(";
SET @l2="TIMER_NAME ENUM ('CYCLE', 'NANOSECOND', 'MICROSECOND', 'MILLISECOND', 'TICK') not null,";
SET @l3="TIMER_FREQUENCY BIGINT,";
SET @l4="TIMER_RESOLUTION BIGINT,";
@@ -398,7 +398,7 @@ DROP PREPARE stmt;
-- TABLE RWLOCK_INSTANCES
--
-SET @l1="CREATE TABLE performance_schema.RWLOCK_INSTANCES(";
+SET @l1="CREATE TABLE performance_schema.rwlock_instances(";
SET @l2="NAME VARCHAR(128) not null,";
SET @l3="OBJECT_INSTANCE_BEGIN BIGINT not null,";
SET @l4="WRITE_LOCKED_BY_THREAD_ID INTEGER,";
@@ -416,7 +416,7 @@ DROP PREPARE stmt;
-- TABLE SETUP_CONSUMERS
--
-SET @l1="CREATE TABLE performance_schema.SETUP_CONSUMERS(";
+SET @l1="CREATE TABLE performance_schema.setup_consumers(";
SET @l2="NAME VARCHAR(64) not null,";
SET @l3="ENABLED ENUM ('YES', 'NO') not null";
SET @l4=")ENGINE=PERFORMANCE_SCHEMA;";
@@ -432,7 +432,7 @@ DROP PREPARE stmt;
-- TABLE SETUP_INSTRUMENTS
--
-SET @l1="CREATE TABLE performance_schema.SETUP_INSTRUMENTS(";
+SET @l1="CREATE TABLE performance_schema.setup_instruments(";
SET @l2="NAME VARCHAR(128) not null,";
SET @l3="ENABLED ENUM ('YES', 'NO') not null,";
SET @l4="TIMED ENUM ('YES', 'NO') not null";
@@ -449,7 +449,7 @@ DROP PREPARE stmt;
-- TABLE SETUP_TIMERS
--
-SET @l1="CREATE TABLE performance_schema.SETUP_TIMERS(";
+SET @l1="CREATE TABLE performance_schema.setup_timers(";
SET @l2="NAME VARCHAR(64) not null,";
SET @l3="TIMER_NAME ENUM ('CYCLE', 'NANOSECOND', 'MICROSECOND', 'MILLISECOND', 'TICK') not null";
SET @l4=")ENGINE=PERFORMANCE_SCHEMA;";
@@ -465,10 +465,10 @@ DROP PREPARE stmt;
-- TABLE THREADS
--
-SET @l1="CREATE TABLE performance_schema.THREADS(";
+SET @l1="CREATE TABLE performance_schema.threads(";
SET @l2="THREAD_ID INTEGER not null,";
-SET @l3="ID INTEGER not null,";
-SET @l4="NAME VARCHAR(64) not null";
+SET @l3="PROCESSLIST_ID INTEGER,";
+SET @l4="NAME VARCHAR(128) not null";
SET @l5=")ENGINE=PERFORMANCE_SCHEMA;";
SET @cmd=concat(@l1,@l2,@l3,@l4,@l5);
@@ -478,7 +478,7 @@ PREPARE stmt FROM @str;
EXECUTE stmt;
DROP PREPARE stmt;
-CREATE TABLE IF NOT EXISTS proxy_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_Host char(16) binary DEFAULT '' NOT NULL, Proxied_User char(60) binary DEFAULT '' NOT NULL, With_Grant BOOL DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User,Proxied_Host,Proxied_User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
+CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(16) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY Host (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
--- Remember for later if proxy_priv table already existed
-set @had_proxy_priv_table= @@warning_count != 0;
+-- Remember for later if proxies_priv table already existed
+set @had_proxies_priv_table= @@warning_count != 0;
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
index 293baa46523..bc5ffae2063 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -30,8 +30,8 @@ INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOW
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user;
-CREATE TEMPORARY TABLE tmp_proxy_priv LIKE proxy_priv;
-INSERT INTO tmp_proxy_priv VALUES ('localhost', 'root', '', '', TRUE);
-REPLACE INTO tmp_proxy_priv SELECT @current_hostname, 'root', '', '', TRUE FROM DUAL WHERE LOWER (@current_hostname) != 'localhost';
-INSERT INTO proxy_priv SELECT * FROM tmp_proxy_priv WHERE @had_proxy_priv_table=0;
-DROP TABLE tmp_proxy_priv;
+CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv;
+INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now());
+REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE LOWER (@current_hostname) != 'localhost';
+INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
+DROP TABLE tmp_proxies_priv;
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index ceb910676ab..399c42b1b2d 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -643,7 +643,14 @@ drop procedure mysql.die;
ALTER TABLE user ADD plugin char(60) DEFAULT '' NOT NULL, ADD authentication_string TEXT NOT NULL;
ALTER TABLE user MODIFY plugin char(60) DEFAULT '' NOT NULL;
-CREATE TABLE IF NOT EXISTS proxy_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_User char(60) binary DEFAULT '' NOT NULL, Proxied_Host char(16) binary DEFAULT '' NOT NULL, With_Grant BOOL DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User,Proxied_Host,Proxied_User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+-- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
+-- older versions
+
+CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv;
+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;
+
# Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above