List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:August 21 2006 6:55pm
Subject:bk commit into 5.1 tree (cmiller:1.2289)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller 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@stripped, 2006-08-21 12:55:43-04:00, cmiller@stripped +5 -0
  Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
  into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1
  MERGE: 1.1810.1697.116

  mysql-test/r/func_time.result@stripped, 2006-08-21 12:54:32-04:00,
cmiller@stripped +0 -1
    Auto merged
    MERGE: 1.47.1.17

  mysql-test/t/func_time.test@stripped, 2006-08-21 12:55:40-04:00, cmiller@stripped
+0 -1
    Manual merge.
    MERGE: 1.41.1.11

  sql/item_timefunc.cc@stripped, 2006-08-21 12:54:33-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.100.1.22

  sql/slave.cc@stripped, 2006-08-21 12:54:33-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.241.1.35

  sql/sql_acl.cc@stripped, 2006-08-21 12:54:34-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.128.1.73

# 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:	cmiller
# Host:	zippy.cornsilk.net
# Root:	/home/cmiller/work/mysql/merge/mysql-5.1/RESYNC

--- 1.129/sql/item_timefunc.cc	2006-08-21 12:55:52 -04:00
+++ 1.130/sql/item_timefunc.cc	2006-08-21 12:55:52 -04:00
@@ -1680,14 +1680,12 @@
       case 'u': /* week (00..52), where week starts with Monday */
       case 'V': /* week 1..53 used with 'x' */
       case 'v': /* week 1..53 used with 'x', where week starts with Monday */
-      case 'H': /* hour (00..23) */
       case 'y': /* year, numeric, 2 digits */
       case 'm': /* month, numeric */
       case 'd': /* day (of the month), numeric */
       case 'h': /* hour (01..12) */
       case 'I': /* --||-- */
       case 'i': /* minutes, numeric */
-      case 'k': /* hour ( 0..23) */
       case 'l': /* hour ( 1..12) */
       case 'p': /* locale's AM or PM */
       case 'S': /* second (00..61) */
@@ -1695,6 +1693,10 @@
       case 'c': /* month (0..12) */
       case 'e': /* day (0..31) */
 	size += 2;
+	break;
+      case 'k': /* hour ( 0..23) */
+      case 'H': /* hour (00..23; value > 23 OK, padding always 2-digit) */
+	size += 7; /* docs allow > 23, range depends on sizeof(unsigned int) */
 	break;
       case 'r': /* time, 12-hour (hh:mm:ss [AP]M) */
 	size += 11;

--- 1.280/sql/slave.cc	2006-08-21 12:55:52 -04:00
+++ 1.281/sql/slave.cc	2006-08-21 12:55:52 -04:00
@@ -3051,7 +3051,7 @@
       rli->is_until_satisfied())
   {
     char buf[22];
-    sql_print_error("Slave SQL thread stopped because it reached its"
+    sql_print_information("Slave SQL thread stopped because it reached its"
                     " UNTIL position %s", llstr(rli->until_pos(), buf));
     /*
       Setting abort_slave flag because we do not want additional message about

--- 1.204/sql/sql_acl.cc	2006-08-21 12:55:52 -04:00
+++ 1.205/sql/sql_acl.cc	2006-08-21 12:55:52 -04:00
@@ -4838,6 +4838,32 @@
   DBUG_RETURN(0);
 }
 
+ACL_USER *check_acl_user(LEX_USER *user_name,
+			 uint *acl_acl_userdx)
+{
+  ACL_USER *acl_user= 0;
+  uint counter;
+
+  safe_mutex_assert_owner(&acl_cache->lock);
+
+  for (counter= 0 ; counter < acl_users.elements ; counter++)
+  {
+    const char *user,*host;
+    acl_user= dynamic_element(&acl_users, counter, ACL_USER*);
+    if (!(user=acl_user->user))
+      user= "";
+    if (!(host=acl_user->host.hostname))
+      host= "";
+    if (!strcmp(user_name->user.str,user) &&
+	!my_strcasecmp(system_charset_info, user_name->host.str, host))
+      break;
+  }
+  if (counter == acl_users.elements)
+    return 0;
+
+  *acl_acl_userdx= counter;
+  return acl_user;
+}
 
 /*
   Modify a privilege table.
@@ -4885,7 +4911,6 @@
 
   DBUG_RETURN(error);
 }
-
 
 /*
   Handle a privilege table.

--- 1.68/mysql-test/r/func_time.result	2006-08-21 12:55:52 -04:00
+++ 1.69/mysql-test/r/func_time.result	2006-08-21 12:55:52 -04:00
@@ -891,6 +891,26 @@
   `from_unixtime(1) + 0` double(23,6) DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
+H
+120
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%k') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%k') As H);
+H
+120
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%H') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%H') As H);
+H
+05
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
+H
+5
 End of 4.1 tests
 explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
 timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01
12:58:58.119999') as a2;

--- 1.54/mysql-test/t/func_time.test	2006-08-21 12:55:52 -04:00
+++ 1.55/mysql-test/t/func_time.test	2006-08-21 12:55:52 -04:00
@@ -446,6 +446,24 @@
 show create table t1;
 drop table t1;
 
+#
+# Bug #19844 time_format in Union truncates values
+#
+
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%k') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%k') As H);
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%H') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%H') As H);
+
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H)
+union
+(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
+
 --echo End of 4.1 tests
 
 explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
Thread
bk commit into 5.1 tree (cmiller:1.2289)Chad MILLER21 Aug