3402 Evgeny Potemkin 2011-08-26 [merge]
Auto-merge.
added:
unittest/gunit/decimal-t.cc
modified:
VERSION
extra/innochecksum.c
include/mysql/psi/mysql_socket.h
include/mysql/psi/psi.h
include/mysql/psi/psi_abi_v1.h.pp
mysql-test/r/func_math.result
mysql-test/t/func_math.test
mysys/psi_noop.cc
storage/perfschema/pfs.cc
storage/perfschema/pfs_account.cc
storage/perfschema/pfs_host.cc
storage/perfschema/pfs_instr.cc
storage/perfschema/pfs_instr_class.cc
storage/perfschema/pfs_setup_actor.cc
storage/perfschema/pfs_setup_object.cc
storage/perfschema/pfs_user.cc
strings/decimal.c
unittest/gunit/CMakeLists.txt
=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result 2011-08-24 14:47:26 +0000
+++ b/mysql-test/r/derived.result 2011-08-26 08:55:54 +0000
@@ -1584,3 +1584,14 @@ id select_type table type possible_keys
2 DERIVED t2 ALL NULL NULL NULL NULL 1
DROP TABLE t1, t2;
#
+#
+# Bug#12910039: Incorrect merge caused segmentation fault.
+#
+CREATE TABLE t1 (f1 int) ENGINE=myisam;
+CREATE TABLE t2 (f1 text) ENGINE=innodb;
+SELECT 1 FROM (
+( SELECT * FROM ( SELECT * FROM t2 ) AS alias1 ) AS alias1,
+( SELECT * FROM t1 ) AS alias2 );
+1
+DROP TABLE t1,t2;
+#
=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test 2011-08-24 14:47:26 +0000
+++ b/mysql-test/t/derived.test 2011-08-26 08:55:54 +0000
@@ -942,3 +942,14 @@ SELECT alias2.fk AS field1 FROM t1 AS al
DROP TABLE t1, t2;
--echo #
+--echo #
+--echo # Bug#12910039: Incorrect merge caused segmentation fault.
+--echo #
+CREATE TABLE t1 (f1 int) ENGINE=myisam;
+CREATE TABLE t2 (f1 text) ENGINE=innodb;
+SELECT 1 FROM (
+ ( SELECT * FROM ( SELECT * FROM t2 ) AS alias1 ) AS alias1,
+ ( SELECT * FROM t1 ) AS alias2 );
+DROP TABLE t1,t2;
+--echo #
+
=== modified file 'sql/records.cc'
--- a/sql/records.cc 2011-07-28 12:53:50 +0000
+++ b/sql/records.cc 2011-08-26 08:55:54 +0000
@@ -302,8 +302,7 @@ void end_read_record(READ_RECORD *info)
my_free_lock(info->cache);
info->cache=0;
}
- if (info->table &&
- (info->table->s->tmp_table != INTERNAL_TMP_TABLE || info->table->created))
+ if (info->table && info->table->created)
{
filesort_free_buffers(info->table,0);
(void) info->table->file->extra(HA_EXTRA_NO_CACHE);
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2011-08-19 13:04:28 +0000
+++ b/sql/sql_base.cc 2011-08-26 08:55:54 +0000
@@ -6087,6 +6087,7 @@ TABLE *open_table_uncached(THD *thd, con
modify_slave_open_temp_tables(thd, 1);
}
tmp_table->pos_in_table_list= 0;
+ tmp_table->created= true;
DBUG_PRINT("tmptable", ("opened table: '%s'.'%s' 0x%lx", tmp_table->s->db.str,
tmp_table->s->table_name.str, (long) tmp_table));
DBUG_RETURN(tmp_table);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (evgeny.potemkin:3402) | Evgeny Potemkin | 26 Aug |