List:Commits« Previous MessageNext Message »
From:ahristov Date:January 23 2006 11:24am
Subject:bk commit into 5.1 tree (andrey:1.2059) BUG#16434
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/23 12:24:25 andrey@lmy004. +3 -0
  fix for bug#16434 (Events: Illegal dates don't cause errors)
  (post-review commit)
  WL#1034 (Internal CRON)

  sql/sql_yacc.yy
    1.437 06/01/23 12:24:16 andrey@lmy004. +22 -1
    handle error code returned by event_timed::init_starts()

  sql/share/errmsg.txt
    1.72 06/01/23 12:24:16 andrey@lmy004. +1 -1
    change error messages

  sql/event_timed.cc
    1.18 06/01/23 12:24:16 andrey@lmy004. +0 -3
    remove bogus check

# 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-bug16434

--- 1.436/sql/sql_yacc.yy	2006-01-13 17:44:45 +01:00
+++ 1.437/sql/sql_yacc.yy	2006-01-23 12:24:16 +01:00
@@ -1467,7 +1467,28 @@
           {
             LEX *lex= Lex;
             if (!lex->et_compile_phase)
-              lex->et->init_starts(YYTHD, $2);
+            {
+              
+              switch (lex->et->init_starts(YYTHD, $2)) {
+              case EVEX_PARSE_ERROR:
+                yyerror(ER(ER_SYNTAX_ERROR));
+                YYABORT;
+                break;
+              case EVEX_BAD_PARAMS:
+                {
+                  char buff[20];
+                  String str(buff,(uint32) sizeof(buff), system_charset_info);
+                  String *str2= $2->val_str(&str);
+                  if (!str2)
+                    my_error(ER_BAD_NULL_ERROR, MYF(0), "STARTS");
+                  else 
+                    my_error(ER_WRONG_VALUE, MYF(0), "STARTS", str2->c_ptr());
+
+                  YYABORT;
+                  break;
+                }
+              }
+            }
           }
       ;
 

--- 1.17/sql/event_timed.cc	2006-01-12 16:51:19 +01:00
+++ 1.18/sql/event_timed.cc	2006-01-23 12:24:16 +01:00
@@ -238,9 +238,6 @@
   if (new_starts->fix_fields(thd, &new_starts))
     DBUG_RETURN(EVEX_PARSE_ERROR);
 
-  if (new_starts->val_int() == MYSQL_TIMESTAMP_ERROR)
-    DBUG_RETURN(EVEX_BAD_PARAMS);
-
   if ((not_used= new_starts->get_date(&ltime, TIME_NO_ZERO_DATE)))
     DBUG_RETURN(EVEX_BAD_PARAMS);
 

--- 1.71/sql/share/errmsg.txt	2006-01-12 10:04:54 +01:00
+++ 1.72/sql/share/errmsg.txt	2006-01-23 12:24:16 +01:00
@@ -5760,7 +5760,7 @@
 ER_EVENT_INTERVAL_NOT_POSITIVE
         eng "INTERVAL must be positive"
 ER_EVENT_ENDS_BEFORE_STARTS
-        eng "ENDS must be after STARTS"
+        eng "ENDS is either invalid or before STARTS"
 ER_EVENT_EXEC_TIME_IN_THE_PAST
         eng "Activation (AT) time is in the past"
 ER_EVENT_OPEN_TABLE_FAILED
Thread
bk commit into 5.1 tree (andrey:1.2059) BUG#16434ahristov23 Jan