[Commits] Rev 3733: Merge in file:///home/igor/maria/maria-5.3/

Igor Babaev igor at askmonty.org
Thu Dec 5 22:40:05 EET 2013


At file:///home/igor/maria/maria-5.3/

------------------------------------------------------------
revno: 3733 [merge]
revision-id: igor at askmonty.org-20131205204004-10sjgp6dy3tb937b
parent: sanja at askmonty.org-20131204145433-i54vkc1iwbgw41oz
parent: igor at askmonty.org-20131205191320-pfja761po2x9p9ri
committer: Igor Babaev <igor at askmonty.org>
branch nick: maria-5.3
timestamp: Thu 2013-12-05 12:40:04 -0800
message:
  Merge
modified:
  mysql-test/r/union.result      sp1f-unions_one.result-20010725122836-ofxtwraxeohz7whhrmfdz57sl4a5prmp
  mysql-test/t/union.test        sp1f-unions_one.test-20010725122836-57cnbpjvizewgwar32kmidvvj6jsf7rz
  sql/sql_base.cc                sp1f-sql_base.cc-19700101030959-w7tul2gb2n4jzayjwlslj3ybmf3uhk6a
-------------- next part --------------
=== modified file 'mysql-test/r/union.result'
--- a/mysql-test/r/union.result	2013-11-13 22:43:09 +0000
+++ b/mysql-test/r/union.result	2013-12-05 19:13:20 +0000
@@ -1738,4 +1738,19 @@
 6
 DROP VIEW v1;
 DROP TABLE t1;
+#
+# mdev-5382:  UNION with ORDER BY in subselect
+#
+CREATE TABLE t1 (a int DEFAULT NULL);
+INSERT INTO t1 VALUES (2), (4);
+CREATE TABLE t2 (b int DEFAULT NULL);
+INSERT INTO t2 VALUES (1), (3);
+SELECT c1 FROM (SELECT (SELECT a FROM t1 WHERE t1.a <= t2.b
+UNION ALL
+SELECT a FROM t1 WHERE t1.a+3<= t2.b
+ORDER BY a DESC) AS c1 FROM t2) t3;
+c1
+NULL
+2
+DROP TABLE t1,t2;
 End of 5.3 tests

=== modified file 'mysql-test/t/union.test'
--- a/mysql-test/t/union.test	2013-11-13 22:43:09 +0000
+++ b/mysql-test/t/union.test	2013-12-05 19:13:20 +0000
@@ -1227,5 +1227,21 @@
  DROP VIEW v1;
  DROP TABLE t1;
 
+--echo #
+--echo # mdev-5382:  UNION with ORDER BY in subselect
+--echo #
+ 
+ CREATE TABLE t1 (a int DEFAULT NULL);
+ INSERT INTO t1 VALUES (2), (4);
+ CREATE TABLE t2 (b int DEFAULT NULL);
+ INSERT INTO t2 VALUES (1), (3);
+ 
+ SELECT c1 FROM (SELECT (SELECT a FROM t1 WHERE t1.a <= t2.b
+                         UNION ALL
+                         SELECT a FROM t1 WHERE t1.a+3<= t2.b
+                         ORDER BY a DESC) AS c1 FROM t2) t3;
+
+ DROP TABLE t1,t2;
+ 
  --echo End of 5.3 tests
 

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2013-10-10 17:08:26 +0000
+++ b/sql/sql_base.cc	2013-12-05 19:13:20 +0000
@@ -6429,9 +6429,9 @@
           else
           {
             if (thd->mark_used_columns == MARK_COLUMNS_READ)
-              it->walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
+              it->walk(&Item::register_field_in_read_map, 0, (uchar *) 0);
             else
-              it->walk(&Item::register_field_in_write_map, 1, (uchar *) 0);
+              it->walk(&Item::register_field_in_write_map, 0, (uchar *) 0);
           }
         }
         else



More information about the commits mailing list