List:Commits« Previous MessageNext Message »
From:Evgeny Potemkin Date:February 15 2012 10:48am
Subject:bzr push into mysql-trunk branch (evgeny.potemkin:3852)
View as plain text  
 3852 Evgeny Potemkin	2012-02-15 [merge]
      Auto-merged.

    added:
      mysql-test/r/archive_no_symlink.result
      mysql-test/r/archive_symlink.result
      mysql-test/r/debug_sync2.result
      mysql-test/suite/innodb/r/innodb-index-debug.result
      mysql-test/suite/innodb/r/innodb_bug-13628249.result
      mysql-test/suite/innodb/t/innodb-index-debug.test
      mysql-test/suite/innodb/t/innodb_bug-13628249.test
      mysql-test/suite/sys_vars/r/innodb_max_purge_lag_delay_basic.result
      mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test
      mysql-test/t/archive_no_symlink-master.opt
      mysql-test/t/archive_no_symlink.test
      mysql-test/t/archive_symlink.test
      mysql-test/t/debug_sync2-master.opt
      mysql-test/t/debug_sync2.test
      mysql-test/t/subquery_sj_all-master.opt
      mysql-test/t/subquery_sj_all_bka-master.opt
      mysql-test/t/subquery_sj_all_bka_nixbnl-master.opt
      mysql-test/t/subquery_sj_all_bkaunique-master.opt
      mysql-test/t/subquery_sj_dupsweed-master.opt
      mysql-test/t/subquery_sj_dupsweed_bka-master.opt
      mysql-test/t/subquery_sj_dupsweed_bka_nixbnl-master.opt
      mysql-test/t/subquery_sj_dupsweed_bkaunique-master.opt
      mysql-test/t/subquery_sj_firstmatch-master.opt
      mysql-test/t/subquery_sj_firstmatch_bka-master.opt
    modified:
      client/mysqldump.c
      include/violite.h
      mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
      mysql-test/extra/rpl_tests/rpl_multi_update.test
      mysql-test/extra/rpl_tests/rpl_multi_update2.test
      mysql-test/extra/rpl_tests/rpl_multi_update3.test
      mysql-test/include/icp_tests.inc
      mysql-test/include/index_merge1.inc
      mysql-test/include/join_cache.inc
      mysql-test/include/subquery.inc
      mysql-test/include/subquery_mat.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/create-big.result
      mysql-test/r/events_restart.result
      mysql-test/r/group_by.result
      mysql-test/r/heap.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_all.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/innodb_mysql_sync.result
      mysql-test/r/join_cache_bka.result
      mysql-test/r/join_cache_bka_nixbnl.result
      mysql-test/r/join_cache_bkaunique.result
      mysql-test/r/join_cache_bnl.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/r/lock.result
      mysql-test/r/multi_update.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_all.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/r/partition_windows.result
      mysql-test/r/ps.result
      mysql-test/r/ps_2myisam.result
      mysql-test/r/ps_3innodb.result
      mysql-test/r/ps_4heap.result
      mysql-test/r/ps_5merge.result
      mysql-test/r/query_cache.result
      mysql-test/r/read_only.result
      mysql-test/r/sp-code.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_all_bka_nixbnl.result
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_bka.result
      mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_bka.result
      mysql-test/r/subquery_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/type_blob.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/r/type_time.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/engines/funcs/r/datetime_function.result
      mysql-test/suite/engines/funcs/r/ld_all_number_string_calendar_types.result
      mysql-test/suite/funcs_1/r/myisam_views-big.result
      mysql-test/suite/innodb/r/innodb_monitor.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb-index.test
      mysql-test/suite/opt_trace/include/general.inc
      mysql-test/suite/opt_trace/include/general2.inc
      mysql-test/suite/opt_trace/include/subquery.inc
      mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result
      mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/opt_trace/r/general_no_prot_all.result
      mysql-test/suite/opt_trace/r/general_no_prot_none.result
      mysql-test/suite/opt_trace/r/general_ps_prot_all.result
      mysql-test/suite/opt_trace/r/general_ps_prot_none.result
      mysql-test/suite/opt_trace/r/subquery_no_prot.result
      mysql-test/suite/opt_trace/r/subquery_ps_prot.result
      mysql-test/suite/opt_trace/r/temp_table.result
      mysql-test/suite/opt_trace/t/temp_table.test
      mysql-test/suite/perfschema/r/threads_innodb.result
      mysql-test/suite/rpl/r/rpl_auto_increment_11932.result
      mysql-test/suite/rpl/r/rpl_corruption.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
      mysql-test/suite/rpl/r/rpl_insert_id_pk.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_multi_update.result
      mysql-test/suite/rpl/r/rpl_multi_update2.result
      mysql-test/suite/rpl/r/rpl_multi_update3.result
      mysql-test/suite/rpl/r/rpl_parallel_temp_query.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/t/rpl_auto_increment_11932.test
      mysql-test/suite/rpl/t/rpl_corruption.test
      mysql-test/suite/rpl/t/rpl_multi_update2.test
      mysql-test/suite/rpl/t/rpl_multi_update3.test
      mysql-test/suite/rpl/t/rpl_optimize.test
      mysql-test/suite/rpl/t/rpl_parallel_temp_query.test
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test
      mysql-test/suite/rpl/t/rpl_timezone.test
      mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
      mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
      mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
      mysql-test/t/create-big.test
      mysql-test/t/events_restart.test
      mysql-test/t/group_by.test
      mysql-test/t/heap.test
      mysql-test/t/innodb_mysql_sync.test
      mysql-test/t/lock.test
      mysql-test/t/multi_update.test
      mysql-test/t/ps.test
      mysql-test/t/query_cache.test
      mysql-test/t/read_only.test
      mysql-test/t/type_blob.test
      mysql-test/t/type_time.test
      sql-common/my_time.c
      sql/debug_sync.cc
      sql/events.cc
      sql/field.cc
      sql/item.h
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
      sql/item_subselect.cc
      sql/item_subselect.h
      sql/lex.h
      sql/log_event.cc
      sql/opt_range.cc
      sql/partition_info.cc
      sql/share/errmsg-utf8.txt
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_executor.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
      sql/sql_parse.cc
      sql/sql_resolver.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_tmp_table.cc
      sql/sql_yacc.yy
      sql/sys_vars.cc
      storage/archive/ha_archive.cc
      storage/heap/hp_hash.c
      storage/innobase/dict/dict0stats.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/ha_prototypes.h
      storage/innobase/include/srv0mon.h
      storage/innobase/include/srv0srv.h
      storage/innobase/include/trx0purge.h
      storage/innobase/lock/lock0lock.cc
      storage/innobase/log/log0log.cc
      storage/innobase/log/log0recv.cc
      storage/innobase/row/row0merge.cc
      storage/innobase/srv/srv0mon.cc
      storage/innobase/srv/srv0srv.cc
      storage/innobase/srv/srv0start.cc
      storage/innobase/trx/trx0purge.cc
      storage/innobase/trx/trx0roll.cc
      storage/innobase/trx/trx0sys.cc
      storage/innobase/trx/trx0trx.cc
      storage/myisam/ha_myisam.cc
      tests/mysql_client_test.c
      unittest/gunit/opt_range-t.cc
      vio/vio.c
      vio/viosocket.c
