List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:July 20 2011 1:33pm
Subject:bzr push into mysql-trunk branch (tor.didriksen:3344 to 3345)
View as plain text  
 3345 Tor Didriksen	2011-07-20 [merge]
      Merge opt-backporting => opt-team

    renamed:
      mysql-test/suite/optimizer_trace/ => mysql-test/suite/opt_trace/
      mysql-test/suite/optimizer_trace/include/optimizer_trace.inc => mysql-test/suite/opt_trace/include/general.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace2.inc => mysql-test/suite/opt_trace/include/general2.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_bugs.inc => mysql-test/suite/opt_trace/include/bugs.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_range.inc => mysql-test/suite/opt_trace/include/range.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_security.inc => mysql-test/suite/opt_trace/include/security.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_subquery.inc => mysql-test/suite/opt_trace/include/subquery.inc
      mysql-test/suite/optimizer_trace/r/optimizer_trace2_no_prot.result => mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace2_ps_prot.result => mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_no_prot_all.result => mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_no_prot_none.result => mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_ps_prot_all.result => mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_ps_prot_none.result => mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_charset.result => mysql-test/suite/opt_trace/r/charset.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_debug.result => mysql-test/suite/opt_trace/r/debug.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_no_prot_all.result => mysql-test/suite/opt_trace/r/general_no_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_no_prot_none.result => mysql-test/suite/opt_trace/r/general_no_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_ps_prot_all.result => mysql-test/suite/opt_trace/r/general_ps_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_ps_prot_none.result => mysql-test/suite/opt_trace/r/general_ps_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_range_no_prot.result => mysql-test/suite/opt_trace/r/range_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_range_ps_prot.result => mysql-test/suite/opt_trace/r/range_ps_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_security_no_prot.result => mysql-test/suite/opt_trace/r/security_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_security_ps_prot.result => mysql-test/suite/opt_trace/r/security_ps_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_subquery_no_prot.result => mysql-test/suite/opt_trace/r/subquery_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_subquery_ps_prot.result => mysql-test/suite/opt_trace/r/subquery_ps_prot.result
      mysql-test/suite/optimizer_trace/t/optimizer_trace2_no_prot.test => mysql-test/suite/opt_trace/t/general2_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace2_ps_prot.test => mysql-test/suite/opt_trace/t/general2_ps_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_all.test => mysql-test/suite/opt_trace/t/bugs_no_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_none.test => mysql-test/suite/opt_trace/t/bugs_no_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_all.test => mysql-test/suite/opt_trace/t/bugs_ps_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_none.test => mysql-test/suite/opt_trace/t/bugs_ps_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_charset.test => mysql-test/suite/opt_trace/t/charset.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_debug.test => mysql-test/suite/opt_trace/t/debug.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_all.test => mysql-test/suite/opt_trace/t/general_no_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_none.test => mysql-test/suite/opt_trace/t/general_no_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_all.test => mysql-test/suite/opt_trace/t/general_ps_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_none.test => mysql-test/suite/opt_trace/t/general_ps_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_range_no_prot.test => mysql-test/suite/opt_trace/t/range_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_range_ps_prot.test => mysql-test/suite/opt_trace/t/range_ps_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_security_no_prot.test => mysql-test/suite/opt_trace/t/security_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_security_ps_prot.test => mysql-test/suite/opt_trace/t/security_ps_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_no_prot.test => mysql-test/suite/opt_trace/t/subquery_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_ps_prot.test => mysql-test/suite/opt_trace/t/subquery_ps_prot.test
    modified:
      mysql-test/include/subquery.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_jcl6.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_jcl6.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_jcl6.result
      sql/item_subselect.cc
      sql/opt_trace.h
      mysql-test/suite/opt_trace/t/general2_no_prot.test
      mysql-test/suite/opt_trace/t/general2_ps_prot.test
      mysql-test/suite/opt_trace/t/bugs_no_prot_all.test
      mysql-test/suite/opt_trace/t/bugs_no_prot_none.test
      mysql-test/suite/opt_trace/t/bugs_ps_prot_all.test
      mysql-test/suite/opt_trace/t/bugs_ps_prot_none.test
      mysql-test/suite/opt_trace/t/general_no_prot_all.test
      mysql-test/suite/opt_trace/t/general_no_prot_none.test
      mysql-test/suite/opt_trace/t/general_ps_prot_all.test
      mysql-test/suite/opt_trace/t/general_ps_prot_none.test
      mysql-test/suite/opt_trace/t/range_no_prot.test
      mysql-test/suite/opt_trace/t/range_ps_prot.test
      mysql-test/suite/opt_trace/t/security_no_prot.test
      mysql-test/suite/opt_trace/t/security_ps_prot.test
      mysql-test/suite/opt_trace/t/subquery_no_prot.test
      mysql-test/suite/opt_trace/t/subquery_ps_prot.test
 3344 Tor Didriksen	2011-07-20 [merge]
      Merge opt-backporting => opt-team

    added:
      mysql-test/include/have_optimizer_trace.inc
      mysql-test/suite/optimizer_trace/
      mysql-test/suite/optimizer_trace/include/
      mysql-test/suite/optimizer_trace/include/optimizer_trace.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace2.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_bugs.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_range.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_security.inc
      mysql-test/suite/optimizer_trace/include/optimizer_trace_subquery.inc
      mysql-test/suite/optimizer_trace/r/
      mysql-test/suite/optimizer_trace/r/optimizer_trace2_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace2_ps_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_no_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_no_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_ps_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_ps_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_charset.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_debug.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_no_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_no_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_ps_prot_all.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_ps_prot_none.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_range_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_range_ps_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_security_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_security_ps_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_subquery_no_prot.result
      mysql-test/suite/optimizer_trace/r/optimizer_trace_subquery_ps_prot.result
      mysql-test/suite/optimizer_trace/t/
      mysql-test/suite/optimizer_trace/t/optimizer_trace2_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace2_ps_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_charset.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_debug.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_all.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_none.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_range_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_range_ps_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_security_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_security_ps_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_no_prot.test
      mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_ps_prot.test
      mysql-test/suite/optimizer_trace/validate_json.py
      mysql-test/suite/sys_vars/r/optimizer_trace_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_features_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_limit_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_max_mem_size_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_offset_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_offset_max.result
      mysql-test/suite/sys_vars/t/optimizer_trace_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_features_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_limit_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_max_mem_size_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_offset_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_offset_max-master.opt
      mysql-test/suite/sys_vars/t/optimizer_trace_offset_max.test
      sql/opt_trace.cc
      sql/opt_trace.h
      sql/opt_trace2server.cc
      sql/opt_trace_Doxyfile
      sql/opt_trace_context.h
      unittest/gunit/opt_trace-t.cc
    modified:
      .bzrignore
      CMakeLists.txt
      client/mysqltest.cc
      config.h.cmake
      dbug/dbug.c
      include/my_getopt.h
      include/my_sys.h
      include/mysql/plugin.h
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      mysql-test/collections/default.experimental
      mysql-test/mysql-test-run.pl
      mysql-test/r/archive_gis.result
      mysql-test/r/auto_increment.result
      mysql-test/r/bench_count_distinct.result
      mysql-test/r/bigint.result
      mysql-test/r/case.result
      mysql-test/r/cast.result
      mysql-test/r/compare.result
      mysql-test/r/compress.result
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_collate.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/date_formats.result
      mysql-test/r/explain.result
      mysql-test/r/fulltext.result
      mysql-test/r/func_compress.result
      mysql-test/r/func_crypt.result
      mysql-test/r/func_default.result
      mysql-test/r/func_encrypt.result
      mysql-test/r/func_gconcat.result
      mysql-test/r/func_group.result
      mysql-test/r/func_if.result
      mysql-test/r/func_in_all.result
      mysql-test/r/func_in_icp.result
      mysql-test/r/func_in_icp_mrr.result
      mysql-test/r/func_in_mrr.result
      mysql-test/r/func_in_mrr_cost.result
      mysql-test/r/func_in_none.result
      mysql-test/r/func_like.result
      mysql-test/r/func_math.result
      mysql-test/r/func_op.result
      mysql-test/r/func_regexp.result
      mysql-test/r/func_set.result
      mysql-test/r/func_str.result
      mysql-test/r/func_system.result
      mysql-test/r/func_test.result
      mysql-test/r/func_time.result
      mysql-test/r/gis.result
      mysql-test/r/group_by.result
      mysql-test/r/group_min_max.result
      mysql-test/r/having.result
      mysql-test/r/information_schema.result
      mysql-test/r/information_schema_db.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_explain_non_select_none.result
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_all.result
      mysql-test/r/innodb_mrr_cost.result
      mysql-test/r/innodb_mrr_cost_all.result
      mysql-test/r/innodb_mrr_cost_icp.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/insert_update.result
      mysql-test/r/join.result
      mysql-test/r/join_nested.result
      mysql-test/r/join_nested_jcl6.result
      mysql-test/r/join_outer.result
      mysql-test/r/join_outer_jcl6.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_explain_non_select_none.result
      mysql-test/r/myisam_mrr.result
      mysql-test/r/myisam_mrr_all.result
      mysql-test/r/myisam_mrr_cost.result
      mysql-test/r/myisam_mrr_cost_all.result
      mysql-test/r/myisam_mrr_cost_icp.result
      mysql-test/r/myisam_mrr_icp.result
      mysql-test/r/myisam_mrr_none.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqlshow.result
      mysql-test/r/named_pipe.result
      mysql-test/r/negation_elimination.result
      mysql-test/r/null.result
      mysql-test/r/olap.result
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/partition.result
      mysql-test/r/partition_pruning.result
      mysql-test/r/ps.result
      mysql-test/r/query_cache.result
      mysql-test/r/row.result
      mysql-test/r/select_all.result
      mysql-test/r/select_all_jcl6.result
      mysql-test/r/select_icp_mrr.result
      mysql-test/r/select_icp_mrr_jcl6.result
      mysql-test/r/select_none.result
      mysql-test/r/select_none_jcl6.result
      mysql-test/r/shm.result
      mysql-test/r/ssl.result
      mysql-test/r/ssl_compress.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_jcl6.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_jcl6.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_jcl6.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_jcl6.result
      mysql-test/r/subquery_sj_all_jcl7.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_jcl6.result
      mysql-test/r/subquery_sj_dupsweed_jcl7.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_jcl6.result
      mysql-test/r/subquery_sj_firstmatch_jcl7.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_jcl6.result
      mysql-test/r/subquery_sj_loosescan_jcl7.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_jcl6.result
      mysql-test/r/subquery_sj_mat_jcl7.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_jcl6.result
      mysql-test/r/subquery_sj_none_jcl7.result
      mysql-test/r/subselect_innodb.result
      mysql-test/r/type_blob.result
      mysql-test/r/type_datetime.result
      mysql-test/r/udf.result
      mysql-test/r/union.result
      mysql-test/r/varbinary.result
      mysql-test/r/variables.result
      mysql-test/r/view.result
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
      mysql-test/suite/funcs_1/r/is_tables_is.result
      mysql-test/suite/innodb/r/innodb_gis.result
      mysql-test/suite/rpl/r/rpl_get_lock.result
      mysql-test/suite/rpl/r/rpl_master_pos_wait.result
      mysql-test/suite/sys_vars/t/all_vars.test
      mysys/array.c
      mysys/my_alloc.c
      mysys/my_getopt.c
      mysys/my_malloc.c
      sql/CMakeLists.txt
      sql/handler.h
      sql/item.cc
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
      sql/item_func.cc
      sql/item_subselect.cc
      sql/item_subselect.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/opt_explain.cc
      sql/opt_range.cc
      sql/opt_range.h
      sql/set_var.cc
      sql/set_var.h
      sql/sp_head.cc
      sql/sp_head.h
      sql/sql_array.h
      sql/sql_base.cc
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_derived.cc
      sql/sql_help.cc
      sql/sql_parse.cc
      sql/sql_plugin.h
      sql/sql_prepare.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_test.cc
      sql/sql_test.h
      sql/sql_update.cc
      sql/sql_view.cc
      sql/sys_vars.cc
      sql/sys_vars.h
      sql/table.cc
      unittest/gunit/CMakeLists.txt
