List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:June 9 2011 6:10pm
Subject:bzr push into mysql-5.1 branch (Dmitry.Shulga:3640 to 3641) Bug#11764334
View as plain text  
 3641 Dmitry Shulga	2011-06-10
      Follow-up for patch of bug#11764334.

    modified:
      mysql-test/r/events_bugs.result
      mysql-test/t/events_bugs.test
 3640 Dmitry Shulga	2011-06-10
      Fixed bug#11764334 (formerly bug#57156): ALTER EVENT CHANGES
      THE EVENT STATUS.
      
      Any ALTER EVENT statement on a disabled event enabled it back
      (unless this ALTER EVENT statement explicitly disabled the event).
      
      The problem was that during processing of an ALTER EVENT statement
      value of status field was overwritten unconditionally even if new
      value was not specified explicitly. As a consequence this field
      was set to default value for status which corresponds to ENABLE.
      
      The solution is to check if status field was explicitly specified in
      ALTER EVENT statement before assigning new value to status field.
     @ mysql-test/r/events_bugs.result
        test's result for Bug#11764334 was added.
     @ mysql-test/t/events_bugs.test
        new test for Bug#11764334 was added.
     @ sql/event_db_repository.cc
        mysql_event_fill_row() was modified: set value for status field
        in events tables only in case if statement CREATE EVENT
        is being processed or if this value was set in ALTER EVENT
        statement.
        Event_db_repository::create_event was modified: removed redundant
        setting of status field after return from call to mysql_event_fill_row().
     @ sql/event_parse_data.h
        Event_parse_data structure was modified: added flag
        status_changed that is set to true if status's value
        was changed in ALTER EVENT statement.
     @ sql/sql_yacc.yy
        Set flag status_changed if status was set in ALTER EVENT
        statement.

    modified:
      mysql-test/r/events_bugs.result
      mysql-test/t/events_bugs.test
      sql/event_db_repository.cc
      sql/event_parse_data.cc
      sql/event_parse_data.h
      sql/sql_yacc.yy
=== modified file 'mysql-test/r/events_bugs.result'
--- a/mysql-test/r/events_bugs.result	2011-06-09 17:03:17 +0000
+++ b/mysql-test/r/events_bugs.result	2011-06-09 18:05:10 +0000
@@ -802,11 +802,11 @@ USE event_test11764334;
 CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
 SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
 Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
-event_test11764334	ev1	root@localhost	SYSTEM	RECURRING	NULL	3	SECOND	2011-06-09 19:59:01	NULL	DISABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
+event_test11764334	ev1	root@localhost	SYSTEM	RECURRING	NULL	3	SECOND	#	#	DISABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
 ALTER EVENT ev1 ON SCHEDULE EVERY 4 SECOND;
 SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
 Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
-event_test11764334	ev1	root@localhost	SYSTEM	RECURRING	NULL	4	SECOND	2011-06-09 19:59:01	NULL	DISABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
+event_test11764334	ev1	root@localhost	SYSTEM	RECURRING	NULL	4	SECOND	#	#	DISABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
 DROP EVENT ev1;
 DROP DATABASE event_test11764334;
 USE test;

=== modified file 'mysql-test/t/events_bugs.test'
--- a/mysql-test/t/events_bugs.test	2011-06-09 17:03:17 +0000
+++ b/mysql-test/t/events_bugs.test	2011-06-09 18:05:10 +0000
@@ -1295,8 +1295,10 @@ DROP DATABASE IF EXISTS event_test117643
 CREATE DATABASE event_test11764334;
 USE event_test11764334;
 CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
+--replace_column 9 # 10 #
 SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
 ALTER EVENT ev1 ON SCHEDULE EVERY 4 SECOND;
+--replace_column 9 # 10 #
 SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
 DROP EVENT ev1;
 DROP DATABASE event_test11764334;


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20110609180510-lb4rm5p5qib7dnos.bundle
Thread
bzr push into mysql-5.1 branch (Dmitry.Shulga:3640 to 3641) Bug#11764334Dmitry Shulga9 Jun