List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:March 30 2012 3:02pm
Subject:bzr push into mysql-trunk branch (mattias.jonsson:3874 to 3875) WL#4443
View as plain text  
 3875 Mattias Jonsson	2012-03-30
      WL#4443:
      Updated some result files.
      removed debug runs from push.
      added fix for preventing stored functions to execute during prepare
      (to avoid using tables before open/lock).

    modified:
      mysql-test/collections/mysql-trunk-wl4443.push
      mysql-test/r/innodb_explain_json_non_select_all.result
      mysql-test/r/innodb_explain_json_non_select_none.result
      mysql-test/r/myisam_explain_json_non_select_all.result
      mysql-test/r/myisam_explain_json_non_select_none.result
      mysql-test/suite/rpl/r/rpl_parallel_change_master.result
      mysql-test/t/partition_locking.test
      sql/item.cc
 3874 Mattias Jonsson	2012-03-29
      update test results.

    modified:
      mysql-test/r/explain.result
      mysql-test/suite/innodb/r/innodb_corrupt_bit.result
=== modified file 'mysql-test/collections/mysql-trunk-wl4443.push'
--- a/mysql-test/collections/mysql-trunk-wl4443.push	revid:mattias.jonsson@stripped
+++ b/mysql-test/collections/mysql-trunk-wl4443.push	revid:mattias.jonsson@stripped
@@ -1,34 +1,34 @@
 # Default suites in modes normal, binlog format mixed/row,embedded and ps-protocol
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug  --vardir=var-normal-debug  --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix-debug  --vardir=var-n_mix-debug  --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row-debug  --vardir=var-row-debug  --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row-debug  --vardir=var-ps_row-debug  --mysqld=--binlog-format=row  --ps-protocol --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded-debug  --vardir=var-embedded-debug  --embedded
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps-debug  --vardir=var-ps-debug  --ps-protocol --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug  --vardir=var-normal-debug  --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix-debug  --vardir=var-n_mix-debug  --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row-debug  --vardir=var-row-debug  --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row-debug  --vardir=var-ps_row-debug  --mysqld=--binlog-format=row  --ps-protocol --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded-debug  --vardir=var-embedded-debug  --embedded
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps-debug  --vardir=var-ps-debug  --ps-protocol --skip-test-list=collections/disabled-daily.list
 
 # From default.push
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_ps_row --vardir=var-main-ps_row --suite=main,parts --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_embedded --vardir=var-main_emebbed  --suite=main,parts --embedded --experimental=collections/default.experimental --skip-ndb
 # Partition specific
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-n_mix-debug  --vardir=var-n_mix-debug  --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-row-debug  --vardir=var-row-debug  --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-ps_row-debug  --vardir=var-ps_row-debug  --mysqld=--binlog-format=row  --ps-protocol --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-embedded-debug  --vardir=var-embedded-debug  --embedded
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-ps-debug  --vardir=var-ps-debug  --ps-protocol --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-n_mix-debug  --vardir=var-n_mix-debug  --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-row-debug  --vardir=var-row-debug  --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-ps_row-debug  --vardir=var-ps_row-debug  --mysqld=--binlog-format=row  --ps-protocol --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-embedded-debug  --vardir=var-embedded-debug  --embedded
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --suite=parts --comment=parts-ps-debug  --vardir=var-ps-debug  --ps-protocol --skip-test-list=collections/disabled-daily.list
 
 # Run the suites that are not part of the default - funcs_2, parts, stress, jp, nist
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs2-debug  --vardir=var-funcs2-debug  --suite=funcs_2
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=partitions-debug  --vardir=var-parts-debug --suite=parts
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=stress-debug --vardir=var-stress-debug  --suite=stress
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=jp-debug --vardir=var-jp-debug --suite=jp
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist-debug  --vardir=var-nist-debug --suite=nist
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist+ps-debug --vardir=var-ps_nist-debug  --suite=nist  --ps-protocol
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs2-debug  --vardir=var-funcs2-debug  --suite=funcs_2
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=partitions-debug  --vardir=var-parts-debug --suite=parts
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=stress-debug --vardir=var-stress-debug  --suite=stress
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=jp-debug --vardir=var-jp-debug --suite=jp
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist-debug  --vardir=var-nist-debug --suite=nist
+#perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist+ps-debug --vardir=var-ps_nist-debug  --suite=nist  --ps-protocol
 
 # Additional modes for rpl and binlog suites. Checksum and relay-log-info-repository
-perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_checksum-debug  --vardir=var-rpl_binlog_checksum-debug --suite=rpl,binlog --mysqld=--binlog-checksum=CRC32 --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_crash_safe_relay-debug --vardir=var-rpl_crash_safe_relay-debug --suite=rpl --mysqld=--relay-log-info-repository=TABLE --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_crash_safe_master-debug --vardir=var-rpl_crash_safe_master-debug --suite=rpl --mysqld=--master-info-repository=TABLE --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_checksum-debug  --vardir=var-rpl_binlog_checksum-debug --suite=rpl,binlog --mysqld=--binlog-checksum=CRC32 --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_crash_safe_relay-debug --vardir=var-rpl_crash_safe_relay-debug --suite=rpl --mysqld=--relay-log-info-repository=TABLE --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_crash_safe_master-debug --vardir=var-rpl_crash_safe_master-debug --suite=rpl --mysqld=--master-info-repository=TABLE --skip-test-list=collections/disabled-daily.list
 
 # Additional modes for rpl. Multi-Threaded Slave
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_n_mix_MTS --vardir=var-mts-rpl-binlog-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb  --unit-tests --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl
@@ -40,9 +40,10 @@ perl mysql-test-run.pl --timer --force -
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix_8k_size --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
 
 #Engine independent tests
-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto  --comment=eits-rpl-binlog-mixed-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --timer --force  --debug-server --parallel=auto  --comment=eits-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam  --skip-test-list=collections/disabled-daily.list
-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs  --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --timer --force --debug-server --parallel=auto  --comment=eits-rpl-binlog-mixed-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --timer --force  --debug-server --parallel=auto  --comment=eits-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam  --skip-test-list=collections/disabled-daily.list
+#perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs  --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-daily.list
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs  --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-daily.list