=== modified file 'mysql-test/include/subquery.inc'
--- a/mysql-test/include/subquery.inc	2011-07-20 08:46:04 +0000
+++ b/mysql-test/include/subquery.inc	2011-07-20 13:32:12 +0000
@@ -4034,6 +4034,30 @@ SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
 
+--echo #
+--echo # Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+--echo #
+
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+
+## All these are subject to the transformation
+## '1 < some (...)' => '1 < max(...)'
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+
+SET SESSION sql_mode=@old_sql_mode;
+
+DROP TABLE t1, t2;
+
 --echo End of 5.0 tests.
 
 #

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-07-19 15:11:15 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-07-20 13:10:44 +0000
@@ -163,7 +163,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG
 
 # If you add a new suite, please check TEST_DIRS in Makefile.am.
 #
-my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,perfschema,funcs_1,optimizer_trace";
+my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,perfschema,funcs_1,opt_trace";
 my $opt_suites;
 
 our $opt_verbose= 0;  # Verbose output, enable with --verbose

=== modified file 'mysql-test/r/subquery_all.result'
--- a/mysql-test/r/subquery_all.result	2011-07-20 10:29:12 +0000
+++ b/mysql-test/r/subquery_all.result	2011-07-20 13:32:12 +0000
@@ -5159,6 +5159,31 @@ ERROR 21000: Subquery returns more than 
 SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+#
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+1
+1
+1
+SET SESSION sql_mode=@old_sql_mode;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create table t_out (subcase char(3),
 a1 char(2), b1 char(2), c1 char(2));

