List:Commits« Previous MessageNext Message »
From:Marc Alff Date:April 13 2010 2:30pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (marc.alff:3129)
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-next-mr-bugfixing-45355/ based on revid:marc.alff@stripped

 3129 Marc Alff	2010-04-13 [merge]
      local merge

    modified:
      mysql-test/r/count_distinct.result
      mysql-test/t/count_distinct.test
      sql/sql_select.cc
      storage/perfschema/unittest/pfs-t.cc
      storage/perfschema/unittest/pfs_instr-oom-t.cc
      storage/perfschema/unittest/pfs_instr-t.cc
      storage/perfschema/unittest/pfs_instr_class-oom-t.cc
      storage/perfschema/unittest/pfs_instr_class-t.cc
=== modified file 'mysql-test/r/count_distinct.result'
--- a/mysql-test/r/count_distinct.result	2009-12-22 09:52:23 +0000
+++ b/mysql-test/r/count_distinct.result	2010-04-13 09:38:28 +0000
@@ -86,3 +86,11 @@ select count(distinct if(f1,3,f2)) from 
 count(distinct if(f1,3,f2))
 2
 drop table t1;
+create table t1 (i int);
+insert into t1 values (0), (1);
+create view v1 as select * from t1;
+select count(distinct i) from v1;
+count(distinct i)
+2
+drop table t1;
+drop view v1;

=== modified file 'mysql-test/t/count_distinct.test'
--- a/mysql-test/t/count_distinct.test	2009-12-22 09:52:23 +0000
+++ b/mysql-test/t/count_distinct.test	2010-04-13 09:38:28 +0000
@@ -96,3 +96,14 @@ insert into t1 values (0,1),(1,2);
 select count(distinct if(f1,3,f2)) from t1;
 drop table t1;
 
+#
+# Bug #51980 "mysqld service crashes with a simple COUNT(DISTINCT) query 
+#             over a view"
+#
+
+create table t1 (i int);
+insert into t1 values (0), (1);
+create view v1 as select * from t1;
+select count(distinct i) from v1;
+drop table t1;
+drop view v1;

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-04-01 19:34:09 +0000
+++ b/sql/sql_select.cc	2010-04-13 12:16:36 +0000
@@ -4157,7 +4157,7 @@ is_indexed_agg_distinct(JOIN *join, List
         optimization is applicable 
       */
       if (out_args)
-        out_args->push_back((Item_field *) expr);
+        out_args->push_back((Item_field *) expr->real_item());
       result= true;
     }
   }

=== modified file 'storage/perfschema/unittest/pfs-t.cc'
--- a/storage/perfschema/unittest/pfs-t.cc	2010-03-31 14:05:33 +0000
+++ b/storage/perfschema/unittest/pfs-t.cc	2010-04-13 11:48:46 +0000
@@ -13,6 +13,7 @@
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include <my_pthread.h>
 #include <sql_priv.h>
 #include <my_global.h>
 #include <pfs_server.h>

=== modified file 'storage/perfschema/unittest/pfs_instr-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr-oom-t.cc	2010-03-31 14:05:33 +0000
+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc	2010-04-13 11:48:46 +0000
@@ -13,6 +13,7 @@
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include <my_pthread.h>
 #include <sql_priv.h>
 #include <my_global.h>
 #include <pfs_instr.h>

=== modified file 'storage/perfschema/unittest/pfs_instr-t.cc'
--- a/storage/perfschema/unittest/pfs_instr-t.cc	2010-03-31 14:05:33 +0000
+++ b/storage/perfschema/unittest/pfs_instr-t.cc	2010-04-13 11:48:46 +0000
@@ -13,6 +13,7 @@
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include <my_pthread.h>
 #include <sql_priv.h>
 #include <my_global.h>
 #include <pfs_instr.h>

=== modified file 'storage/perfschema/unittest/pfs_instr_class-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc	2010-03-31 14:05:33 +0000
+++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc	2010-04-13 11:48:46 +0000
@@ -13,6 +13,7 @@
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include <my_pthread.h>
 #include <sql_priv.h>
 #include <my_global.h>
 #include <pfs_instr_class.h>

=== modified file 'storage/perfschema/unittest/pfs_instr_class-t.cc'
--- a/storage/perfschema/unittest/pfs_instr_class-t.cc	2010-03-31 14:05:33 +0000
+++ b/storage/perfschema/unittest/pfs_instr_class-t.cc	2010-04-13 11:48:46 +0000
@@ -13,8 +13,10 @@
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-#include <sql_priv.h>
+#include <my_pthread.h>
 #include <my_global.h>
+#include <sql_priv.h>
+
 #include <string.h>                             // strncpy
 #include <pfs_instr_class.h>
 #include <pfs_instr.h>


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100413143009-xay3250b7hlh0jvv.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (marc.alff:3129)Marc Alff13 Apr