List:Commits« Previous MessageNext Message »
From:Evgeny Potemkin Date:August 24 2011 3:02pm
Subject:bzr push into mysql-trunk branch (evgeny.potemkin:3400)
View as plain text  
 3400 Evgeny Potemkin	2011-08-24 [merge]
      Auto-merge.

    modified:
      mysql-test/suite/perfschema/include/socket_summary_check.inc
      mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
      mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
      mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
      storage/innobase/dict/dict0stats.c
      storage/innobase/handler/ha_innodb.cc
=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result	2011-08-23 05:45:43 +0000
+++ b/mysql-test/r/derived.result	2011-08-24 14:47:26 +0000
@@ -1561,3 +1561,26 @@ DROP FUNCTION func1;
 DROP FUNCTION func2;
 DROP TABLE t1;
 #
+#
+# Bug#12909844: Missing type cast caused false assertion
+#
+CREATE TABLE t1 ( fk INT) ENGINE=INNODB;
+CREATE TABLE t2 (
+f1 INT,  f2 INT,  f3 INT,  f4 INT,  f5 INT,  f6 INT,
+f7 INT,  f8 INT,  f9 INT,  f10 INT, f11 INT, f12 INT,
+f13 INT, f14 INT, f15 INT, f16 INT, f17 INT, f18 INT,
+f19 INT, f20 INT, f21 INT, f22 INT, f23 INT, f24 INT,
+f25 INT, f26 INT, f27 INT, f28 INT, f29 INT, f30 INT,
+f31 INT, f32 TEXT, fk INT) ENGINE=INNODB;
+SELECT alias2.fk AS field1 FROM t1 AS alias1 JOIN
+(SELECT * FROM t2 ) AS alias2 ON alias1.fk = alias2.fk;
+field1
+EXPLAIN 
+SELECT alias2.fk AS field1 FROM t1 AS alias1 JOIN
+(SELECT * FROM t2 ) AS alias2 ON alias1.fk = alias2.fk;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	alias1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	PRIMARY	<derived2>	ref	auto_key0	auto_key0	5	test.alias1.fk	2	
+2	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	1	
+DROP TABLE t1, t2;
+#

=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test	2011-08-23 05:45:43 +0000
+++ b/mysql-test/t/derived.test	2011-08-24 14:47:26 +0000
@@ -923,3 +923,22 @@ DROP FUNCTION func2;
 DROP TABLE t1;
 --echo #
 
+--echo #
+--echo # Bug#12909844: Missing type cast caused false assertion
+--echo #
+CREATE TABLE t1 ( fk INT) ENGINE=INNODB;
+CREATE TABLE t2 (
+f1 INT,  f2 INT,  f3 INT,  f4 INT,  f5 INT,  f6 INT,
+f7 INT,  f8 INT,  f9 INT,  f10 INT, f11 INT, f12 INT,
+f13 INT, f14 INT, f15 INT, f16 INT, f17 INT, f18 INT,
+f19 INT, f20 INT, f21 INT, f22 INT, f23 INT, f24 INT,
+f25 INT, f26 INT, f27 INT, f28 INT, f29 INT, f30 INT,
+f31 INT, f32 TEXT, fk INT) ENGINE=INNODB;
+SELECT alias2.fk AS field1 FROM t1 AS alias1 JOIN
+  (SELECT * FROM t2 ) AS alias2 ON alias1.fk = alias2.fk;
+EXPLAIN 
+SELECT alias2.fk AS field1 FROM t1 AS alias1 JOIN
+  (SELECT * FROM t2 ) AS alias2 ON alias1.fk = alias2.fk;
+DROP TABLE t1, t2;
+--echo #
+

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2011-08-23 05:45:43 +0000
+++ b/sql/table.cc	2011-08-24 14:47:26 +0000
@@ -5283,7 +5283,8 @@ bool TABLE::add_tmp_key(ulonglong key_pa
   for (reg_field=field ; *reg_field; i++, reg_field++)
   {
     // Ensure that we're not creating a key over a blob field.
-    DBUG_ASSERT(!(key_parts & (1 << i) && (*reg_field)->flags & BLOB_FLAG));
+    DBUG_ASSERT(!((key_parts & (1ULL << i)) &&
+                (*reg_field)->flags & BLOB_FLAG));
     field_count++;
   }
   uint key_part_count= my_count_bits(key_parts);
@@ -5312,7 +5313,7 @@ bool TABLE::add_tmp_key(ulonglong key_pa
   keys_in_use_for_order_by.set_bit(s->keys);
   for (i= 0, reg_field=field ; *reg_field; i++, reg_field++)
   {
-    if (!(key_parts & (1 << i)))
+    if (!(key_parts & (1ULL << i)))
       continue;
 
     if (key_start)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (evgeny.potemkin:3400) Evgeny Potemkin24 Aug