=== modified file 'mysql-test/r/subquery_all_jcl6.result'
--- a/mysql-test/r/subquery_all_jcl6.result	2011-07-19 15:11:15 +0000
+++ b/mysql-test/r/subquery_all_jcl6.result	2011-07-20 07:39:07 +0000
@@ -5163,6 +5163,31 @@ ERROR 21000: Subquery returns more than 
 SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+#
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+1
+1
+1
+SET SESSION sql_mode=@old_sql_mode;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create table t_out (subcase char(3),
 a1 char(2), b1 char(2), c1 char(2));

=== modified file 'mysql-test/r/subquery_nomat_nosj.result'
--- a/mysql-test/r/subquery_nomat_nosj.result	2011-07-20 10:29:12 +0000
+++ b/mysql-test/r/subquery_nomat_nosj.result	2011-07-20 13:32:12 +0000
@@ -5159,6 +5159,31 @@ ERROR 21000: Subquery returns more than 
 SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+#
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+1
+1
+1
+SET SESSION sql_mode=@old_sql_mode;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create table t_out (subcase char(3),
 a1 char(2), b1 char(2), c1 char(2));

=== modified file 'mysql-test/r/subquery_nomat_nosj_jcl6.result'
--- a/mysql-test/r/subquery_nomat_nosj_jcl6.result	2011-07-19 15:11:15 +0000
+++ b/mysql-test/r/subquery_nomat_nosj_jcl6.result	2011-07-20 07:39:07 +0000
@@ -5163,6 +5163,31 @@ ERROR 21000: Subquery returns more than 
 SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+#
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+1
+1
+1
+SET SESSION sql_mode=@old_sql_mode;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create table t_out (subcase char(3),
 a1 char(2), b1 char(2), c1 char(2));

