From: Sergey Vojtovich Date: March 31 2011 6:36am Subject: Re: bzr commit into mysql-5.5 branch (Georgi.Kodinov:3415) Bug#11936829 List-Archive: http://lists.mysql.com/commits/134332 Message-Id: <20110331063647.GA12870@june> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Joro, ok to push. Regards, Sergey On Wed, Mar 30, 2011 at 09:56:58AM -0000, Georgi Kodinov wrote: > #At file:///Users/kgeorge/mysql/work/B11936829-5.5/ based on revid:sergey.glukhov@stripped > > 3415 Georgi Kodinov 2011-03-30 > Bug #11936829: DIFF. BETWEEN MYSQL.USER (AUTHENTICATION_STRING) IN FRESH > AND UPGRADED 5.5.11 > > There was no modification for pre 5.5.11 builds that had authentication_string. > Thus the column was not upgraded by mysql_upgrade. > > Fixed by adding an ALTER TABLE MODIFY to update an existing column to the > latest type version. > > Test suite added. > > modified: > mysql-test/r/plugin_auth.result > mysql-test/t/plugin_auth.test > scripts/mysql_system_tables_fix.sql > === modified file 'mysql-test/r/plugin_auth.result' > --- a/mysql-test/r/plugin_auth.result 2011-03-18 14:16:17 +0000 > +++ b/mysql-test/r/plugin_auth.result 2011-03-30 09:56:56 +0000 > @@ -400,4 +400,51 @@ ORDER BY COLUMN_NAME; > IS_NULLABLE COLUMN_NAME > YES authentication_string > YES plugin > +# > +# Bug #11936829: diff. between mysql.user (authentication_string) > +# in fresh and upgraded 5.5.11 > +# > +SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS > +WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND > +COLUMN_NAME IN ('plugin', 'authentication_string') > +ORDER BY COLUMN_NAME; > +IS_NULLABLE COLUMN_NAME > +YES authentication_string > +YES plugin > +ALTER TABLE mysql.user MODIFY plugin char(64) DEFAULT '' NOT NULL; > +ALTER TABLE mysql.user MODIFY authentication_string TEXT NOT NULL; > +Run mysql_upgrade on a 5.5.10 external authentication column layout > +mtr.global_suppressions OK > +mtr.test_suppressions OK > +mysql.columns_priv OK > +mysql.db OK > +mysql.event OK > +mysql.func OK > +mysql.general_log OK > +mysql.help_category OK > +mysql.help_keyword OK > +mysql.help_relation OK > +mysql.help_topic OK > +mysql.host OK > +mysql.ndb_binlog_index OK > +mysql.plugin OK > +mysql.proc OK > +mysql.procs_priv OK > +mysql.proxies_priv OK > +mysql.servers OK > +mysql.slow_log OK > +mysql.tables_priv OK > +mysql.time_zone OK > +mysql.time_zone_leap_second OK > +mysql.time_zone_name OK > +mysql.time_zone_transition OK > +mysql.time_zone_transition_type OK > +mysql.user OK > +SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS > +WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND > +COLUMN_NAME IN ('plugin', 'authentication_string') > +ORDER BY COLUMN_NAME; > +IS_NULLABLE COLUMN_NAME > +YES authentication_string > +YES plugin > End of 5.5 tests > > === modified file 'mysql-test/t/plugin_auth.test' > --- a/mysql-test/t/plugin_auth.test 2011-03-18 14:16:17 +0000 > +++ b/mysql-test/t/plugin_auth.test 2011-03-30 09:56:56 +0000 > @@ -490,4 +490,26 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INF > TABLE_SCHEMA='mysql' > ORDER BY COLUMN_NAME; > > + > +--echo # > +--echo # Bug #11936829: diff. between mysql.user (authentication_string) > +--echo # in fresh and upgraded 5.5.11 > +--echo # > + > +SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS > + WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND > + COLUMN_NAME IN ('plugin', 'authentication_string') > + ORDER BY COLUMN_NAME; > +ALTER TABLE mysql.user MODIFY plugin char(64) DEFAULT '' NOT NULL; > +ALTER TABLE mysql.user MODIFY authentication_string TEXT NOT NULL; > + > +--echo Run mysql_upgrade on a 5.5.10 external authentication column layout > +--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1 > + > +SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS > + WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND > + COLUMN_NAME IN ('plugin', 'authentication_string') > + ORDER BY COLUMN_NAME; > + > + > --echo End of 5.5 tests > > === modified file 'scripts/mysql_system_tables_fix.sql' > --- a/scripts/mysql_system_tables_fix.sql 2011-03-18 14:16:17 +0000 > +++ b/scripts/mysql_system_tables_fix.sql 2011-03-30 09:56:56 +0000 > @@ -642,6 +642,7 @@ drop procedure mysql.die; > > ALTER TABLE user ADD plugin char(64) DEFAULT '', ADD authentication_string TEXT; > ALTER TABLE user MODIFY plugin char(64) DEFAULT ''; > +ALTER TABLE user MODIFY authentication_string TEXT; > > -- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from > -- older versions > > > -- > MySQL Code Commits Mailing List > For list archives: http://lists.mysql.com/commits > To unsubscribe: http://lists.mysql.com/commits?unsub=svoj@stripped -- Sergey Vojtovich MySQL AB, Software Engineer Izhevsk, Russia, www.mysql.com