Below is the list of changes that have just been committed into a local
5.1 repository of igor. When igor 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.2313 06/04/10 14:25:26 igor@stripped +4 -0
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0
sql/item_cmpfunc.cc
1.201 06/04/10 14:25:19 igor@stripped +0 -0
Auto merged
mysql-test/t/view.test
1.143 06/04/10 14:25:19 igor@stripped +0 -0
Auto merged
mysql-test/r/view.result
1.155 06/04/10 14:25:18 igor@stripped +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.103 06/04/10 14:25:18 igor@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: igor
# Host: rurik.mysql.com
# Root: /home/igor/dev/mysql-5.1-0/RESYNC
--- 1.200/sql/item_cmpfunc.cc 2006-04-03 21:04:30 -07:00
+++ 1.201/sql/item_cmpfunc.cc 2006-04-10 14:25:19 -07:00
@@ -55,8 +55,8 @@
bool all_constant= TRUE;
/* If the first argument is a FIELD_ITEM, pull out the field. */
- if (items[0]->type() == Item::FIELD_ITEM)
- field=((Item_field *)items[0])->field;
+ if (items[0]->real_item()->type() == Item::FIELD_ITEM)
+ field=((Item_field *)(items[0]->real_item()))->field;
/* But if it can't be compared as a longlong, we don't really care. */
if (field && !field->can_be_compared_as_longlong())
field= NULL;
--- 1.154/mysql-test/r/view.result 2006-04-05 14:00:46 -07:00
+++ 1.155/mysql-test/r/view.result 2006-04-10 14:25:18 -07:00
@@ -2579,3 +2579,24 @@
2
DROP VIEW v2;
DROP TABLE t1, t2;
+CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
+td date DEFAULT NULL, KEY idx(td));
+INSERT INTO t1 VALUES
+(1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
+(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
+(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM t1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
+id td
+2 2005-01-02
+3 2005-01-02
+4 2005-01-03
+5 2005-01-04
+SELECT * FROM v1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
+id td
+2 2005-01-02
+3 2005-01-02
+4 2005-01-03
+5 2005-01-04
+DROP VIEW v1;
+DROP TABLE t1;
--- 1.142/mysql-test/t/view.test 2006-04-05 14:00:46 -07:00
+++ 1.143/mysql-test/t/view.test 2006-04-10 14:25:19 -07:00
@@ -2439,3 +2439,23 @@
DROP VIEW v2;
DROP TABLE t1, t2;
+
+#
+# Bug #16069: VIEW does return the same results as underlying SELECT
+# with WHERE condition containing BETWEEN over dates
+
+CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
+ td date DEFAULT NULL, KEY idx(td));
+
+INSERT INTO t1 VALUES
+ (1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
+ (4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
+ (7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+SELECT * FROM t1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
+SELECT * FROM v1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
+
+DROP VIEW v1;
+DROP TABLE t1;
--- 1.102/mysql-test/mysql-test-run.pl 2006-04-09 00:35:16 -07:00
+++ 1.103/mysql-test/mysql-test-run.pl 2006-04-10 14:25:18 -07:00
@@ -3194,11 +3194,6 @@
mtr_init_args(\$args);
- if ( $opt_valgrind_mysqltest )
- {
- valgrind_arguments($args, \$exe);
- }
-
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--silent");
mtr_add_arg($args, "-v");
@@ -3313,6 +3308,17 @@
# ----------------------------------------------------------------------
# Add arguments that should not go into the MYSQL_TEST env var
# ----------------------------------------------------------------------
+
+ if ( $opt_valgrind_mysqltest )
+ {
+ # Prefix the Valgrind options to the argument list.
+ # We do this here, since we do not want to Valgrind the nested invocations
+ # of mysqltest; that would mess up the stderr output causing test failure.
+ my @args_saved = @$args;
+ mtr_init_args(\$args);
+ valgrind_arguments($args, \$exe);
+ mtr_add_arg($args, "%s", $_) for @args_saved;
+ }
mtr_add_arg($args, "--test-file");
mtr_add_arg($args, $tinfo->{'path'});
| Thread |
|---|
| • bk commit into 5.1 tree (igor:1.2313) | igor | 10 Apr |