=== modified file 'mysql-test/r/subquery_none.result'
--- a/mysql-test/r/subquery_none.result	2011-07-20 10:29:12 +0000
+++ b/mysql-test/r/subquery_none.result	2011-07-20 13:32:12 +0000
@@ -5158,6 +5158,31 @@ ERROR 21000: Subquery returns more than 
 SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+#
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+1
+1
+1
+SET SESSION sql_mode=@old_sql_mode;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create table t_out (subcase char(3),
 a1 char(2), b1 char(2), c1 char(2));

=== modified file 'mysql-test/r/subquery_none_jcl6.result'
--- a/mysql-test/r/subquery_none_jcl6.result	2011-07-19 15:11:15 +0000
+++ b/mysql-test/r/subquery_none_jcl6.result	2011-07-20 07:39:07 +0000
@@ -5162,6 +5162,31 @@ ERROR 21000: Subquery returns more than 
 SET SESSION sql_mode=@old_sql_mode;
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER
+#
+CREATE TABLE t1(a1 int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2(a1 int);
+INSERT INTO t2 VALUES (3);
+SELECT @@session.sql_mode INTO @old_sql_mode;
+SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
+1
+1
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
+1
+SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
+1
+1
+1
+SET SESSION sql_mode=@old_sql_mode;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create table t_out (subcase char(3),
 a1 char(2), b1 char(2), c1 char(2));

=== renamed directory 'mysql-test/suite/optimizer_trace' => 'mysql-test/suite/opt_trace'
=== renamed file 'mysql-test/suite/optimizer_trace/include/optimizer_trace_bugs.inc' => 'mysql-test/suite/opt_trace/include/bugs.inc'
=== renamed file 'mysql-test/suite/optimizer_trace/include/optimizer_trace.inc' => 'mysql-test/suite/opt_trace/include/general.inc'
=== renamed file 'mysql-test/suite/optimizer_trace/include/optimizer_trace2.inc' => 'mysql-test/suite/opt_trace/include/general2.inc'
=== renamed file 'mysql-test/suite/optimizer_trace/include/optimizer_trace_range.inc' => 'mysql-test/suite/opt_trace/include/range.inc'
=== renamed file 'mysql-test/suite/optimizer_trace/include/optimizer_trace_security.inc' => 'mysql-test/suite/opt_trace/include/security.inc'
=== renamed file 'mysql-test/suite/optimizer_trace/include/optimizer_trace_subquery.inc' => 'mysql-test/suite/opt_trace/include/subquery.inc'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_no_prot_all.result' => 'mysql-test/suite/opt_trace/r/bugs_no_prot_all.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_no_prot_none.result' => 'mysql-test/suite/opt_trace/r/bugs_no_prot_none.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_ps_prot_all.result' => 'mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_bugs_ps_prot_none.result' => 'mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_charset.result' => 'mysql-test/suite/opt_trace/r/charset.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_debug.result' => 'mysql-test/suite/opt_trace/r/debug.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace2_no_prot.result' => 'mysql-test/suite/opt_trace/r/general2_no_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace2_ps_prot.result' => 'mysql-test/suite/opt_trace/r/general2_ps_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_no_prot_all.result' => 'mysql-test/suite/opt_trace/r/general_no_prot_all.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_no_prot_none.result' => 'mysql-test/suite/opt_trace/r/general_no_prot_none.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_ps_prot_all.result' => 'mysql-test/suite/opt_trace/r/general_ps_prot_all.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_ps_prot_none.result' => 'mysql-test/suite/opt_trace/r/general_ps_prot_none.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_range_no_prot.result' => 'mysql-test/suite/opt_trace/r/range_no_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_range_ps_prot.result' => 'mysql-test/suite/opt_trace/r/range_ps_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_security_no_prot.result' => 'mysql-test/suite/opt_trace/r/security_no_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_security_ps_prot.result' => 'mysql-test/suite/opt_trace/r/security_ps_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_subquery_no_prot.result' => 'mysql-test/suite/opt_trace/r/subquery_no_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/r/optimizer_trace_subquery_ps_prot.result' => 'mysql-test/suite/opt_trace/r/subquery_ps_prot.result'
=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_all.test' => 'mysql-test/suite/opt_trace/t/bugs_no_prot_all.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_all.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/bugs_no_prot_all.test	2011-07-20 13:10:44 +0000
@@ -13,4 +13,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
    --skip Need normal protocol
 }
 