=== modified file 'mysql-test/r/innodb_explain_json_non_select_all.result'
--- a/mysql-test/r/innodb_explain_json_non_select_all.result	revid:mattias.jonsson@stripped
+++ b/mysql-test/r/innodb_explain_json_non_select_all.result	revid:mattias.jonsson@stripped
@@ -5854,14 +5854,14 @@ INSERT INTO t2 VALUES (1), (2), (3);
 EXPLAIN UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	Using filesort
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	100.00	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	100.00	Using filesort
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
@@ -5885,10 +5885,18 @@ EXPLAIN
             "select_id": 2,
             "table": {
               "table_name": "x",
-              "access_type": "ALL",
-              "rows": 3,
+              "access_type": "index_subquery",
+              "possible_keys": [
+                "auto_key0"
+              ] /* possible_keys */,
+              "key": "auto_key0",
+              "key_length": "5",
+              "ref": [
+                "func"
+              ] /* ref */,
+              "rows": 2,
               "filtered": 100,
-              "attached_condition": "(<cache>(`test`.`t1`.`a`) = `x`.`b`)",
+              "using_index": true,
               "materialized_from_subquery": {
                 "using_temporary_table": true,
                 "dependent": false,
@@ -5990,8 +5998,8 @@ Sort_scan	1
 # Status of testing query execution:
 Variable_name	Value
 Handler_read_first	2
-Handler_read_key	2
-Handler_read_rnd_next	13
+Handler_read_key	5
+Handler_read_rnd_next	8
 Handler_update	1
 Handler_write	1
 Sort_rows	3

=== modified file 'mysql-test/r/innodb_explain_json_non_select_none.result'
--- a/mysql-test/r/innodb_explain_json_non_select_none.result	revid:mattias.jonsson@stripped
+++ b/mysql-test/r/innodb_explain_json_non_select_none.result	revid:mattias.jonsson@stripped
@@ -5869,14 +5869,14 @@ INSERT INTO t2 VALUES (1), (2), (3);
 EXPLAIN UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	Using filesort
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	100.00	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	100.00	Using filesort
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
@@ -5900,10 +5900,18 @@ EXPLAIN
             "select_id": 2,
             "table": {
               "table_name": "x",
-              "access_type": "ALL",
-              "rows": 3,
+              "access_type": "index_subquery",
+              "possible_keys": [
+                "auto_key0"
+              ] /* possible_keys */,
+              "key": "auto_key0",
+              "key_length": "5",
+              "ref": [
+                "func"
+              ] /* ref */,
+              "rows": 2,
               "filtered": 100,
-              "attached_condition": "(<cache>(`test`.`t1`.`a`) = `x`.`b`)",
+              "using_index": true,
               "materialized_from_subquery": {
                 "using_temporary_table": true,
                 "dependent": false,
@@ -6007,8 +6015,8 @@ Sort_scan	1
 # Status of testing query execution:
 Variable_name	Value
 Handler_read_first	2
-Handler_read_key	2
-Handler_read_rnd_next	13
+Handler_read_key	5
+Handler_read_rnd_next	8
 Handler_update	1
 Handler_write	1
 Sort_rows	3

=== modified file 'mysql-test/r/myisam_explain_json_non_select_all.result'
--- a/mysql-test/r/myisam_explain_json_non_select_all.result	revid:mattias.jonsson@stripped
+++ b/mysql-test/r/myisam_explain_json_non_select_all.result	revid:mattias.jonsson@stripped
@@ -5727,14 +5727,14 @@ INSERT INTO t2 VALUES (1), (2), (3);
 EXPLAIN UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	Using filesort
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	100.00	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	100.00	Using filesort
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
@@ -5758,10 +5758,18 @@ EXPLAIN
             "select_id": 2,
             "table": {
               "table_name": "x",
-              "access_type": "ALL",
-              "rows": 3,
+              "access_type": "index_subquery",
+              "possible_keys": [
+                "auto_key0"
+              ] /* possible_keys */,
+              "key": "auto_key0",
+              "key_length": "5",
+              "ref": [
+                "func"
+              ] /* ref */,
+              "rows": 2,
               "filtered": 100,
-              "attached_condition": "(<cache>(`test`.`t1`.`a`) = `x`.`b`)",
+              "using_index": true,
               "materialized_from_subquery": {
                 "using_temporary_table": true,
                 "dependent": false,
@@ -5861,7 +5869,8 @@ Sort_rows	3
 Sort_scan	1
 # Status of testing query execution:
 Variable_name	Value
-Handler_read_rnd_next	13
+Handler_read_key	3
+Handler_read_rnd_next	8
 Handler_update	1
 Handler_write	1
 Sort_rows	3

=== modified file 'mysql-test/r/myisam_explain_json_non_select_none.result'
--- a/mysql-test/r/myisam_explain_json_non_select_none.result	revid:mattias.jonsson@stripped
+++ b/mysql-test/r/myisam_explain_json_non_select_none.result	revid:mattias.jonsson@stripped
@@ -5738,14 +5738,14 @@ INSERT INTO t2 VALUES (1), (2), (3);
 EXPLAIN UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	Using filesort
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED UPDATE        t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
-2	DEPENDENT SUBQUERY	<derived3>	ALL	NULL	NULL	NULL	NULL	3	100.00	Using where
+2	DEPENDENT SUBQUERY	<derived3>	index_subquery	auto_key0	auto_key0	5	func	2	100.00	Using index
 3	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	3	100.00	Using filesort
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
@@ -5769,10 +5769,18 @@ EXPLAIN
             "select_id": 2,
             "table": {
               "table_name": "x",
-              "access_type": "ALL",
-              "rows": 3,
+              "access_type": "index_subquery",
+              "possible_keys": [
+                "auto_key0"
+              ] /* possible_keys */,
+              "key": "auto_key0",
+              "key_length": "5",
+              "ref": [
+                "func"
+              ] /* ref */,
+              "rows": 2,
               "filtered": 100,
-              "attached_condition": "(<cache>(`test`.`t1`.`a`) = `x`.`b`)",
+              "using_index": true,
               "materialized_from_subquery": {
                 "using_temporary_table": true,
                 "dependent": false,
@@ -5874,7 +5882,8 @@ Sort_rows	3
 Sort_scan	1
 # Status of testing query execution:
 Variable_name	Value
-Handler_read_rnd_next	13
+Handler_read_key	3
+Handler_read_rnd_next	8
 Handler_update	1
 Handler_write	1
 Sort_rows	3

=== modified file 'mysql-test/suite/rpl/r/rpl_parallel_change_master.result'
--- a/mysql-test/suite/rpl/r/rpl_parallel_change_master.result	revid:mattias.jonsson@stripped
+++ b/mysql-test/suite/rpl/r/rpl_parallel_change_master.result	revid:mattias.jonsson@stripped
@@ -9,6 +9,8 @@ include/stop_slave.inc
 SET @save.slave_parallel_workers=@@global.slave_parallel_workers;
 SET @@global.slave_parallel_workers=2;
 include/start_slave.inc
+Warnings:
+Note	1750	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 CREATE DATABASE d1;
 CREATE DATABASE d2;
 CREATE TABLE d1.t1 (a int unique) ENGINE=INNODB;
@@ -18,15 +20,21 @@ FLUSH LOGS;
 include/stop_slave.inc
 CHANGE MASTER TO MASTER_DELAY=5;
 include/start_slave.inc
+Warnings:
+Note	1750	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 INSERT INTO d1.t1 VALUES (3);
 INSERT INTO d1.t1 VALUES (5);
 FLUSH LOGS;
 include/stop_slave.inc
 CHANGE MASTER TO RELAY_LOG_FILE=FILE,  RELAY_LOG_POS= POS;
 include/start_slave.inc
+Warnings:
+Note	1750	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 include/stop_slave.inc
 CHANGE MASTER TO RELAY_LOG_FILE=FILE,  RELAY_LOG_POS= POS, MASTER_DELAY=0;
 include/start_slave.inc
+Warnings:
+Note	1750	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 BEGIN;
 INSERT INTO d1.t1 VALUES (13);
 INSERT INTO d1.t1 VALUES (6);

=== modified file 'mysql-test/t/partition_locking.test'
--- a/mysql-test/t/partition_locking.test	revid:mattias.jonsson@stripped
+++ b/mysql-test/t/partition_locking.test	revid:mattias.jonsson@stripped
@@ -1,5 +1,8 @@
 --source include/have_innodb.inc
 --source include/have_partition.inc
+# Different page sizes gives different query plans
+# results based on default 16k.
+--source include/have_innodb_16k.inc
 
 --echo # Original tests for WL#4443
 

=== modified file 'sql/item.cc'
--- a/sql/item.cc	revid:mattias.jonsson@stripped
+++ b/sql/item.cc	revid:mattias.jonsson@stripped
@@ -9386,6 +9386,21 @@ void view_error_processor(THD *thd, void
   ((TABLE_LIST *)data)->hide_view_error(thd);
 }
 
+/*
+  Is the item a stored function which may need table access.
+
+  TODO: Either eliminate the execute of this during mysql_delete_prepare
+  or create a better/more accurate way to check if the sp may access tables;
+*/
+
+static bool is_stored_function_which_may_need_table(Item* item)
+{
+  if (item->type() == Item::FUNC_ITEM &&
+      ((Item_func*)item)->functype() == Item_func::FUNC_SP)
+    return true;
+  return false;
+}
+
 
 /**
   Returns wether it is OK to evaluate the item now.
@@ -9403,7 +9418,8 @@ bool can_evaluate_item_now(THD *thd, Ite
 {
   if (item->const_item() &&
       ((thd->lex->is_query_tables_locked() ||
-        !item->has_subquery())))
+        (!item->has_subquery() &&
+         !is_stored_function_which_may_need_table(item)))))
     return true;
   return false;
 }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (mattias.jonsson:3874 to 3875) WL#4443Mattias Jonsson31 Mar