List:Commits« Previous MessageNext Message »
From:msvensson Date:April 12 2006 10:30am
Subject:bk commit into 5.1 tree (msvensson:1.2331)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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.2331 06/04/12 10:30:34 msvensson@neptunus.(none) +7 -0
  Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
  into  neptunus.(none):/home/msvensson/mysql/mysql-5.1

  mysql-test/t/innodb.test
    1.136 06/04/12 10:30:27 msvensson@neptunus.(none) +0 -2
    Manual merge

  mysql-test/r/innodb.result
    1.169 06/04/12 10:30:27 msvensson@neptunus.(none) +0 -0
    Manual merge

  sql/sql_insert.cc
    1.197 06/04/12 10:28:33 msvensson@neptunus.(none) +0 -0
    Auto merged

  sql/item_timefunc.h
    1.67 06/04/12 10:28:33 msvensson@neptunus.(none) +0 -0
    Auto merged

  sql/item_timefunc.cc
    1.111 06/04/12 10:28:33 msvensson@neptunus.(none) +0 -0
    Auto merged

  mysql-test/t/mysql.test
    1.10 06/04/12 10:28:33 msvensson@neptunus.(none) +0 -0
    Auto merged

  client/mysql.cc
    1.200 06/04/12 10:28:32 msvensson@neptunus.(none) +0 -0
    Auto merged

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.1/RESYNC

--- 1.199/client/mysql.cc	2006-04-04 23:35:03 +02:00
+++ 1.200/client/mysql.cc	2006-04-12 10:28:32 +02:00
@@ -3233,10 +3233,9 @@
       mysql_free_result(result);
     } 
 #ifdef HAVE_OPENSSL
-    if (mysql.net.vio && mysql.net.vio->ssl_arg &&
-	SSL_get_cipher((SSL*) mysql.net.vio->ssl_arg))
+    if ((status= mysql_get_ssl_cipher(&mysql)))
       tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s\n",
-		  SSL_get_cipher((SSL*) mysql.net.vio->ssl_arg));
+		  status);
     else
 #endif /* HAVE_OPENSSL */
       tee_puts("SSL:\t\t\tNot in use", stdout);

--- 1.110/sql/item_timefunc.cc	2006-04-07 12:29:28 +02:00
+++ 1.111/sql/item_timefunc.cc	2006-04-12 10:28:33 +02:00
@@ -2002,6 +2002,41 @@
     ((date*100L + ltime.hour)*100L+ ltime.minute)*100L + ltime.second;
 }
 
+
+
+bool Item_date_add_interval::eq(const Item *item, bool binary_cmp) const
+{
+  INTERVAL interval, other_interval;
+  String val= value;   // Because of const
+
+  if (this == item)
+    return TRUE;
+
+  if ((item->type() != FUNC_ITEM) ||
+      (arg_count != ((Item_func*) item)->arg_count) ||
+      (func_name() != ((Item_func*) item)->func_name()))
+    return FALSE;
+
+  Item_date_add_interval *other= (Item_date_add_interval*) item;
+
+  if ((int_type != other->int_type) ||
+      (!args[0]->eq(other->args[0], binary_cmp)) ||
+      (get_interval_value(args[1], int_type, &val, &interval)))
+    return FALSE;
+
+  val= other->value;
+
+  if ((get_interval_value(other->args[1], other->int_type, &val,
+                         &other_interval)) ||
+      ((date_sub_interval ^ interval.neg) ^
+       (other->date_sub_interval ^ other_interval.neg)))
+    return FALSE;
+
+  // Assume comparing same types here due to earlier check
+  return memcmp(&interval, &other_interval, sizeof(INTERVAL)) == 0;
+}
+
+
 static const char *interval_names[]=
 {
   "year", "quarter", "month", "day", "hour",

--- 1.66/sql/item_timefunc.h	2006-01-18 20:41:04 +01:00
+++ 1.67/sql/item_timefunc.h	2006-04-12 10:28:33 +02:00
@@ -647,6 +647,7 @@
   double val_real() { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
   longlong val_int();
   bool get_date(TIME *res, uint fuzzy_date);
+  bool eq(const Item *item, bool binary_cmp) const;
   void print(String *str);
 };
 

--- 1.168/mysql-test/r/innodb.result	2006-04-10 21:32:28 +02:00
+++ 1.169/mysql-test/r/innodb.result	2006-04-12 10:30:27 +02:00
@@ -3243,3 +3243,12 @@
   UNIQUE KEY `c2` (`c2`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 drop table t1, t2;
+create table t1(a date) engine=innodb;
+create table t2(a date, key(a)) engine=innodb;
+insert into t1 values('2005-10-01');
+insert into t2 values('2005-10-01');
+select * from t1, t2
+where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
+a	a
+2005-10-01	2005-10-01
+drop table t1, t2;

--- 1.135/mysql-test/t/innodb.test	2006-04-06 08:40:31 +02:00
+++ 1.136/mysql-test/t/innodb.test	2006-04-12 10:30:27 +02:00
@@ -2138,3 +2138,13 @@
 #
 drop table t1, t2;
 
+# Bug #14360: problem with intervals
+#
+
+create table t1(a date) engine=innodb;
+create table t2(a date, key(a)) engine=innodb; 
+insert into t1 values('2005-10-01');
+insert into t2 values('2005-10-01');
+select * from t1, t2
+  where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
+drop table t1, t2;

--- 1.9/mysql-test/t/mysql.test	2006-03-07 20:00:41 +01:00
+++ 1.10/mysql-test/t/mysql.test	2006-04-12 10:28:33 +02:00
@@ -61,3 +61,9 @@
 # Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string".
 #
 --exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int);
insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select
concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1
+
+#
+# Bug#18265 -- mysql client: No longer right-justifies numeric columns
+#
+--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int, k
char(25) charset utf8); insert into t1 (i) values (1); insert into t1 (k) values
('<----------------------->'); insert into t1 (k) values ('<-----'); insert into
t1 (k) values ('Τη γλώσσα'); insert into t1 (k)
values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;"
+
Thread
bk commit into 5.1 tree (msvensson:1.2331)msvensson12 Apr