List:Internals« Previous MessageNext Message »
From:eugene Date:November 3 2005 11:55am
Subject:bk commit into 5.0 tree (evgen:1.1967)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.1967 05/11/03 13:55:08 evgen@stripped +3 -0
  Merge epotemkin@stripped:/home/bk/mysql-5.0
  into moonbone.local:/work/14093-bug-5.0-mysql

  sql/item.h
    1.179 05/11/03 13:55:07 evgen@stripped +0 -0
    Auto merged

  mysql-test/t/select.test
    1.90 05/11/03 13:55:07 evgen@stripped +0 -0
    Auto merged

  mysql-test/r/select.result
    1.110 05/11/03 13:55:07 evgen@stripped +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:	evgen
# Host:	moonbone.local
# Root:	/work/14093-bug-5.0-mysql/RESYNC

--- 1.178/sql/item.h	2005-10-31 09:18:22 +03:00
+++ 1.179/sql/item.h	2005-11-03 13:55:07 +03:00
@@ -1750,6 +1750,7 @@
     return ref->save_in_field(field, no_conversions);
   }
   Item *new_item();
+  virtual Item *real_item() { return ref; }
 };
 
 

--- 1.109/mysql-test/r/select.result	2005-10-28 03:35:58 +04:00
+++ 1.110/mysql-test/r/select.result	2005-11-03 13:55:07 +03:00
@@ -3201,3 +3201,43 @@
 select * from t1 join t2 straight_join t3 on (t1.a=t3.c);
 a	b	c
 drop table t1, t2 ,t3;
+create table t1(f1 int, f2 date);
+insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'),
+(4,'2005-10-01'),(5,'2005-12-30');
+select * from t1 where f2 >= 0;
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+4	2005-10-01
+5	2005-12-30
+select * from t1 where f2 >= '0000-00-00';
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+4	2005-10-01
+5	2005-12-30
+select * from t1 where f2 >= '2005-09-31';
+f1	f2
+4	2005-10-01
+5	2005-12-30
+select * from t1 where f2 >= '2005-09-3a';
+f1	f2
+4	2005-10-01
+5	2005-12-30
+Warnings:
+Warning	1292	Incorrect date value: '2005-09-3a' for column 'f2' at row 1
+select * from t1 where f2 <= '2005-09-31';
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+select * from t1 where f2 <= '2005-09-3a';
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+Warnings:
+Warning	1292	Incorrect date value: '2005-09-3a' for column 'f2' at row 1
+drop table t1;

--- 1.89/mysql-test/t/select.test	2005-10-27 21:04:32 +04:00
+++ 1.90/mysql-test/t/select.test	2005-11-03 13:55:07 +03:00
@@ -2711,3 +2711,21 @@
 select * from t1 join t2 right join t3 on (t1.a=t3.c);
 select * from t1 join t2 straight_join t3 on (t1.a=t3.c);
 drop table t1, t2 ,t3;
+
+#
+# Bug #14093 Query takes a lot of time when date format is not valid
+# fix optimizes execution. so here we just check that returned set is
+# correct.
+create table t1(f1 int, f2 date);
+insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'),
+  (4,'2005-10-01'),(5,'2005-12-30');
+# should return all records
+select * from t1 where f2 >= 0;
+select * from t1 where f2 >= '0000-00-00';
+# should return 4,5
+select * from t1 where f2 >= '2005-09-31';
+select * from t1 where f2 >= '2005-09-3a';
+# should return 1,2,3
+select * from t1 where f2 <= '2005-09-31';
+select * from t1 where f2 <= '2005-09-3a';
+drop table t1;
Thread
bk commit into 5.0 tree (evgen:1.1967)eugene3 Nov