List:Commits« Previous MessageNext Message »
From:ahristov Date:January 18 2006 4:05pm
Subject:bk commit into 5.1 tree (andrey:1.2059) BUG#16521
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2059 06/01/18 17:04:04 andrey@lmy004. +7 -0
  fix for bug#16521 (mysql.event.on_completion value is 'DROP')
  WL#1034 (Internal CRON)

  sql/event_timed.cc
    1.18 06/01/18 17:03:28 andrey@lmy004. +2 -1
    - fix for bug#16521 (mysql.event.on_completion value is 'DROP')

  sql/event.h
    1.14 06/01/18 17:03:28 andrey@lmy004. +1 -1
    - fix table structure in comment

  sql/event.cc
    1.21 06/01/18 17:03:27 andrey@lmy004. +1 -1
    init the variable, gcc complains that it can be used uninitialized

  scripts/mysql_fix_privilege_tables.sql
    1.33 06/01/18 17:03:27 andrey@lmy004. +4 -2
    - fix privilege tables to be ok as per bug #16521
    (mysql.event.on_completion value is 'DROP')

  scripts/mysql_create_system_tables.sh
    1.31 06/01/18 17:03:27 andrey@lmy004. +1 -1
    fix script for #16521 mysql.event.on_completion value is 'DROP'

  mysql-test/r/system_mysql_db.result
    1.33 06/01/18 17:03:27 andrey@lmy004. +1 -1
    fix the result

  mysql-test/lib/init_db.sql
    1.20 06/01/18 17:03:26 andrey@lmy004. +1 -1
    change DROP to NOT PRESERVE 
    (bug #16521 : mysql.event.on_completion value is 'DROP')

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	andrey
# Host:	lmy004.
# Root:	/work/mysql-5.1-bug16521

--- 1.20/sql/event.cc	2006-01-11 12:49:43 +01:00
+++ 1.21/sql/event.cc	2006-01-18 17:03:27 +01:00
@@ -562,7 +562,7 @@
   int ret;
   const char *definer;
   char *ptr;
-  event_timed *et;  
+  event_timed *et= NULL;  
   DBUG_ENTER("db_find_event");
   DBUG_PRINT("enter", ("name: %*s", name->m_name.length, name->m_name.str));
 

--- 1.13/sql/event.h	2006-01-13 07:26:34 +01:00
+++ 1.14/sql/event.h	2006-01-18 17:03:28 +01:00
@@ -231,7 +231,7 @@
   starts DATETIME default NULL,
   ends DATETIME default NULL,
   status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
-  on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
+  on_completion ENUM('NOT PRESERVE','PRESERVE') NOT NULL default 'NOT PRESERVE',
   comment varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
   PRIMARY KEY  (db,name)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';

--- 1.17/sql/event_timed.cc	2006-01-12 16:51:19 +01:00
+++ 1.18/sql/event_timed.cc	2006-01-18 17:03:28 +01:00
@@ -483,8 +483,9 @@
                   table->field[EVEX_FIELD_ON_COMPLETION])) == NullS)
     goto error;
 
-  et->on_completion= (ptr[0]=='D'? MYSQL_EVENT_ON_COMPLETION_DROP:
+  et->on_completion= (ptr[0]=='N'? MYSQL_EVENT_ON_COMPLETION_DROP:
                                      MYSQL_EVENT_ON_COMPLETION_PRESERVE);
+  DBUG_PRINT("load_from_row", ("[%s] [%d]", ptr, et->on_completion));
 
   et->comment.str= get_field(mem_root, table->field[EVEX_FIELD_COMMENT]);
   if (et->comment.str != NullS)

--- 1.19/mysql-test/lib/init_db.sql	2006-01-12 19:50:29 +01:00
+++ 1.20/mysql-test/lib/init_db.sql	2006-01-18 17:03:26 +01:00
@@ -590,7 +590,7 @@
   starts DATETIME default NULL,
   ends DATETIME default NULL,
   status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
-  on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
+  on_completion ENUM('NOT PRESERVE','PRESERVE') NOT NULL default 'NOT PRESERVE',
   comment varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
   PRIMARY KEY  (db,name)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';

--- 1.32/scripts/mysql_fix_privilege_tables.sql	2006-01-11 18:08:53 +01:00
+++ 1.33/scripts/mysql_fix_privilege_tables.sql	2006-01-18 17:03:27 +01:00
@@ -552,7 +552,7 @@
   starts DATETIME default NULL,
   ends DATETIME default NULL,
   status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
-  on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
+  on_completion ENUM('NOT PRESERVE','PRESERVE') NOT NULL default 'NOT PRESERVE',
   comment varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
   PRIMARY KEY  (db,name)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
@@ -564,4 +564,6 @@
 
 ALTER TABLE user add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
 ALTER TABLE db add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
-
+# First convert to int(11) which gives no warnings, and then make it ENUM
+ALTER TABLE event MODIFY on_completion int(11) NOT NULL;
+ALTER TABLE event MODIFY on_completion ENUM('NOT PRESERVE','PRESERVE') NOT NULL default 'NOT PRESERVE';

--- 1.32/mysql-test/r/system_mysql_db.result	2006-01-11 18:06:26 +01:00
+++ 1.33/mysql-test/r/system_mysql_db.result	2006-01-18 17:03:27 +01:00
@@ -200,7 +200,7 @@
   `starts` datetime default NULL,
   `ends` datetime default NULL,
   `status` enum('ENABLED','DISABLED') NOT NULL default 'ENABLED',
-  `on_completion` enum('DROP','PRESERVE') NOT NULL default 'DROP',
+  `on_completion` enum('NOT PRESERVE','PRESERVE') NOT NULL default 'NOT PRESERVE',
   `comment` varchar(64) character set utf8 collate utf8_bin NOT NULL default '',
   PRIMARY KEY  (`db`,`name`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'

--- 1.30/scripts/mysql_create_system_tables.sh	2006-01-12 19:50:30 +01:00
+++ 1.31/scripts/mysql_create_system_tables.sh	2006-01-18 17:03:27 +01:00
@@ -766,7 +766,7 @@
   c_ev="$c_ev   starts DATETIME default NULL,"
   c_ev="$c_ev   ends DATETIME default NULL,"
   c_ev="$c_ev   status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',"
-  c_ev="$c_ev   on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',"
+  c_ev="$c_ev   on_completion ENUM('NOT PRESERVE','PRESERVE') NOT NULL default 'NOT PRESERVE',"
   c_ev="$c_ev   comment varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
   c_ev="$c_ev   PRIMARY KEY  (db,name)"
   c_ev="$c_ev ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';"
Thread
bk commit into 5.1 tree (andrey:1.2059) BUG#16521ahristov18 Jan