---source suite/optimizer_trace/include/optimizer_trace_bugs.inc
+--source suite/opt_trace/include/bugs.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_none.test' => 'mysql-test/suite/opt_trace/t/bugs_no_prot_none.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_no_prot_none.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/bugs_no_prot_none.test	2011-07-20 13:10:44 +0000
@@ -23,4 +23,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
    --skip Need normal protocol
 }
 
---source suite/optimizer_trace/include/optimizer_trace_bugs.inc
+--source suite/opt_trace/include/bugs.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_all.test' => 'mysql-test/suite/opt_trace/t/bugs_ps_prot_all.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_all.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/bugs_ps_prot_all.test	2011-07-20 13:10:44 +0000
@@ -13,4 +13,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
    --skip Need ps-protocol
 }
 
---source suite/optimizer_trace/include/optimizer_trace_bugs.inc
+--source suite/opt_trace/include/bugs.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_none.test' => 'mysql-test/suite/opt_trace/t/bugs_ps_prot_none.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_bugs_ps_prot_none.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/bugs_ps_prot_none.test	2011-07-20 13:10:44 +0000
@@ -23,4 +23,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
    --skip Need ps-protocol
 }
 
---source suite/optimizer_trace/include/optimizer_trace_bugs.inc
+--source suite/opt_trace/include/bugs.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_charset.test' => 'mysql-test/suite/opt_trace/t/charset.test'
=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_debug.test' => 'mysql-test/suite/opt_trace/t/debug.test'
=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace2_no_prot.test' => 'mysql-test/suite/opt_trace/t/general2_no_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace2_no_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/general2_no_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace2.inc
+--source suite/opt_trace/include/general2.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace2_ps_prot.test' => 'mysql-test/suite/opt_trace/t/general2_ps_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace2_ps_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/general2_ps_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace2.inc
+--source suite/opt_trace/include/general2.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_all.test' => 'mysql-test/suite/opt_trace/t/general_no_prot_all.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_all.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/general_no_prot_all.test	2011-07-20 13:10:44 +0000
@@ -14,4 +14,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace.inc
+--source suite/opt_trace/include/general.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_none.test' => 'mysql-test/suite/opt_trace/t/general_no_prot_none.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_no_prot_none.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/general_no_prot_none.test	2011-07-20 13:10:44 +0000
@@ -24,4 +24,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace.inc
+--source suite/opt_trace/include/general.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_all.test' => 'mysql-test/suite/opt_trace/t/general_ps_prot_all.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_all.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/general_ps_prot_all.test	2011-07-20 13:10:44 +0000
@@ -14,4 +14,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace.inc
+--source suite/opt_trace/include/general.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_none.test' => 'mysql-test/suite/opt_trace/t/general_ps_prot_none.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_ps_prot_none.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/general_ps_prot_none.test	2011-07-20 13:10:44 +0000
@@ -24,4 +24,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace.inc
+--source suite/opt_trace/include/general.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_range_no_prot.test' => 'mysql-test/suite/opt_trace/t/range_no_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_range_no_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/range_no_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace_range.inc
+--source suite/opt_trace/include/range.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_range_ps_prot.test' => 'mysql-test/suite/opt_trace/t/range_ps_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_range_ps_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/range_ps_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace_range.inc
+--source suite/opt_trace/include/range.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_security_no_prot.test' => 'mysql-test/suite/opt_trace/t/security_no_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_security_no_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/security_no_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace_security.inc
+--source suite/opt_trace/include/security.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_security_ps_prot.test' => 'mysql-test/suite/opt_trace/t/security_ps_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_security_ps_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/security_ps_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace_security.inc
+--source suite/opt_trace/include/security.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_no_prot.test' => 'mysql-test/suite/opt_trace/t/subquery_no_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_no_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/subquery_no_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL 
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace_subquery.inc
+--source suite/opt_trace/include/subquery.inc

