From: Marc Alff Date: April 28 2010 9:58am Subject: bzr commit into mysql-next-mr-wl5291 branch (marc.alff:3143) WL#5291 List-Archive: http://lists.mysql.com/commits/106772 Message-Id: <20100428095856.688204CEAAB@MarcBook.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_yZdysf2yzZJl1MOw6HZ9kg)" --Boundary_(ID_yZdysf2yzZJl1MOw6HZ9kg) MIME-version: 1.0 Content-type: text/plain; CHARSET=US-ASCII Content-transfer-encoding: 7BIT Content-disposition: inline #At file:///Users/malff/BZR_TREE/mysql-next-mr-wl5291/ based on revid:marc.alff@stripped 3143 Marc Alff 2010-04-28 WL#5291 MySQL Install / Upgrade script format Implemented ';' as a delimiter, removed the previous code. Modified the pfs_upgrade test to cover different lowercase table names values. removed: mysql-test/suite/perfschema/t/pfs_upgrade.test added: mysql-test/suite/perfschema/include/pfs_upgrade.inc mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test modified: scripts/mysql_system_tables.sql scripts/mysql_system_tables_fix.sql sql/sql_bootstrap.cc === added file 'mysql-test/suite/perfschema/include/pfs_upgrade.inc' --- a/mysql-test/suite/perfschema/include/pfs_upgrade.inc 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/include/pfs_upgrade.inc 2010-04-28 09:58:50 +0000 @@ -0,0 +1,134 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# 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 + +# Tests for PERFORMANCE_SCHEMA +# Make sure mysql_upgrade does not destroy data in a 'performance_schema' +# database. +# + +--disable_warnings +drop table if exists test.user_table; +drop procedure if exists test.user_proc; +drop function if exists test.user_func; +drop event if exists test.user_event; +--enable_warnings + +--echo "Testing mysql_upgrade with TABLE performance_schema.user_table" + +create table test.user_table(a int); + +let $MYSQLD_DATADIR= `SELECT @@datadir`; +--copy_file $MYSQLD_DATADIR/test/user_table.frm $MYSQLD_DATADIR/performance_schema/user_table.frm + +# Make sure the table is visible +use performance_schema; +show tables like "user_table"; + +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Verify that mysql_upgrade complained about the performance_schema +--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Make sure the table is still visible +show tables like "user_table"; + +use test; + +--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm +drop table test.user_table; + +--echo "Testing mysql_upgrade with VIEW performance_schema.user_view" + +create view test.user_view as select "Not supposed to be here"; + +let $MYSQLD_DATADIR= `SELECT @@datadir`; +--copy_file $MYSQLD_DATADIR/test/user_view.frm $MYSQLD_DATADIR/performance_schema/user_view.frm + +# Make sure the view is visible +use performance_schema; +show tables like "user_view"; + +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Verify that mysql_upgrade complained about the performance_schema +--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Make sure the view is still visible +show tables like "user_view"; + +use test; + +--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm +drop view test.user_view; + +--echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc" + +create procedure test.user_proc() + select "Not supposed to be here"; + +update mysql.proc set db='performance_schema' where name='user_proc'; + +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Verify that mysql_upgrade complained about the performance_schema +--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +select name from mysql.proc where db='performance_schema'; + +update mysql.proc set db='test' where name='user_proc'; +drop procedure test.user_proc; + +--echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func" + +create function test.user_func() returns integer + return 0; + +update mysql.proc set db='performance_schema' where name='user_func'; + +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Verify that mysql_upgrade complained about the performance_schema +--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +select name from mysql.proc where db='performance_schema'; + +update mysql.proc set db='test' where name='user_func'; +drop function test.user_func; + +--echo "Testing mysql_upgrade with EVENT performance_schema.user_event" + +create event test.user_event on schedule every 1 day do + select "not supposed to be here"; + +update mysql.event set db='performance_schema' where name='user_event'; + +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +# Verify that mysql_upgrade complained about the performance_schema +--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + +select name from mysql.event where db='performance_schema'; + +update mysql.event set db='test' where name='user_event'; +drop event test.user_event; + +--remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out +--remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err + === added file 'mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result' --- a/mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result 2010-04-28 09:58:50 +0000 @@ -0,0 +1,153 @@ +drop table if exists test.user_table; +drop procedure if exists test.user_proc; +drop function if exists test.user_func; +drop event if exists test.user_event; +"Testing mysql_upgrade with TABLE performance_schema.user_table" +create table test.user_table(a int); +use performance_schema; +show tables like "user_table"; +Tables_in_performance_schema (user_table) +user_table +ERROR 1050 (42S01) at line 67: Table 'COND_INSTANCES' already exists +ERROR 1050 (42S01) at line 89: Table 'EVENTS_WAITS_CURRENT' already exists +ERROR 1050 (42S01) at line 111: Table 'EVENTS_WAITS_HISTORY' already exists +ERROR 1050 (42S01) at line 133: Table 'EVENTS_WAITS_HISTORY_LONG' already exists +ERROR 1050 (42S01) at line 145: Table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 158: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 171: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 180: Table 'FILE_INSTANCES' already exists +ERROR 1050 (42S01) at line 191: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 203: Table 'FILE_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 212: Table 'MUTEX_INSTANCES' already exists +ERROR 1050 (42S01) at line 222: Table 'PERFORMANCE_TIMERS' already exists +ERROR 1050 (42S01) at line 231: Table 'PROCESSLIST' already exists +ERROR 1050 (42S01) at line 241: Table 'RWLOCK_INSTANCES' already exists +ERROR 1050 (42S01) at line 249: Table 'SETUP_CONSUMERS' already exists +ERROR 1050 (42S01) at line 261: Table 'SETUP_OBJECTS' already exists +ERROR 1050 (42S01) at line 270: Table 'SETUP_INSTRUMENTS' already exists +ERROR 1050 (42S01) at line 278: Table 'SETUP_TIMERS' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +show tables like "user_table"; +Tables_in_performance_schema (user_table) +user_table +use test; +drop table test.user_table; +"Testing mysql_upgrade with VIEW performance_schema.user_view" +create view test.user_view as select "Not supposed to be here"; +use performance_schema; +show tables like "user_view"; +Tables_in_performance_schema (user_view) +user_view +ERROR 1050 (42S01) at line 67: Table 'COND_INSTANCES' already exists +ERROR 1050 (42S01) at line 89: Table 'EVENTS_WAITS_CURRENT' already exists +ERROR 1050 (42S01) at line 111: Table 'EVENTS_WAITS_HISTORY' already exists +ERROR 1050 (42S01) at line 133: Table 'EVENTS_WAITS_HISTORY_LONG' already exists +ERROR 1050 (42S01) at line 145: Table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 158: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 171: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 180: Table 'FILE_INSTANCES' already exists +ERROR 1050 (42S01) at line 191: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 203: Table 'FILE_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 212: Table 'MUTEX_INSTANCES' already exists +ERROR 1050 (42S01) at line 222: Table 'PERFORMANCE_TIMERS' already exists +ERROR 1050 (42S01) at line 231: Table 'PROCESSLIST' already exists +ERROR 1050 (42S01) at line 241: Table 'RWLOCK_INSTANCES' already exists +ERROR 1050 (42S01) at line 249: Table 'SETUP_CONSUMERS' already exists +ERROR 1050 (42S01) at line 261: Table 'SETUP_OBJECTS' already exists +ERROR 1050 (42S01) at line 270: Table 'SETUP_INSTRUMENTS' already exists +ERROR 1050 (42S01) at line 278: Table 'SETUP_TIMERS' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +show tables like "user_view"; +Tables_in_performance_schema (user_view) +user_view +use test; +drop view test.user_view; +"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc" +create procedure test.user_proc() +select "Not supposed to be here"; +update mysql.proc set db='performance_schema' where name='user_proc'; +ERROR 1050 (42S01) at line 67: Table 'COND_INSTANCES' already exists +ERROR 1050 (42S01) at line 89: Table 'EVENTS_WAITS_CURRENT' already exists +ERROR 1050 (42S01) at line 111: Table 'EVENTS_WAITS_HISTORY' already exists +ERROR 1050 (42S01) at line 133: Table 'EVENTS_WAITS_HISTORY_LONG' already exists +ERROR 1050 (42S01) at line 145: Table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 158: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 171: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 180: Table 'FILE_INSTANCES' already exists +ERROR 1050 (42S01) at line 191: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 203: Table 'FILE_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 212: Table 'MUTEX_INSTANCES' already exists +ERROR 1050 (42S01) at line 222: Table 'PERFORMANCE_TIMERS' already exists +ERROR 1050 (42S01) at line 231: Table 'PROCESSLIST' already exists +ERROR 1050 (42S01) at line 241: Table 'RWLOCK_INSTANCES' already exists +ERROR 1050 (42S01) at line 249: Table 'SETUP_CONSUMERS' already exists +ERROR 1050 (42S01) at line 261: Table 'SETUP_OBJECTS' already exists +ERROR 1050 (42S01) at line 270: Table 'SETUP_INSTRUMENTS' already exists +ERROR 1050 (42S01) at line 278: Table 'SETUP_TIMERS' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.proc where db='performance_schema'; +name +user_proc +update mysql.proc set db='test' where name='user_proc'; +drop procedure test.user_proc; +"Testing mysql_upgrade with FUNCTION performance_schema.user_func" +create function test.user_func() returns integer +return 0; +update mysql.proc set db='performance_schema' where name='user_func'; +ERROR 1050 (42S01) at line 67: Table 'COND_INSTANCES' already exists +ERROR 1050 (42S01) at line 89: Table 'EVENTS_WAITS_CURRENT' already exists +ERROR 1050 (42S01) at line 111: Table 'EVENTS_WAITS_HISTORY' already exists +ERROR 1050 (42S01) at line 133: Table 'EVENTS_WAITS_HISTORY_LONG' already exists +ERROR 1050 (42S01) at line 145: Table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 158: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 171: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 180: Table 'FILE_INSTANCES' already exists +ERROR 1050 (42S01) at line 191: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 203: Table 'FILE_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 212: Table 'MUTEX_INSTANCES' already exists +ERROR 1050 (42S01) at line 222: Table 'PERFORMANCE_TIMERS' already exists +ERROR 1050 (42S01) at line 231: Table 'PROCESSLIST' already exists +ERROR 1050 (42S01) at line 241: Table 'RWLOCK_INSTANCES' already exists +ERROR 1050 (42S01) at line 249: Table 'SETUP_CONSUMERS' already exists +ERROR 1050 (42S01) at line 261: Table 'SETUP_OBJECTS' already exists +ERROR 1050 (42S01) at line 270: Table 'SETUP_INSTRUMENTS' already exists +ERROR 1050 (42S01) at line 278: Table 'SETUP_TIMERS' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.proc where db='performance_schema'; +name +user_func +update mysql.proc set db='test' where name='user_func'; +drop function test.user_func; +"Testing mysql_upgrade with EVENT performance_schema.user_event" +create event test.user_event on schedule every 1 day do +select "not supposed to be here"; +update mysql.event set db='performance_schema' where name='user_event'; +ERROR 1050 (42S01) at line 67: Table 'COND_INSTANCES' already exists +ERROR 1050 (42S01) at line 89: Table 'EVENTS_WAITS_CURRENT' already exists +ERROR 1050 (42S01) at line 111: Table 'EVENTS_WAITS_HISTORY' already exists +ERROR 1050 (42S01) at line 133: Table 'EVENTS_WAITS_HISTORY_LONG' already exists +ERROR 1050 (42S01) at line 145: Table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 158: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 171: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 180: Table 'FILE_INSTANCES' already exists +ERROR 1050 (42S01) at line 191: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists +ERROR 1050 (42S01) at line 203: Table 'FILE_SUMMARY_BY_INSTANCE' already exists +ERROR 1050 (42S01) at line 212: Table 'MUTEX_INSTANCES' already exists +ERROR 1050 (42S01) at line 222: Table 'PERFORMANCE_TIMERS' already exists +ERROR 1050 (42S01) at line 231: Table 'PROCESSLIST' already exists +ERROR 1050 (42S01) at line 241: Table 'RWLOCK_INSTANCES' already exists +ERROR 1050 (42S01) at line 249: Table 'SETUP_CONSUMERS' already exists +ERROR 1050 (42S01) at line 261: Table 'SETUP_OBJECTS' already exists +ERROR 1050 (42S01) at line 270: Table 'SETUP_INSTRUMENTS' already exists +ERROR 1050 (42S01) at line 278: Table 'SETUP_TIMERS' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.event where db='performance_schema'; +name +user_event +update mysql.event set db='test' where name='user_event'; +drop event test.user_event; === added file 'mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result' --- a/mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result 2010-04-28 09:58:50 +0000 @@ -0,0 +1,153 @@ +drop table if exists test.user_table; +drop procedure if exists test.user_proc; +drop function if exists test.user_func; +drop event if exists test.user_event; +"Testing mysql_upgrade with TABLE performance_schema.user_table" +create table test.user_table(a int); +use performance_schema; +show tables like "user_table"; +Tables_in_performance_schema (user_table) +user_table +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +show tables like "user_table"; +Tables_in_performance_schema (user_table) +user_table +use test; +drop table test.user_table; +"Testing mysql_upgrade with VIEW performance_schema.user_view" +create view test.user_view as select "Not supposed to be here"; +use performance_schema; +show tables like "user_view"; +Tables_in_performance_schema (user_view) +user_view +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +show tables like "user_view"; +Tables_in_performance_schema (user_view) +user_view +use test; +drop view test.user_view; +"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc" +create procedure test.user_proc() +select "Not supposed to be here"; +update mysql.proc set db='performance_schema' where name='user_proc'; +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.proc where db='performance_schema'; +name +user_proc +update mysql.proc set db='test' where name='user_proc'; +drop procedure test.user_proc; +"Testing mysql_upgrade with FUNCTION performance_schema.user_func" +create function test.user_func() returns integer +return 0; +update mysql.proc set db='performance_schema' where name='user_func'; +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.proc where db='performance_schema'; +name +user_func +update mysql.proc set db='test' where name='user_func'; +drop function test.user_func; +"Testing mysql_upgrade with EVENT performance_schema.user_event" +create event test.user_event on schedule every 1 day do +select "not supposed to be here"; +update mysql.event set db='performance_schema' where name='user_event'; +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.event where db='performance_schema'; +name +user_event +update mysql.event set db='test' where name='user_event'; +drop event test.user_event; === added file 'mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result' --- a/mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result 2010-04-28 09:58:50 +0000 @@ -0,0 +1,153 @@ +drop table if exists test.user_table; +drop procedure if exists test.user_proc; +drop function if exists test.user_func; +drop event if exists test.user_event; +"Testing mysql_upgrade with TABLE performance_schema.user_table" +create table test.user_table(a int); +use performance_schema; +show tables like "user_table"; +Tables_in_performance_schema (user_table) +user_table +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +show tables like "user_table"; +Tables_in_performance_schema (user_table) +user_table +use test; +drop table test.user_table; +"Testing mysql_upgrade with VIEW performance_schema.user_view" +create view test.user_view as select "Not supposed to be here"; +use performance_schema; +show tables like "user_view"; +Tables_in_performance_schema (user_view) +user_view +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +show tables like "user_view"; +Tables_in_performance_schema (user_view) +user_view +use test; +drop view test.user_view; +"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc" +create procedure test.user_proc() +select "Not supposed to be here"; +update mysql.proc set db='performance_schema' where name='user_proc'; +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.proc where db='performance_schema'; +name +user_proc +update mysql.proc set db='test' where name='user_proc'; +drop procedure test.user_proc; +"Testing mysql_upgrade with FUNCTION performance_schema.user_func" +create function test.user_func() returns integer +return 0; +update mysql.proc set db='performance_schema' where name='user_func'; +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.proc where db='performance_schema'; +name +user_func +update mysql.proc set db='test' where name='user_func'; +drop function test.user_func; +"Testing mysql_upgrade with EVENT performance_schema.user_event" +create event test.user_event on schedule every 1 day do +select "not supposed to be here"; +update mysql.event set db='performance_schema' where name='user_event'; +ERROR 1050 (42S01) at line 67: Table 'cond_instances' already exists +ERROR 1050 (42S01) at line 89: Table 'events_waits_current' already exists +ERROR 1050 (42S01) at line 111: Table 'events_waits_history' already exists +ERROR 1050 (42S01) at line 133: Table 'events_waits_history_long' already exists +ERROR 1050 (42S01) at line 145: Table 'events_waits_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 158: Table 'events_waits_summary_by_instance' already exists +ERROR 1050 (42S01) at line 171: Table 'events_waits_summary_by_thread_by_event_name' already exists +ERROR 1050 (42S01) at line 180: Table 'file_instances' already exists +ERROR 1050 (42S01) at line 191: Table 'file_summary_by_event_name' already exists +ERROR 1050 (42S01) at line 203: Table 'file_summary_by_instance' already exists +ERROR 1050 (42S01) at line 212: Table 'mutex_instances' already exists +ERROR 1050 (42S01) at line 222: Table 'performance_timers' already exists +ERROR 1050 (42S01) at line 231: Table 'processlist' already exists +ERROR 1050 (42S01) at line 241: Table 'rwlock_instances' already exists +ERROR 1050 (42S01) at line 249: Table 'setup_consumers' already exists +ERROR 1050 (42S01) at line 261: Table 'setup_objects' already exists +ERROR 1050 (42S01) at line 270: Table 'setup_instruments' already exists +ERROR 1050 (42S01) at line 278: Table 'setup_timers' already exists +ERROR 1644 (HY000) at line 695: Unexpected content found in the performance_schema database. +FATAL ERROR: Upgrade failed +select name from mysql.event where db='performance_schema'; +name +user_event +update mysql.event set db='test' where name='user_event'; +drop event test.user_event; === removed file 'mysql-test/suite/perfschema/t/pfs_upgrade.test' --- a/mysql-test/suite/perfschema/t/pfs_upgrade.test 2010-03-09 15:05:19 +0000 +++ b/mysql-test/suite/perfschema/t/pfs_upgrade.test 1970-01-01 00:00:00 +0000 @@ -1,138 +0,0 @@ -# Copyright (C) 2010 Oracle and/or its affiliates. All rights reserved. -# -# 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 - -# Tests for PERFORMANCE_SCHEMA -# Make sure mysql_upgrade does not destroy data in a 'performance_schema' -# database. -# - ---source include/not_embedded.inc ---source include/have_perfschema.inc ---source include/have_lowercase0.inc - ---disable_warnings -drop table if exists test.user_table; -drop procedure if exists test.user_proc; -drop function if exists test.user_func; -drop event if exists test.user_event; ---enable_warnings - ---echo "Testing mysql_upgrade with TABLE performance_schema.user_table" - -create table test.user_table(a int); - -let $MYSQLD_DATADIR= `SELECT @@datadir`; ---copy_file $MYSQLD_DATADIR/test/user_table.frm $MYSQLD_DATADIR/performance_schema/user_table.frm - -# Make sure the table is visible -use performance_schema; -show tables like "user_table"; - ---error 1 ---exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Verify that mysql_upgrade complained about the performance_schema ---cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Make sure the table is still visible -show tables like "user_table"; - -use test; - ---remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm -drop table test.user_table; - ---echo "Testing mysql_upgrade with VIEW performance_schema.user_view" - -create view test.user_view as select "Not supposed to be here"; - -let $MYSQLD_DATADIR= `SELECT @@datadir`; ---copy_file $MYSQLD_DATADIR/test/user_view.frm $MYSQLD_DATADIR/performance_schema/user_view.frm - -# Make sure the view is visible -use performance_schema; -show tables like "user_view"; - ---error 1 ---exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Verify that mysql_upgrade complained about the performance_schema ---cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Make sure the view is still visible -show tables like "user_view"; - -use test; - ---remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm -drop view test.user_view; - ---echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc" - -create procedure test.user_proc() - select "Not supposed to be here"; - -update mysql.proc set db='performance_schema' where name='user_proc'; - ---error 1 ---exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Verify that mysql_upgrade complained about the performance_schema ---cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -select name from mysql.proc where db='performance_schema'; - -update mysql.proc set db='test' where name='user_proc'; -drop procedure test.user_proc; - ---echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func" - -create function test.user_func() returns integer - return 0; - -update mysql.proc set db='performance_schema' where name='user_func'; - ---error 1 ---exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Verify that mysql_upgrade complained about the performance_schema ---cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -select name from mysql.proc where db='performance_schema'; - -update mysql.proc set db='test' where name='user_func'; -drop function test.user_func; - ---echo "Testing mysql_upgrade with EVENT performance_schema.user_event" - -create event test.user_event on schedule every 1 day do - select "not supposed to be here"; - -update mysql.event set db='performance_schema' where name='user_event'; - ---error 1 ---exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -# Verify that mysql_upgrade complained about the performance_schema ---cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - -select name from mysql.event where db='performance_schema'; - -update mysql.event set db='test' where name='user_event'; -drop event test.user_event; - ---remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out ---remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err - === added file 'mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test' --- a/mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test 2010-04-28 09:58:50 +0000 @@ -0,0 +1,26 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# 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 + +# Tests for PERFORMANCE_SCHEMA +# Make sure mysql_upgrade does not destroy data in a 'performance_schema' +# database. +# + +--source include/not_embedded.inc +--source include/have_perfschema.inc +--source include/have_lowercase0.inc +--source ../include/pfs_upgrade.inc + + === added file 'mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test' --- a/mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test 2010-04-28 09:58:50 +0000 @@ -0,0 +1,26 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# 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 + +# Tests for PERFORMANCE_SCHEMA +# Make sure mysql_upgrade does not destroy data in a 'performance_schema' +# database. +# + +--source include/not_embedded.inc +--source include/have_perfschema.inc +--source include/have_lowercase1.inc +--source ../include/pfs_upgrade.inc + + === added file 'mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test' --- a/mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test 2010-04-28 09:58:50 +0000 @@ -0,0 +1,26 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# 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 + +# Tests for PERFORMANCE_SCHEMA +# Make sure mysql_upgrade does not destroy data in a 'performance_schema' +# database. +# + +--source include/not_embedded.inc +--source include/have_perfschema.inc +--source include/have_lowercase2.inc +--source ../include/pfs_upgrade.inc + + === modified file 'scripts/mysql_system_tables.sql' --- a/scripts/mysql_system_tables.sql 2010-04-28 08:41:00 +0000 +++ b/scripts/mysql_system_tables.sql 2010-04-28 09:58:50 +0000 @@ -115,7 +115,6 @@ set @have_old_pfs= (select count(*) from SET @cmd="SET @broken_tables = (select count(*) from information_schema.tables" " where engine != \'PERFORMANCE_SCHEMA\' and table_schema=\'performance_schema\')"; -GO -- Work around for bug#49542 SET @str = IF(@have_old_pfs = 1, @cmd, 'SET @broken_tables = 0'); @@ -125,7 +124,6 @@ DROP PREPARE stmt; SET @cmd="SET @broken_views = (select count(*) from information_schema.views" " where table_schema='performance_schema')"; -GO -- Work around for bug#49542 SET @str = IF(@have_old_pfs = 1, @cmd, 'SET @broken_views = 0'); @@ -175,7 +173,6 @@ SET @cmd="CREATE TABLE performance_schem "NAME VARCHAR(128) not null," "OBJECT_INSTANCE_BEGIN BIGINT not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -204,7 +201,6 @@ SET @cmd="CREATE TABLE performance_schem "NUMBER_OF_BYTES BIGINT unsigned," "FLAGS INTEGER unsigned" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -233,7 +229,6 @@ SET @cmd="CREATE TABLE performance_schem "NUMBER_OF_BYTES BIGINT unsigned," "FLAGS INTEGER unsigned" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -262,7 +257,6 @@ SET @cmd="CREATE TABLE performance_schem "NUMBER_OF_BYTES BIGINT unsigned," "FLAGS INTEGER unsigned" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -281,7 +275,6 @@ SET @cmd="CREATE TABLE performance_schem "AVG_TIMER_WAIT BIGINT unsigned not null," "MAX_TIMER_WAIT BIGINT unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -301,7 +294,6 @@ SET @cmd="CREATE TABLE performance_schem "AVG_TIMER_WAIT BIGINT unsigned not null," "MAX_TIMER_WAIT BIGINT unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -321,7 +313,6 @@ SET @cmd="CREATE TABLE performance_schem "AVG_TIMER_WAIT BIGINT unsigned not null," "MAX_TIMER_WAIT BIGINT unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -337,7 +328,6 @@ SET @cmd="CREATE TABLE performance_schem "EVENT_NAME VARCHAR(128) not null," "OPEN_COUNT INTEGER unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -355,7 +345,6 @@ SET @cmd="CREATE TABLE performance_schem "SUM_NUMBER_OF_BYTES_READ BIGINT unsigned not null," "SUM_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -374,7 +363,6 @@ SET @cmd="CREATE TABLE performance_schem "SUM_NUMBER_OF_BYTES_READ BIGINT unsigned not null," "SUM_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -390,7 +378,6 @@ SET @cmd="CREATE TABLE performance_schem "OBJECT_INSTANCE_BEGIN BIGINT not null," "LOCKED_BY_THREAD_ID INTEGER" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -407,7 +394,6 @@ SET @cmd="CREATE TABLE performance_schem "TIMER_RESOLUTION BIGINT," "TIMER_OVERHEAD BIGINT" ") ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -423,7 +409,6 @@ SET @cmd="CREATE TABLE performance_schem "ID INTEGER not null," "NAME VARCHAR(64) not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -440,7 +425,6 @@ SET @cmd="CREATE TABLE performance_schem "WRITE_LOCKED_BY_THREAD_ID INTEGER," "READ_LOCKED_BY_COUNT INTEGER unsigned not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -455,7 +439,6 @@ SET @cmd="CREATE TABLE performance_schem "NAME VARCHAR(64) not null," "ENABLED ENUM ('YES', 'NO') not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -474,7 +457,6 @@ SET @cmd="CREATE TABLE performance_schem "TIMED ENUM ('YES', 'NO') not null," "AGGREGATED ENUM ('YES', 'NO') not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -490,7 +472,6 @@ SET @cmd="CREATE TABLE performance_schem "ENABLED ENUM ('YES', 'NO') not null," "TIMED ENUM ('YES', 'NO') not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; @@ -505,7 +486,6 @@ SET @cmd="CREATE TABLE performance_schem "NAME VARCHAR(64) not null," "TIMER_NAME ENUM ('CYCLE', 'NANOSECOND', 'MICROSECOND', 'MILLISECOND', 'TICK') not null" ")ENGINE=PERFORMANCE_SCHEMA;"; -GO SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0'); PREPARE stmt FROM @str; === modified file 'scripts/mysql_system_tables_fix.sql' --- a/scripts/mysql_system_tables_fix.sql 2010-04-28 08:41:00 +0000 +++ b/scripts/mysql_system_tables_fix.sql 2010-04-28 09:58:50 +0000 @@ -29,21 +29,9 @@ ALTER TABLE user add File_priv enum('N', 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; -GO -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; -GO -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; -GO +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; # 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; @@ -59,7 +47,6 @@ ADD ssl_type enum('','ANY','X509', 'SPEC ADD ssl_cipher BLOB NOT NULL, ADD x509_issuer BLOB NOT NULL, ADD x509_subject BLOB NOT NULL; -GO ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL; # @@ -67,7 +54,6 @@ ALTER TABLE user MODIFY ssl_type enum('' # ALTER TABLE tables_priv ADD KEY Grantor (Grantor); -GO ALTER TABLE tables_priv MODIFY Host char(60) NOT NULL default '', @@ -77,7 +63,6 @@ ALTER TABLE tables_priv MODIFY Grantor char(77) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -GO ALTER TABLE tables_priv MODIFY Column_priv set('Select','Insert','Update','References') @@ -87,7 +72,6 @@ ALTER TABLE tables_priv 'Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL, COMMENT='Table privileges'; -GO # # columns_priv @@ -98,7 +82,6 @@ GO ALTER TABLE columns_priv CHANGE Type Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL; -GO ALTER TABLE columns_priv MODIFY Host char(60) NOT NULL default '', @@ -109,12 +92,10 @@ ALTER TABLE columns_priv ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin, COMMENT='Column privileges'; -GO ALTER TABLE columns_priv MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL; -GO # # Add the new 'type' column to the func table. @@ -138,14 +119,10 @@ ADD Lock_tables_priv enum('N','Y') COLLA ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv, ADD Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Execute_priv, ADD Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_slave_priv; -GO # Convert privileges so that users have similar privileges as before -UPDATE user SET Show_db_priv= Select_priv, Super_priv=Process_priv, Execute_priv=Process_priv, - Create_tmp_table_priv='Y', Lock_tables_priv='Y', Repl_slave_priv=file_priv, Repl_client_priv=File_priv - where user<>"" AND @hadShowDbPriv = 0; -GO +UPDATE user SET Show_db_priv= Select_priv, Super_priv=Process_priv, Execute_priv=Process_priv, Create_tmp_table_priv='Y', Lock_tables_priv='Y', Repl_slave_priv=file_priv, Repl_client_priv=File_priv where user<>"" AND @hadShowDbPriv = 0; # Add fields that can be used to limit number of questions and connections @@ -155,7 +132,6 @@ ALTER TABLE user ADD max_questions int(11) NOT NULL DEFAULT 0 AFTER x509_subject, ADD max_updates int(11) unsigned NOT NULL DEFAULT 0 AFTER max_questions, ADD max_connections int(11) unsigned NOT NULL DEFAULT 0 AFTER max_updates; -GO # @@ -165,11 +141,9 @@ GO ALTER TABLE db ADD Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ADD Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; -GO ALTER TABLE host ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; -GO alter table user change max_questions max_questions int(11) unsigned DEFAULT 0 NOT NULL; @@ -185,7 +159,6 @@ ALTER TABLE user MODIFY Host char(60) NOT NULL default '', MODIFY User char(16) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -GO ALTER TABLE user MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '', MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, @@ -210,14 +183,12 @@ ALTER TABLE user MODIFY Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL; -GO ALTER TABLE db MODIFY Host char(60) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', MODIFY User char(16) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -GO ALTER TABLE db MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, @@ -231,13 +202,11 @@ ALTER TABLE db MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; -GO ALTER TABLE host MODIFY Host char(60) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -GO ALTER TABLE host MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, @@ -251,14 +220,11 @@ ALTER TABLE host MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; -GO ALTER TABLE func ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -GO ALTER TABLE func MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL; -GO # # Modify log tables. @@ -295,7 +261,6 @@ ALTER TABLE plugin MODIFY name varchar(64) COLLATE utf8_general_ci NOT NULL DEFAULT '', MODIFY dl varchar(128) COLLATE utf8_general_ci NOT NULL DEFAULT '', CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; -GO # # Detect whether we had Create_view_priv @@ -392,7 +357,6 @@ ALTER TABLE user MODIFY Create_user_priv UPDATE user LEFT JOIN db USING (Host,User) SET Create_user_priv='Y' WHERE @hadCreateUserPriv = 0 AND (user.Grant_priv = 'Y' OR db.Grant_priv = 'Y'); -GO # # procs_priv @@ -401,26 +365,21 @@ GO ALTER TABLE procs_priv ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -GO ALTER TABLE procs_priv MODIFY Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL; -GO ALTER IGNORE TABLE procs_priv MODIFY Routine_name char(64) COLLATE utf8_general_ci DEFAULT '' NOT NULL; -GO ALTER TABLE procs_priv ADD Routine_type enum('FUNCTION','PROCEDURE') COLLATE utf8_general_ci NOT NULL AFTER Routine_name; -GO ALTER TABLE procs_priv MODIFY Timestamp timestamp AFTER Proc_priv; -GO # # proc @@ -472,7 +431,6 @@ ALTER TABLE proc MODIFY name char(64) DE 'PAD_CHAR_TO_FULL_LENGTH' ) DEFAULT '' NOT NULL, DEFAULT CHARACTER SET utf8; -GO # Correct the character set and collation ALTER TABLE proc CONVERT TO CHARACTER SET utf8; @@ -483,77 +441,62 @@ ALTER TABLE proc MODIFY db char(77) collate utf8_bin DEFAULT '' NOT NULL, MODIFY comment char(64) collate utf8_bin DEFAULT '' NOT NULL; -GO ALTER TABLE proc ADD character_set_client char(32) collate utf8_bin DEFAULT NULL AFTER comment; -GO ALTER TABLE proc MODIFY character_set_client char(32) collate utf8_bin DEFAULT NULL; -GO SELECT CASE WHEN COUNT(*) > 0 THEN CONCAT ("WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (", @@character_set_client, "). Please verify if necessary.") ELSE NULL END AS value FROM proc WHERE character_set_client IS NULL; -GO UPDATE proc SET character_set_client = @@character_set_client WHERE character_set_client IS NULL; -GO ALTER TABLE proc ADD collation_connection char(32) collate utf8_bin DEFAULT NULL AFTER character_set_client; -GO ALTER TABLE proc MODIFY collation_connection char(32) collate utf8_bin DEFAULT NULL; -GO SELECT CASE WHEN COUNT(*) > 0 THEN CONCAT ("WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (", @@collation_connection, "). Please verify if necessary.") ELSE NULL END AS value FROM proc WHERE collation_connection IS NULL; -GO UPDATE proc SET collation_connection = @@collation_connection WHERE collation_connection IS NULL; -GO ALTER TABLE proc ADD db_collation char(32) collate utf8_bin DEFAULT NULL AFTER collation_connection; -GO ALTER TABLE proc MODIFY db_collation char(32) collate utf8_bin DEFAULT NULL; -GO SELECT CASE WHEN COUNT(*) > 0 THEN CONCAT ("WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.") ELSE NULL END AS value FROM proc WHERE db_collation IS NULL; -GO UPDATE proc AS p SET db_collation = ( SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = p.db) WHERE db_collation IS NULL; -GO ALTER TABLE proc ADD body_utf8 longblob DEFAULT NULL AFTER db_collation; -GO ALTER TABLE proc MODIFY body_utf8 longblob DEFAULT NULL; # Change comment from char(64) to text ALTER TABLE proc MODIFY comment text collate utf8_bin NOT NULL; -GO # # EVENT privilege @@ -611,7 +554,6 @@ ALTER TABLE event MODIFY sql_mode 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH' ) DEFAULT '' NOT NULL AFTER on_completion; -GO ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default ''; ALTER TABLE event MODIFY COLUMN originator INT UNSIGNED NOT NULL; @@ -621,35 +563,27 @@ ALTER TABLE event MODIFY COLUMN status E ALTER TABLE event ADD COLUMN time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM' AFTER originator; -GO ALTER TABLE event ADD character_set_client char(32) collate utf8_bin DEFAULT NULL AFTER time_zone; -GO ALTER TABLE event MODIFY character_set_client char(32) collate utf8_bin DEFAULT NULL; -GO ALTER TABLE event ADD collation_connection char(32) collate utf8_bin DEFAULT NULL AFTER character_set_client; -GO ALTER TABLE event MODIFY collation_connection char(32) collate utf8_bin DEFAULT NULL; -GO ALTER TABLE event ADD db_collation char(32) collate utf8_bin DEFAULT NULL AFTER collation_connection; -GO ALTER TABLE event MODIFY db_collation char(32) collate utf8_bin DEFAULT NULL; -GO ALTER TABLE event ADD body_utf8 longblob DEFAULT NULL AFTER db_collation; -GO ALTER TABLE event MODIFY body_utf8 longblob DEFAULT NULL; @@ -669,10 +603,7 @@ ALTER TABLE host MODIFY Trigger_priv enu ALTER TABLE db ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; ALTER TABLE db MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; -ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop', - 'Grant','References','Index','Alter','Create View','Show view','Trigger') - COLLATE utf8_general_ci DEFAULT '' NOT NULL; -GO +ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL; UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0; === modified file 'sql/sql_bootstrap.cc' --- a/sql/sql_bootstrap.cc 2010-04-27 07:18:34 +0000 +++ b/sql/sql_bootstrap.cc 2010-04-28 09:58:50 +0000 @@ -67,35 +67,8 @@ int read_bootstrap_query(char *query, in if (strncmp(line, "delimiter", 9) == 0) continue; - if (query_len == 0) - { - if (line[len - 1] == ';') - { - /* - The first line is terminated by ';'. - This is a valid single line query. - */ - memcpy(query, line, len); - *query_length= len; - query[len]= '\0'; - return 0; - } - } - else - { - if ((len >= 2) && (line[0] == 'G') && (line[1] == 'O')) - { - /* - Found the multiline 'GO' delimiter. - This is a valid multi line query. - */ - *query_length= query_len; - query[query_len]= '\0'; - return 0; - } - } - /* Append the current line to a multi line query. */ + if (query_len + len + 1 >= MAX_BOOTSTRAP_QUERY_SIZE) return READ_BOOTSTRAP_ERROR; @@ -110,6 +83,17 @@ int read_bootstrap_query(char *query, in } memcpy(query + query_len, line, len); query_len+= len; + + if (line[len - 1] == ';') + { + /* + The last line is terminated by ';'. + Return the query found. + */ + query[query_len]= '\0'; + *query_length= query_len; + return 0; + } } } --Boundary_(ID_yZdysf2yzZJl1MOw6HZ9kg) MIME-version: 1.0 Content-type: text/bzr-bundle; CHARSET=US-ASCII; name="bzr/marc.alff@stripped" Content-transfer-encoding: 7BIT Content-disposition: inline; filename="bzr/marc.alff@stripped" # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: marc.alff@stripped # target_branch: file:///Users/malff/BZR_TREE/mysql-next-mr-wl5291/ # testament_sha1: f696807be4d143010812aa82d6a886a29ac1cf22 # timestamp: 2010-04-28 03:58:55 -0600 # source_branch: file:///Users/malff/BZR_TREE/mysql-next-mr/ # base_revision_id: marc.alff@stripped\ # 4zecgwx6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