=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result	2012-01-30 13:13:15 +0000
+++ b/mysql-test/r/derived.result	2012-02-13 10:42:27 +0000
@@ -1949,3 +1949,16 @@ ORDER BY grandparent.col_varchar_nokey;
 g1
 r
 DROP TABLE t1, t2, t3;
+#
+# Bug#13457552: Crash on instantiating a derived table in a query with
+#               empty result.
+#
+CREATE TABLE t1 ( pk INT, col_blob BLOB ) ENGINE = MyISAM;
+CREATE TABLE t2 ( pk INT, col_blob BLOB ) ENGINE = InnoDB;
+SELECT pk FROM ( SELECT col_blob, pk FROM t2 ) AS A NATURAL JOIN t1;
+pk
+EXPLAIN SELECT pk FROM ( SELECT col_blob, pk FROM t2 ) AS A NATURAL JOIN t1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+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-11-30 11:36:14 +0000
+++ b/mysql-test/t/derived.test	2012-02-13 10:42:27 +0000
@@ -1307,3 +1307,14 @@ eval $query;
 
 DROP TABLE t1, t2, t3;
 
+--echo #
+--echo # Bug#13457552: Crash on instantiating a derived table in a query with
+--echo #               empty result.
+--echo #
+CREATE TABLE t1 ( pk INT, col_blob BLOB ) ENGINE = MyISAM;
+CREATE TABLE t2 ( pk INT, col_blob BLOB ) ENGINE = InnoDB;
+SELECT pk FROM ( SELECT col_blob, pk FROM t2 ) AS A NATURAL JOIN t1;
+EXPLAIN SELECT pk FROM ( SELECT col_blob, pk FROM t2 ) AS A NATURAL JOIN t1;
+DROP TABLE t1,t2;
+
+

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2012-02-08 15:25:17 +0000
+++ b/sql/sql_select.cc	2012-02-15 10:47:01 +0000
@@ -783,7 +783,8 @@ bool JOIN::prepare_result(List<Item> **c
 
   error= 0;
   /* Create result tables for materialized views. */
-  if (select_lex->handle_derived(thd->lex, &mysql_derived_create))
+  if (!zero_result_cause &&
+      select_lex->handle_derived(thd->lex, &mysql_derived_create))
     goto err;
 
   (void) result->prepare2(); // Currently, this cannot fail.

=== modified file 'sql/sql_tmp_table.cc'
--- a/sql/sql_tmp_table.cc	2012-02-10 09:06:59 +0000
+++ b/sql/sql_tmp_table.cc	2012-02-15 10:47:01 +0000
@@ -1647,6 +1647,11 @@ bool create_myisam_tmp_table(TABLE *tabl
   if (share->keys)
   {						// Get keys for ni_create
     bool using_unique_constraint=0;
+    if (share->keys > 1)
+    {
+      DBUG_ASSERT(0); // This code can't handle more than 1 key
+      share->keys= 1;
+    }
     HA_KEYSEG *seg= (HA_KEYSEG*) alloc_root(&table->mem_root,
                                             sizeof(*seg) * keyinfo->key_parts);
     if (!seg)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (evgeny.potemkin:3852) Evgeny Potemkin15 Feb