=== renamed file 'mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_ps_prot.test' => 'mysql-test/suite/opt_trace/t/subquery_ps_prot.test'
--- a/mysql-test/suite/optimizer_trace/t/optimizer_trace_subquery_ps_prot.test	2011-07-19 15:11:15 +0000
+++ b/mysql-test/suite/opt_trace/t/subquery_ps_prot.test	2011-07-20 13:10:44 +0000
@@ -5,4 +5,4 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTO
 }
 
 # The main testing script
---source suite/optimizer_trace/include/optimizer_trace_subquery.inc
+--source suite/opt_trace/include/subquery.inc

=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc	2011-07-20 10:29:12 +0000
+++ b/sql/item_subselect.cc	2011-07-20 13:32:12 +0000
@@ -1205,7 +1205,13 @@ Item_in_subselect::single_value_transfor
                    print_where(item, "rewrite with MIN/MAX", QT_ORDINARY););
       if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY)
       {
-        DBUG_ASSERT(select_lex->non_agg_field_used());
+        /*
+          If the argument is a field, we assume that fix_fields() has
+          tagged the select_lex with non_agg_field_used.
+          We reverse that decision after this rewrite with MIN/MAX.
+         */
+        if (item->get_arg(0)->type() == Item::FIELD_ITEM)
+          DBUG_ASSERT(select_lex->non_agg_field_used());
         select_lex->set_non_agg_field_used(false);
       }
 

=== modified file 'sql/opt_trace.h'
--- a/sql/opt_trace.h	2011-07-19 15:11:15 +0000
+++ b/sql/opt_trace.h	2011-07-20 13:10:44 +0000
@@ -256,7 +256,8 @@ class set_var_base;
           ]
 @endverbatim
 
-  For more output examples, check @c mysql-test/r/optimizer_trace*.result.
+  For more output examples, check result files of the opt_trace suite in
+  @c mysql-test.
 
   Feature can be un-compiled with @code cmake -DOPTIMIZER_TRACE=0 @endcode.
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3344 to 3345) Tor Didriksen20 Jul