List:Commits« Previous MessageNext Message »
From:Marc Alff Date:August 3 2011 3:08pm
Subject:bzr push into mysql-trunk-wl5378 branch (marc.alff:3368 to 3370)
View as plain text  
 3370 Marc Alff	2011-08-03 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5378

    modified:
      mysql-test/include/icp_tests.inc
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/suite/perfschema/include/event_aggregate_load.inc
      mysql-test/suite/perfschema/include/table_aggregate_load.inc
      mysql-test/suite/perfschema/r/setup_objects.result
      mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_off.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/t/setup_objects.test
      sql/handler.cc
      sql/handler.h
      sql/sql_plugin.cc
      storage/innobase/handler/ha_innodb.cc
      storage/perfschema/pfs_instr_class.cc
 3369 Marc Alff	2011-08-03 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5378

    added:
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic-master.opt
    modified:
      mysql-test/r/sp.result
      mysql-test/suite/engines/funcs/r/sf_alter.result
      mysql-test/suite/engines/funcs/r/sf_cursor.result
      mysql-test/suite/engines/funcs/r/sp_alter.result
      mysql-test/suite/engines/funcs/r/sp_cursor.result
      mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
      mysql-test/t/sp.test
      sql/item_xmlfunc.cc
      sql/opt_explain.cc
      sql/sp_head.cc
      sql/sp_head.h
      sql/sp_pcontext.cc
      sql/sp_pcontext.h
      sql/sp_rcontext.cc
      sql/sp_rcontext.h
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_prepare.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sql_signal.cc
      sql/sql_signal.h
      sql/sql_yacc.yy
      storage/innobase/handler/ha_innodb.cc
 3368 Marc Alff	2011-07-29
      WL#5378 PERFORMANCE SCHEMA SUMMARY BY USER / HOST
      Improved test coverage

    removed:
      mysql-test/suite/perfschema/r/event_aggregate_no_uh.result
      mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u.result
      mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u_no_h.result
      mysql-test/suite/perfschema/t/event_aggregate_no_uh-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_uh.test
      mysql-test/suite/perfschema/t/event_aggregate_no_uh_no_h-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_uh_no_h.test
      mysql-test/suite/perfschema/t/event_aggregate_no_uh_no_u-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_uh_no_u.test
      mysql-test/suite/perfschema/t/event_aggregate_no_uh_no_u_no_h-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_uh_no_u_no_h.test
    added:
      mysql-test/suite/perfschema/include/connection_cleanup.inc
      mysql-test/suite/perfschema/include/connection_load.inc
      mysql-test/suite/perfschema/include/connection_setup.inc
      mysql-test/suite/perfschema/r/connection.result
      mysql-test/suite/perfschema/r/connection_3a.result
      mysql-test/suite/perfschema/r/connection_3a_3u.result
      mysql-test/suite/perfschema/r/connection_3u.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
      mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
      mysql-test/suite/perfschema/t/connection.test
      mysql-test/suite/perfschema/t/connection_3a-master.opt
      mysql-test/suite/perfschema/t/connection_3a.test
      mysql-test/suite/perfschema/t/connection_3a_3u-master.opt
      mysql-test/suite/perfschema/t/connection_3a_3u.test
      mysql-test/suite/perfschema/t/connection_3u-master.opt
      mysql-test/suite/perfschema/t/connection_3u.test
      mysql-test/suite/perfschema/t/event_aggregate_no_a-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_a.test
      mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
      mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
      mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h-master.opt
      mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
    modified:
      mysql-test/suite/perfschema/include/event_aggregate_setup.inc
      mysql-test/suite/perfschema/r/event_aggregate.result
      mysql-test/suite/perfschema/r/event_aggregate_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_u.result
      storage/perfschema/pfs_account.cc
      storage/perfschema/table_hosts.cc
      storage/perfschema/table_users.cc
=== modified file 'mysql-test/include/icp_tests.inc'
--- a/mysql-test/include/icp_tests.inc	2011-06-09 06:22:39 +0000
+++ b/mysql-test/include/icp_tests.inc	2011-08-03 07:21:17 +0000
@@ -964,3 +964,39 @@ eval $query;
 
 DROP VIEW v1;
 DROP TABLE t1;
+
+--echo #
+--echo # BUG#12601961 "SEGFAULT IN HANDLER::COMPARE_KEY2"
+--echo #
+
+# Note: Until Bug#12724899 is fixed this test should only run
+# with InnoDB as storage engine since the query produces
+# wrong result when using MyISAM.
+
+let $se= `select @@default_storage_engine`;
+
+if ($se == 'InnoDB' )
+{
+
+CREATE TABLE t1 (
+  pk INTEGER NOT NULL, 
+  i1 INTEGER NOT NULL,
+  c1 VARCHAR(1) NOT NULL,
+  PRIMARY KEY (pk)
+);
+
+INSERT INTO t1 VALUES (1,3,'j'), (20,8,'e');
+
+let query=
+SELECT alias2.i1
+FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
+ON alias2.pk AND alias2.pk <= alias1.c1
+WHERE alias2.pk = 1;
+
+eval EXPLAIN $query;
+eval $query;
+
+DROP TABLE t1;
+
+}
+

=== modified file 'mysql-test/r/innodb_icp.result'
--- a/mysql-test/r/innodb_icp.result	2011-06-09 06:22:39 +0000
+++ b/mysql-test/r/innodb_icp.result	2011-08-03 07:21:17 +0000
@@ -912,5 +912,30 @@ AND (a1.a != a2.a OR a1.b IS NULL);
 pk
 DROP VIEW v1;
 DROP TABLE t1;
+#
+# BUG#12601961 "SEGFAULT IN HANDLER::COMPARE_KEY2"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL, 
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,3,'j'), (20,8,'e');
+EXPLAIN SELECT alias2.i1
+FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
+ON alias2.pk AND alias2.pk <= alias1.c1
+WHERE alias2.pk = 1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	alias1	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	alias2	const	PRIMARY	PRIMARY	4	const	1	Using index condition
+SELECT alias2.i1
+FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
+ON alias2.pk AND alias2.pk <= alias1.c1
+WHERE alias2.pk = 1;
+i1
+Warnings:
+Warning	1292	Truncated incorrect DOUBLE value: 'j'
+DROP TABLE t1;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/innodb_icp_none.result'
--- a/mysql-test/r/innodb_icp_none.result	2011-06-09 06:22:39 +0000
+++ b/mysql-test/r/innodb_icp_none.result	2011-08-03 07:21:17 +0000
@@ -911,5 +911,31 @@ AND (a1.a != a2.a OR a1.b IS NULL);
 pk
 DROP VIEW v1;
 DROP TABLE t1;
+#
+# BUG#12601961 "SEGFAULT IN HANDLER::COMPARE_KEY2"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL, 
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,3,'j'), (20,8,'e');
+EXPLAIN SELECT alias2.i1
+FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
+ON alias2.pk AND alias2.pk <= alias1.c1
+WHERE alias2.pk = 1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	alias1	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	alias2	const	PRIMARY	PRIMARY	4	const	1	Using where
+SELECT alias2.i1
+FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
+ON alias2.pk AND alias2.pk <= alias1.c1
+WHERE alias2.pk = 1;
+i1
+Warnings:
+Warning	1292	Truncated incorrect DOUBLE value: 'j'
+Warning	1292	Truncated incorrect DOUBLE value: 'e'
+DROP TABLE t1;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/myisam_icp.result'
--- a/mysql-test/r/myisam_icp.result	2011-06-09 06:22:39 +0000
+++ b/mysql-test/r/myisam_icp.result	2011-08-03 07:21:17 +0000
@@ -907,4 +907,7 @@ AND (a1.a != a2.a OR a1.b IS NULL);
 pk
 DROP VIEW v1;
 DROP TABLE t1;
+#
+# BUG#12601961 "SEGFAULT IN HANDLER::COMPARE_KEY2"
+#
 set optimizer_switch=default;

=== modified file 'mysql-test/r/myisam_icp_none.result'
--- a/mysql-test/r/myisam_icp_none.result	2011-06-09 06:22:39 +0000
+++ b/mysql-test/r/myisam_icp_none.result	2011-08-03 07:21:17 +0000
@@ -906,4 +906,7 @@ AND (a1.a != a2.a OR a1.b IS NULL);
 pk
 DROP VIEW v1;
 DROP TABLE t1;
+#
+# BUG#12601961 "SEGFAULT IN HANDLER::COMPARE_KEY2"
+#
 set optimizer_switch=default;

=== modified file 'mysql-test/r/sp.result'
--- a/mysql-test/r/sp.result	2011-07-28 08:31:36 +0000
+++ b/mysql-test/r/sp.result	2011-08-02 08:14:26 +0000
@@ -7025,6 +7025,25 @@ init_connect
 SET @@GLOBAL.init_connect= @old_init_connect;
 DROP PROCEDURE p2;
 DROP PROCEDURE p5;
+#
+# Bug#11766594  59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
+#
+CREATE TABLE t1 (a INT, b INT, KEY(b));
+CREATE TABLE t2 (c INT, d INT, KEY(c));
+INSERT INTO t1 VALUES (1,1),(1,1),(1,2);
+INSERT INTO t2 VALUES (1,1),(1,2);
+CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
+BEGIN
+DECLARE a int;
+-- SQL statement inside
+SELECT 1 INTO a;
+RETURN a;
+END $
+SELECT COUNT(DISTINCT d) FROM t1, t2  WHERE a = c AND b = f1();
+COUNT(DISTINCT d)
+2
+DROP FUNCTION f1;
+DROP TABLE t1, t2;
 # ------------------------------------------------------------------
 # -- End of 5.1 tests
 # ------------------------------------------------------------------

=== modified file 'mysql-test/suite/engines/funcs/r/sf_alter.result'
--- a/mysql-test/suite/engines/funcs/r/sf_alter.result	2011-01-05 06:53:05 +0000
+++ b/mysql-test/suite/engines/funcs/r/sf_alter.result	2011-08-01 19:47:46 +0000
@@ -35,8 +35,6 @@ ALTER FUNCTION sf1    #DET#       ;
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -54,8 +52,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -76,9 +72,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -105,8 +98,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -172,8 +163,6 @@ ALTER FUNCTION sf1    #DET# CONTAINS SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -191,8 +180,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -213,9 +200,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -242,8 +226,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -309,8 +291,6 @@ ALTER FUNCTION sf1    #DET# NO SQL     ;
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -328,8 +308,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -350,9 +328,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -379,8 +354,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -446,8 +419,6 @@ ALTER FUNCTION sf1    #DET# READS SQL DA
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -465,8 +436,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -487,9 +456,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -516,8 +482,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -583,8 +547,6 @@ ALTER FUNCTION sf1    #DET# MODIFIES SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -602,8 +564,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -624,9 +584,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -653,8 +610,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -720,8 +675,6 @@ ALTER FUNCTION sf1    #DET#     COMMENT
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -739,8 +692,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -761,9 +712,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -790,8 +738,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -857,8 +803,6 @@ ALTER FUNCTION sf1    #DET# CONTAINS SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -876,8 +820,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -898,9 +840,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -927,8 +866,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -994,8 +931,6 @@ ALTER FUNCTION sf1    #DET# NO SQL   COM
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1013,8 +948,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1035,9 +968,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1064,8 +994,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1131,8 +1059,6 @@ ALTER FUNCTION sf1    #DET# READS SQL DA
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1150,8 +1076,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1172,9 +1096,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1201,8 +1122,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1268,8 +1187,6 @@ ALTER FUNCTION sf1    #DET# MODIFIES SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1287,8 +1204,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1309,9 +1224,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1338,8 +1250,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1405,8 +1315,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET#
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1424,8 +1332,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1446,9 +1352,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1475,8 +1378,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1542,8 +1443,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# C
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1561,8 +1460,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1583,9 +1480,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1612,8 +1506,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1679,8 +1571,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# N
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1698,8 +1588,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1720,9 +1608,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1749,8 +1634,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1816,8 +1699,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# R
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1835,8 +1716,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1857,9 +1736,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1886,8 +1762,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1953,8 +1827,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# M
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1972,8 +1844,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1994,9 +1864,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2023,8 +1890,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2090,8 +1955,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET#
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2109,8 +1972,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2131,9 +1992,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2160,8 +2018,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2227,8 +2083,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# C
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2246,8 +2100,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2268,9 +2120,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2297,8 +2146,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2364,8 +2211,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# N
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2383,8 +2228,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2405,9 +2248,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2434,8 +2274,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2501,8 +2339,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# R
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2520,8 +2356,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2542,9 +2376,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2571,8 +2402,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2638,8 +2467,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# M
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2657,8 +2484,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2679,9 +2504,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2708,8 +2530,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2775,8 +2595,6 @@ ALTER FUNCTION sf1    #DET#   SQL SECURI
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2794,8 +2612,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2816,9 +2632,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2845,8 +2658,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2912,8 +2723,6 @@ ALTER FUNCTION sf1    #DET# CONTAINS SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2931,8 +2740,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2953,9 +2760,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2982,8 +2786,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3049,8 +2851,6 @@ ALTER FUNCTION sf1    #DET# NO SQL SQL S
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3068,8 +2868,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3090,9 +2888,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3119,8 +2914,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3186,8 +2979,6 @@ ALTER FUNCTION sf1    #DET# READS SQL DA
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3205,8 +2996,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3227,9 +3016,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3256,8 +3042,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3323,8 +3107,6 @@ ALTER FUNCTION sf1    #DET# MODIFIES SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3342,8 +3124,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3364,9 +3144,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3393,8 +3170,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3460,8 +3235,6 @@ ALTER FUNCTION sf1    #DET#   SQL SECURI
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3479,8 +3252,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3501,9 +3272,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3530,8 +3298,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3597,8 +3363,6 @@ ALTER FUNCTION sf1    #DET# CONTAINS SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3616,8 +3380,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3638,9 +3400,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3667,8 +3426,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3734,8 +3491,6 @@ ALTER FUNCTION sf1    #DET# NO SQL SQL S
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3753,8 +3508,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3775,9 +3528,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3804,8 +3554,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3871,8 +3619,6 @@ ALTER FUNCTION sf1    #DET# READS SQL DA
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3890,8 +3636,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3912,9 +3656,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3941,8 +3682,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4008,8 +3747,6 @@ ALTER FUNCTION sf1    #DET# MODIFIES SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4027,8 +3764,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4049,9 +3784,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4078,8 +3810,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4145,8 +3875,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET#
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4164,8 +3892,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4186,9 +3912,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4215,8 +3938,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4282,8 +4003,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# C
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4301,8 +4020,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4323,9 +4040,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4352,8 +4066,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4419,8 +4131,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# N
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4438,8 +4148,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4460,9 +4168,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4489,8 +4194,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4556,8 +4259,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# R
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4575,8 +4276,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4597,9 +4296,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4626,8 +4322,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4693,8 +4387,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# M
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4712,8 +4404,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4734,9 +4424,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4763,8 +4450,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4830,8 +4515,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET#
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4849,8 +4532,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4871,9 +4552,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4900,8 +4578,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4967,8 +4643,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# C
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -4986,8 +4660,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5008,9 +4680,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5037,8 +4706,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5104,8 +4771,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# N
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5123,8 +4788,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5145,9 +4808,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5174,8 +4834,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5241,8 +4899,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# R
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5260,8 +4916,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5282,9 +4936,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5311,8 +4962,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5378,8 +5027,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# M
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5397,8 +5044,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5419,9 +5064,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5448,8 +5090,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5515,8 +5155,6 @@ ALTER FUNCTION sf1    #DET#    SQL SECUR
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5534,8 +5172,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5556,9 +5192,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5585,8 +5218,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5652,8 +5283,6 @@ ALTER FUNCTION sf1    #DET# CONTAINS SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5671,8 +5300,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5693,9 +5320,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5722,8 +5346,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5789,8 +5411,6 @@ ALTER FUNCTION sf1    #DET# NO SQL  SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5808,8 +5428,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5830,9 +5448,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5859,8 +5474,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5926,8 +5539,6 @@ ALTER FUNCTION sf1    #DET# READS SQL DA
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5945,8 +5556,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5967,9 +5576,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -5996,8 +5602,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6063,8 +5667,6 @@ ALTER FUNCTION sf1    #DET# MODIFIES SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6082,8 +5684,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6104,9 +5704,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6133,8 +5730,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6200,8 +5795,6 @@ ALTER FUNCTION sf1    #DET#    SQL SECUR
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6219,8 +5812,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6241,9 +5832,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6270,8 +5858,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6337,8 +5923,6 @@ ALTER FUNCTION sf1    #DET# CONTAINS SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6356,8 +5940,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6378,9 +5960,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6407,8 +5986,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6474,8 +6051,6 @@ ALTER FUNCTION sf1    #DET# NO SQL  SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6493,8 +6068,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6515,9 +6088,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6544,8 +6114,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6611,8 +6179,6 @@ ALTER FUNCTION sf1    #DET# READS SQL DA
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6630,8 +6196,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6652,9 +6216,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6681,8 +6242,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6748,8 +6307,6 @@ ALTER FUNCTION sf1    #DET# MODIFIES SQL
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6767,8 +6324,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6789,9 +6344,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6818,8 +6370,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6885,8 +6435,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET#
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6904,8 +6452,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6926,9 +6472,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -6955,8 +6498,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7022,8 +6563,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# C
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7041,8 +6580,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7063,9 +6600,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7092,8 +6626,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7159,8 +6691,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# N
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7178,8 +6708,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7200,9 +6728,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7229,8 +6754,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7296,8 +6819,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# R
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7315,8 +6836,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7337,9 +6856,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7366,8 +6882,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7433,8 +6947,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# M
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7452,8 +6964,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7474,9 +6984,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7503,8 +7010,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7570,8 +7075,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET#
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7589,8 +7092,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7611,9 +7112,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7640,8 +7138,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7707,8 +7203,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# C
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7726,8 +7220,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7748,9 +7240,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7777,8 +7266,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7844,8 +7331,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# N
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7863,8 +7348,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7885,9 +7368,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7914,8 +7394,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -7981,8 +7459,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# R
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8000,8 +7476,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8022,9 +7496,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8051,8 +7522,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8118,8 +7587,6 @@ ALTER FUNCTION sf1  LANGUAGE SQL #DET# M
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8137,8 +7604,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8159,9 +7624,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -8188,8 +7650,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1

=== modified file 'mysql-test/suite/engines/funcs/r/sf_cursor.result'
--- a/mysql-test/suite/engines/funcs/r/sf_cursor.result	2011-01-05 06:53:05 +0000
+++ b/mysql-test/suite/engines/funcs/r/sf_cursor.result	2011-08-01 19:47:46 +0000
@@ -34,8 +34,6 @@ END//
 SELECT sf1();
 sf1()
 0
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -53,8 +51,6 @@ id	data
 2	1
 3	3
 INSERT INTO t4 VALUES(sf1());
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -75,9 +71,6 @@ id	data
 3	3
 3	3
 UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -104,8 +97,6 @@ id	data
 3	3
 3	3
 DELETE FROM t4 WHERE i = sf1() + 1;
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1

=== modified file 'mysql-test/suite/engines/funcs/r/sp_alter.result'
--- a/mysql-test/suite/engines/funcs/r/sp_alter.result	2011-01-05 06:53:05 +0000
+++ b/mysql-test/suite/engines/funcs/r/sp_alter.result	2011-08-01 19:47:46 +0000
@@ -31,8 +31,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET#       ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -82,8 +80,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# CONTAINS SQL     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -133,8 +129,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# NO SQL     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -184,8 +178,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# READS SQL DATA     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -235,8 +227,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# MODIFIES SQL DATA     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -286,8 +276,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET#     COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -337,8 +325,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# CONTAINS SQL   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -388,8 +374,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# NO SQL   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -439,8 +423,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# READS SQL DATA   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -490,8 +472,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# MODIFIES SQL DATA   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -541,8 +521,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET#       ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -592,8 +570,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# CONTAINS SQL     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -643,8 +619,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# NO SQL     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -694,8 +668,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# READS SQL DATA     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -745,8 +717,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# MODIFIES SQL DATA     ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -796,8 +766,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET#     COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -847,8 +815,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# CONTAINS SQL   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -898,8 +864,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# NO SQL   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -949,8 +913,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# READS SQL DATA   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1000,8 +962,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# MODIFIES SQL DATA   COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1051,8 +1011,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET#   SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1102,8 +1060,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# CONTAINS SQL SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1153,8 +1109,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# NO SQL SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1204,8 +1158,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# READS SQL DATA SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1255,8 +1207,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# MODIFIES SQL DATA SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1306,8 +1256,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET#   SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1357,8 +1305,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1408,8 +1354,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1459,8 +1403,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1510,8 +1452,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1561,8 +1501,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET#   SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1612,8 +1550,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1663,8 +1599,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1714,8 +1648,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1765,8 +1697,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1816,8 +1746,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET#   SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1867,8 +1795,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1918,8 +1844,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -1969,8 +1893,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2020,8 +1942,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2071,8 +1991,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET#    SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2122,8 +2040,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# CONTAINS SQL  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2173,8 +2089,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# NO SQL  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2224,8 +2138,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# READS SQL DATA  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2275,8 +2187,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# MODIFIES SQL DATA  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2326,8 +2236,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET#    SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2377,8 +2285,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# CONTAINS SQL  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2428,8 +2334,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# NO SQL  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2479,8 +2383,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# READS SQL DATA  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2530,8 +2432,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1    #DET# MODIFIES SQL DATA  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2581,8 +2481,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET#    SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2632,8 +2530,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# CONTAINS SQL  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2683,8 +2579,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# NO SQL  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2734,8 +2628,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# READS SQL DATA  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2785,8 +2677,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# MODIFIES SQL DATA  SQL SECURITY DEFINER   ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2836,8 +2726,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET#    SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2887,8 +2775,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# CONTAINS SQL  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2938,8 +2824,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# NO SQL  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -2989,8 +2873,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# READS SQL DATA  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1
@@ -3040,8 +2922,6 @@ CLOSE cur2;
 END//
 ALTER PROCEDURE sp1  LANGUAGE SQL #DET# MODIFIES SQL DATA  SQL SECURITY DEFINER COMMENT 'comment' ;
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1

=== modified file 'mysql-test/suite/engines/funcs/r/sp_cursor.result'
--- a/mysql-test/suite/engines/funcs/r/sp_cursor.result	2011-01-05 06:53:05 +0000
+++ b/mysql-test/suite/engines/funcs/r/sp_cursor.result	2011-08-01 19:47:46 +0000
@@ -30,8 +30,6 @@ CLOSE cur1;
 CLOSE cur2;
 END//
 CALL sp1();
-Warnings:
-Error	1329	No data - zero rows fetched, selected, or processed
 SELECT * FROM t1 ORDER BY id;
 id	data
 1	1

=== modified file 'mysql-test/suite/perfschema/include/event_aggregate_load.inc'
--- a/mysql-test/suite/perfschema/include/event_aggregate_load.inc	2011-07-25 17:40:58 +0000
+++ b/mysql-test/suite/perfschema/include/event_aggregate_load.inc	2011-08-03 15:07:17 +0000
@@ -58,6 +58,12 @@ echo "================== con1 connected
 
 --connection default
 
+# Wait for the connect to complete
+let $wait_condition=
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
+--source include/wait_condition.inc
+
 echo "================== Step 2 ==================";
 call dump_thread();
 execute dump_waits_account;
@@ -120,6 +126,12 @@ echo "================== con2 connected
 
 --connection default
 
+# Wait for the connect to complete
+let $wait_condition=
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
+--source include/wait_condition.inc
+
 echo "================== Step 4 ==================";
 call dump_thread();
 execute dump_waits_account;
@@ -178,6 +190,12 @@ echo "================== con3 connected
 
 --connection default
 
+# Wait for the connect to complete
+let $wait_condition=
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
+--source include/wait_condition.inc
+
 echo "================== Step 6 ==================";
 call dump_thread();
 execute dump_waits_account;
@@ -236,6 +254,12 @@ echo "================== con4 connected
 
 --connection default
 
+# Wait for the connect to complete
+let $wait_condition=
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
+--source include/wait_condition.inc
+
 echo "================== Step 8 ==================";
 call dump_thread();
 execute dump_waits_account;
@@ -294,8 +318,8 @@ execute dump_hosts;
 
 # Wait for the disconnect to complete
 let $wait_condition=
-  select count(*) = 3 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+  select count(*) = 0 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
 --source include/wait_condition.inc
 
 echo "================== con1 disconnected ==================";
@@ -327,8 +351,8 @@ execute dump_hosts;
 
 # Wait for the disconnect to complete
 let $wait_condition=
-  select count(*) = 2 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+  select count(*) = 0 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
 --source include/wait_condition.inc
 
 echo "================== con2 disconnected ==================";
@@ -360,8 +384,8 @@ execute dump_hosts;
 
 # Wait for the disconnect to complete
 let $wait_condition=
-  select count(*) = 1 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+  select count(*) = 0 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
 --source include/wait_condition.inc
 
 echo "================== con3 disconnected ==================";
@@ -394,7 +418,7 @@ execute dump_hosts;
 # Wait for the disconnect to complete
 let $wait_condition=
   select count(*) = 0 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
 --source include/wait_condition.inc
 
 echo "================== con4 disconnected ==================";

=== modified file 'mysql-test/suite/perfschema/include/table_aggregate_load.inc'
--- a/mysql-test/suite/perfschema/include/table_aggregate_load.inc	2011-07-25 17:40:58 +0000
+++ b/mysql-test/suite/perfschema/include/table_aggregate_load.inc	2011-08-03 15:07:17 +0000
@@ -71,8 +71,7 @@ echo "================== con1 connected
 # Wait for the connect to complete
 let $wait_condition=
   select count(*) = 1 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
 --source include/wait_condition.inc
 
 echo "================== Step 2 ==================";
@@ -139,9 +138,8 @@ echo "================== con2 connected
 
 # Wait for the connect to complete
 let $wait_condition=
-  select count(*) = 2 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
 --source include/wait_condition.inc
 
 echo "================== Step 4 ==================";
@@ -204,9 +202,8 @@ echo "================== con3 connected
 
 # Wait for the connect to complete
 let $wait_condition=
-  select count(*) = 3 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
 --source include/wait_condition.inc
 
 echo "================== Step 6 ==================";
@@ -269,9 +266,8 @@ echo "================== con4 connected
 
 # Wait for the connect to complete
 let $wait_condition=
-  select count(*) = 4 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  select count(*) = 1 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
 --source include/wait_condition.inc
 
 echo "================== Step 8 ==================";
@@ -388,9 +384,8 @@ execute dump_objects_summary;
 
 # Wait for the disconnect to complete
 let $wait_condition=
-  select count(*) = 3 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  select count(*) = 0 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
 --source include/wait_condition.inc
 
 echo "================== con1 disconnected ==================";
@@ -411,9 +406,8 @@ execute dump_objects_summary;
 
 # Wait for the disconnect to complete
 let $wait_condition=
-  select count(*) = 2 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  select count(*) = 0 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
 --source include/wait_condition.inc
 
 echo "================== con2 disconnected ==================";
@@ -434,9 +428,8 @@ execute dump_objects_summary;
 
 # Wait for the disconnect to complete
 let $wait_condition=
-  select count(*) = 1 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  select count(*) = 0 from performance_schema.threads
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
 --source include/wait_condition.inc
 
 echo "================== con3 disconnected ==================";
@@ -458,8 +451,7 @@ execute dump_objects_summary;
 # Wait for the disconnect to complete
 let $wait_condition=
   select count(*) = 0 from performance_schema.threads
-  where `TYPE`='FOREGROUND' and PROCESSLIST_USER
-  in ('user1', 'user2', 'user3', 'user4');
+  where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
 --source include/wait_condition.inc
 
 echo "================== con4 disconnected ==================";
@@ -558,3 +550,6 @@ execute dump_waits_table_io;
 execute dump_waits_table_lock;
 execute dump_objects_summary;
 
+# On test failures, may help to track the root cause
+show status like "performance_schema%";
+

=== modified file 'mysql-test/suite/perfschema/r/setup_objects.result'
--- a/mysql-test/suite/perfschema/r/setup_objects.result	2011-07-14 09:53:42 +0000
+++ b/mysql-test/suite/perfschema/r/setup_objects.result	2011-08-03 07:02:05 +0000
@@ -1,4 +1,8 @@
 drop table if exists test.setup_objects;
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+  where name in ('wait/io/table/sql/handler', 'wait/lock/table/sql/handler');
+truncate table performance_schema.events_waits_history_long;
 create table test.setup_objects as select * from performance_schema.setup_objects;
 truncate table performance_schema.setup_objects;
 insert into performance_schema.setup_objects
@@ -200,3 +204,4 @@ drop database db5;
 truncate table performance_schema.setup_objects;
 insert into performance_schema.setup_objects select * from test.setup_objects;
 drop table test.setup_objects;
+update performance_schema.setup_instruments set enabled='YES', timed='YES';

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1709,3 +1709,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1708,3 +1708,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1709,3 +1709,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1708,3 +1708,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1783,3 +1783,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1820,3 +1820,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1783,3 +1783,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1820,3 +1820,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_off.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result	2011-08-03 15:07:17 +0000
@@ -1708,3 +1708,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1709,3 +1709,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1708,3 +1708,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1709,3 +1709,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1708,3 +1708,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1747,3 +1747,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1765,3 +1765,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1747,3 +1747,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1765,3 +1765,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1747,3 +1747,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1765,3 +1765,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1747,3 +1747,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1765,3 +1765,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result	2011-08-03 15:07:17 +0000
@@ -1711,3 +1711,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result'
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result	2011-08-03 15:07:17 +0000
@@ -1710,3 +1710,24 @@ object_type	object_schema	object_name	co
 TABLE	test	t1	0
 TABLE	test	t2	0
 TABLE	test	t3	0
+show status like "performance_schema%";
+Variable_name	Value
+Performance_schema_accounts_lost	0
+Performance_schema_cond_classes_lost	0
+Performance_schema_cond_instances_lost	0
+Performance_schema_file_classes_lost	0
+Performance_schema_file_handles_lost	0
+Performance_schema_file_instances_lost	0
+Performance_schema_hosts_lost	0
+Performance_schema_locker_lost	0
+Performance_schema_mutex_classes_lost	0
+Performance_schema_mutex_instances_lost	0
+Performance_schema_rwlock_classes_lost	0
+Performance_schema_rwlock_instances_lost	0
+Performance_schema_stage_classes_lost	0
+Performance_schema_statement_classes_lost	0
+Performance_schema_table_handles_lost	0
+Performance_schema_table_instances_lost	0
+Performance_schema_thread_classes_lost	0
+Performance_schema_thread_instances_lost	0
+Performance_schema_users_lost	0

=== modified file 'mysql-test/suite/perfschema/t/setup_objects.test'
--- a/mysql-test/suite/perfschema/t/setup_objects.test	2011-07-14 09:53:42 +0000
+++ b/mysql-test/suite/perfschema/t/setup_objects.test	2011-08-03 07:02:05 +0000
@@ -20,6 +20,14 @@
 drop table if exists test.setup_objects;
 --enable_warnings
 
+# Make sure only table io / table lock is instrumented and timed
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+  where name in ('wait/io/table/sql/handler', 'wait/lock/table/sql/handler');
+
+# Remove noise from previous tests
+truncate table performance_schema.events_waits_history_long;
+
 # Save the setup
 create table test.setup_objects as select * from performance_schema.setup_objects;
 truncate table performance_schema.setup_objects;
@@ -200,3 +208,5 @@ truncate table performance_schema.setup_
 insert into performance_schema.setup_objects select * from test.setup_objects;
 drop table test.setup_objects;
 
+update performance_schema.setup_instruments set enabled='YES', timed='YES';
+

=== modified file 'mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result'
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result	2011-07-27 08:58:19 +0000
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result	2011-07-29 10:39:42 +0000
@@ -2,6 +2,11 @@ SET @orig = @@global.innodb_buffer_pool_
 SELECT @orig;
 @orig
 ib_buffer_pool
+SELECT variable_value
+FROM information_schema.global_status
+WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
+variable_value
+not started
 SET GLOBAL innodb_buffer_pool_filename = 'innodb_foobar_dump';
 SET GLOBAL innodb_buffer_pool_dump_now = ON;
 SET GLOBAL innodb_buffer_pool_filename = @orig;

=== added file 'mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic-master.opt	2011-07-29 10:39:42 +0000
@@ -0,0 +1 @@
+--force-restart

=== modified file 'mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test'
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test	2011-07-27 08:58:19 +0000
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test	2011-07-29 10:39:42 +0000
@@ -8,6 +8,15 @@
 SET @orig = @@global.innodb_buffer_pool_filename;
 SELECT @orig;
 
+# Make sure that --force-restart in the .opt file has worked and that
+# the value of this status variable is not something like
+# 'Buffer pool(s) dump completed at ' left from previous runs because if
+# it is then the following wait condition may be satisfied without the
+# dump actually being complete and file_exists may fail.
+SELECT variable_value
+FROM information_schema.global_status
+WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
+
 # Try with a non-default filename
 
 SET GLOBAL innodb_buffer_pool_filename = 'innodb_foobar_dump';

=== modified file 'mysql-test/t/sp.test'
--- a/mysql-test/t/sp.test	2011-07-14 08:05:12 +0000
+++ b/mysql-test/t/sp.test	2011-08-02 08:14:26 +0000
@@ -8376,6 +8376,33 @@ SET @@GLOBAL.init_connect= @old_init_con
 DROP PROCEDURE p2;
 DROP PROCEDURE p5;
 
+--echo #
+--echo # Bug#11766594  59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, KEY(b));
+CREATE TABLE t2 (c INT, d INT, KEY(c));
+INSERT INTO t1 VALUES (1,1),(1,1),(1,2);
+INSERT INTO t2 VALUES (1,1),(1,2);
+
+DELIMITER $;
+
+CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
+BEGIN
+  DECLARE a int;
+  -- SQL statement inside
+  SELECT 1 INTO a;
+  RETURN a;
+END $
+
+DELIMITER ;$
+
+SELECT COUNT(DISTINCT d) FROM t1, t2  WHERE a = c AND b = f1();
+
+DROP FUNCTION f1;
+DROP TABLE t1, t2;
+
+
 --echo # ------------------------------------------------------------------
 --echo # -- End of 5.1 tests
 --echo # ------------------------------------------------------------------

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-07-28 10:54:44 +0000
+++ b/sql/handler.cc	2011-08-03 07:21:17 +0000
@@ -2321,6 +2321,7 @@ int handler::ha_index_read_idx_map(uchar
   int result;
   DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
               m_lock_type != F_UNLCK);
+  DBUG_ASSERT(end_range == NULL);
   MYSQL_TABLE_WAIT_VARIABLES(locker, state) /* no ';' */
 
   MYSQL_START_TABLE_IO_WAIT(locker, &state, m_psi,

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2011-07-20 14:40:52 +0000
+++ b/sql/handler.h	2011-08-03 07:21:17 +0000
@@ -1314,9 +1314,22 @@ public:
   bool mrr_have_range;
   /* Current range (the one we're now returning rows from) */
   KEY_MULTI_RANGE mrr_cur_range;
-  
-  /** The following are for read_range() */
-  key_range save_end_range, *end_range;
+
+protected:
+  /*
+    Storage space for the end range value. Should only be accessed using
+    the end_range pointer. The content is invalid when end_range is NULL.
+  */
+  key_range save_end_range;
+
+public:  
+  /*
+    End value for a range scan. If this is NULL the range scan has no
+    end value. Should also be NULL when there is no ongoing range scan.
+    Used by the read_range() functions and also evaluated by pushed
+    index conditions.
+  */
+  key_range *end_range;
   KEY_PART_INFO *range_key_part;
   int key_compare_result_on_equal;
   bool eq_range;
@@ -1400,7 +1413,7 @@ public:
   handler(handlerton *ht_arg, TABLE_SHARE *share_arg)
     :table_share(share_arg), table(0),
     estimation_rows_to_insert(0), ht(ht_arg),
-    ref(0), in_range_check_pushed_down(FALSE),
+    ref(0), end_range(NULL), in_range_check_pushed_down(false),
     key_used_on_scan(MAX_KEY), active_index(MAX_KEY),
     ref_length(sizeof(my_off_t)),
     ft_handler(0), inited(NONE),

=== modified file 'sql/item_xmlfunc.cc'
--- a/sql/item_xmlfunc.cc	2011-07-28 10:54:44 +0000
+++ b/sql/item_xmlfunc.cc	2011-08-02 08:33:54 +0000
@@ -2488,7 +2488,7 @@ my_xpath_parse_VariableReference(MY_XPAT
     xpath->item= new Item_func_get_user_var(name);
   else
   {
-    sp_variable_t *spv;
+    sp_variable *spv;
     sp_pcontext *spc;
     LEX *lex;
     if ((lex= current_thd->lex) &&

=== modified file 'sql/opt_explain.cc'
--- a/sql/opt_explain.cc	2011-07-28 10:54:44 +0000
+++ b/sql/opt_explain.cc	2011-08-02 08:14:26 +0000
@@ -1013,7 +1013,7 @@ bool Explain_join::explain_extra()
     explain_tmptable_and_filesort(need_tmp_table, need_order, &str_extra);
     need_tmp_table= need_order= false;
 
-    if (distinct && test_all_bits(used_tables,thd->used_tables))
+    if (distinct && test_all_bits(used_tables, thd->lex->used_tables))
       str_extra.append(STRING_WITH_LEN("; Distinct"));
 
     if (tab->loosescan_match_tab)

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sp_head.cc	2011-08-02 08:34:30 +0000
@@ -2126,12 +2126,12 @@ sp_head::execute_procedure(THD *thd, Lis
       if (!arg_item)
         break;
 
-      sp_variable_t *spvar= m_pcont->find_variable(i);
+      sp_variable *spvar= m_pcont->find_variable(i);
 
       if (!spvar)
         continue;
 
-      if (spvar->mode != sp_param_in)
+      if (spvar->mode != sp_variable::MODE_IN)
       {
         Settable_routine_parameter *srp=
           arg_item->get_settable_routine_parameter();
@@ -2143,10 +2143,10 @@ sp_head::execute_procedure(THD *thd, Lis
           break;
         }
 
-        srp->set_required_privilege(spvar->mode == sp_param_inout);
+        srp->set_required_privilege(spvar->mode == sp_variable::MODE_INOUT);
       }
 
-      if (spvar->mode == sp_param_out)
+      if (spvar->mode == sp_variable::MODE_OUT)
       {
         Item_null *null_item= new Item_null();
 
@@ -2248,9 +2248,9 @@ sp_head::execute_procedure(THD *thd, Lis
       if (!arg_item)
         break;
 
-      sp_variable_t *spvar= m_pcont->find_variable(i);
+      sp_variable *spvar= m_pcont->find_variable(i);
 
-      if (spvar->mode == sp_param_in)
+      if (spvar->mode == sp_variable::MODE_IN)
         continue;
 
       Settable_routine_parameter *srp=
@@ -2408,7 +2408,7 @@ sp_head::restore_lex(THD *thd)
   Put the instruction on the backpatch list, associated with the label.
 */
 int
-sp_head::push_backpatch(sp_instr *i, sp_label_t *lab)
+sp_head::push_backpatch(sp_instr *i, sp_label *lab)
 {
   bp_t *bp= (bp_t *)sql_alloc(sizeof(bp_t));
 
@@ -2424,7 +2424,7 @@ sp_head::push_backpatch(sp_instr *i, sp_
   the current position.
 */
 void
-sp_head::backpatch(sp_label_t *lab)
+sp_head::backpatch(sp_label *lab)
 {
   bp_t *bp;
   uint dest= instructions();
@@ -3273,7 +3273,7 @@ sp_instr_set::print(String *str)
 {
   /* set name@offset ... */
   int rsrv = SP_INSTR_UINT_MAXLEN+6;
-  sp_variable_t *var = m_ctx->find_variable(m_offset);
+  sp_variable *var = m_ctx->find_variable(m_offset);
 
   /* 'var' should always be non-null, but just in case... */
   if (var)
@@ -3544,8 +3544,8 @@ int
 sp_instr_hpush_jump::execute(THD *thd, uint *nextp)
 {
   DBUG_ENTER("sp_instr_hpush_jump::execute");
-  List_iterator_fast<sp_cond_type_t> li(m_cond);
-  sp_cond_type_t *p;
+  List_iterator_fast<sp_condition_value> li(m_cond);
+  sp_condition_value *p;
 
   while ((p= li++))
     thd->spcont->push_handler(p, m_ip+1, m_type);
@@ -3911,8 +3911,8 @@ sp_instr_cfetch::execute(THD *thd, uint
 void
 sp_instr_cfetch::print(String *str)
 {
-  List_iterator_fast<struct sp_variable> li(m_varlist);
-  sp_variable_t *pv;
+  List_iterator_fast<sp_variable> li(m_varlist);
+  sp_variable *pv;
   LEX_STRING n;
   my_bool found= m_ctx->find_cursor(m_cursor, &n);
   /* cfetch name@offset vars... */

=== modified file 'sql/sp_head.h'
--- a/sql/sp_head.h	2011-07-20 14:40:52 +0000
+++ b/sql/sp_head.h	2011-08-02 08:34:30 +0000
@@ -53,7 +53,7 @@ struct sp_label;
 class sp_instr;
 class sp_instr_opt_meta;
 class sp_instr_jump_if_not;
-struct sp_cond_type;
+struct sp_condition_value;
 struct sp_variable;
 
 /*************************************************************************/
@@ -354,12 +354,12 @@ public:
 
   /// Put the instruction on the backpatch list, associated with the label.
   int
-  push_backpatch(sp_instr *, struct sp_label *);
+  push_backpatch(sp_instr *, sp_label *);
 
   /// Update all instruction with this label in the backpatch list to
   /// the current position.
   void
-  backpatch(struct sp_label *);
+  backpatch(sp_label *);
 
   /// Start a new cont. backpatch level. If 'i' is NULL, the level is just incr.
   int
@@ -495,7 +495,7 @@ private:
   DYNAMIC_ARRAY m_instr;	///< The "instructions"
   typedef struct
   {
-    struct sp_label *lab;
+    sp_label *lab;
     sp_instr *instr;
   } bp_t;
   List<bp_t> m_backpatch;	///< Instructions needing backpatching
@@ -1039,7 +1039,7 @@ public:
       m_opt_hpop= dest;
   }
 
-  inline void add_condition(struct sp_cond_type *cond)
+  inline void add_condition(sp_condition_value *cond)
   {
     m_cond.push_front(cond);
   }
@@ -1049,7 +1049,7 @@ private:
   int m_type;			///< Handler type
   uint m_frame;
   uint m_opt_hpop;              // hpop marking end of handler scope.
-  List<struct sp_cond_type> m_cond;
+  List<sp_condition_value> m_cond;
 
 }; // class sp_instr_hpush_jump : public sp_instr_jump
 
@@ -1242,7 +1242,7 @@ public:
 
   virtual void print(String *str);
 
-  void add_to_varlist(struct sp_variable *var)
+  void add_to_varlist(sp_variable *var)
   {
     m_varlist.push_back(var);
   }
@@ -1250,7 +1250,7 @@ public:
 private:
 
   uint m_cursor;
-  List<struct sp_variable> m_varlist;
+  List<sp_variable> m_varlist;
 
 }; // class sp_instr_cfetch : public sp_instr
 

=== modified file 'sql/sp_pcontext.cc'
--- a/sql/sp_pcontext.cc	2011-06-30 15:50:45 +0000
+++ b/sql/sp_pcontext.cc	2011-08-02 17:47:00 +0000
@@ -54,21 +54,21 @@ sp_pcontext::sp_pcontext()
   : Sql_alloc(),
   m_max_var_index(0), m_max_cursor_index(0), m_max_handler_index(0),
   m_context_handlers(0), m_parent(NULL), m_pboundary(0),
-  m_label_scope(LABEL_DEFAULT_SCOPE)
+  m_scope(REGULAR_SCOPE)
 {
-  (void) my_init_dynamic_array(&m_vars, sizeof(sp_variable_t *),
+  (void) my_init_dynamic_array(&m_vars, sizeof(sp_variable *),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
   (void) my_init_dynamic_array(&m_case_expr_id_lst, sizeof(int),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
-  (void) my_init_dynamic_array(&m_conds, sizeof(sp_cond_type_t *),
+  (void) my_init_dynamic_array(&m_conds, sizeof(sp_condition *),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
   (void) my_init_dynamic_array(&m_cursors, sizeof(LEX_STRING),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
-  (void) my_init_dynamic_array(&m_handlers, sizeof(sp_cond_type_t *),
+  (void) my_init_dynamic_array(&m_handlers, sizeof(sp_condition_value *),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
   m_label.empty();
@@ -78,25 +78,25 @@ sp_pcontext::sp_pcontext()
   m_num_case_exprs= 0;
 }
 
-sp_pcontext::sp_pcontext(sp_pcontext *prev, label_scope_type label_scope)
+sp_pcontext::sp_pcontext(sp_pcontext *prev, sp_pcontext::enum_scope scope)
   : Sql_alloc(),
   m_max_var_index(0), m_max_cursor_index(0), m_max_handler_index(0),
   m_context_handlers(0), m_parent(prev), m_pboundary(0),
-  m_label_scope(label_scope)
+  m_scope(scope)
 {
-  (void) my_init_dynamic_array(&m_vars, sizeof(sp_variable_t *),
+  (void) my_init_dynamic_array(&m_vars, sizeof(sp_variable *),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
   (void) my_init_dynamic_array(&m_case_expr_id_lst, sizeof(int),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
-  (void) my_init_dynamic_array(&m_conds, sizeof(sp_cond_type_t *),
+  (void) my_init_dynamic_array(&m_conds, sizeof(sp_condition *),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
   (void) my_init_dynamic_array(&m_cursors, sizeof(LEX_STRING),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
-  (void) my_init_dynamic_array(&m_handlers, sizeof(sp_cond_type_t *),
+  (void) my_init_dynamic_array(&m_handlers, sizeof(sp_condition_value *),
                              PCONTEXT_ARRAY_INIT_ALLOC,
                              PCONTEXT_ARRAY_INCREMENT_ALLOC);
   m_label.empty();
@@ -126,9 +126,9 @@ sp_pcontext::destroy()
 }
 
 sp_pcontext *
-sp_pcontext::push_context(label_scope_type label_scope)
+sp_pcontext::push_context(sp_pcontext::enum_scope scope)
 {
-  sp_pcontext *child= new sp_pcontext(this, label_scope);
+  sp_pcontext *child= new sp_pcontext(this, scope);
 
   if (child)
     m_children.push_back(child);
@@ -198,14 +198,14 @@ sp_pcontext::diff_cursors(sp_pcontext *c
   variables will in most cases be low (a handfull).
   ...and, this is only called during parsing.
 */
-sp_variable_t *
+sp_variable *
 sp_pcontext::find_variable(LEX_STRING *name, my_bool scoped)
 {
   uint i= m_vars.elements - m_pboundary;
 
   while (i--)
   {
-    sp_variable_t *p;
+    sp_variable *p;
 
     get_dynamic(&m_vars, (uchar*)&p, i);
     if (my_strnncoll(system_charset_info,
@@ -227,12 +227,12 @@ sp_pcontext::find_variable(LEX_STRING *n
     at the end, of invokation. (Top frame only, so no recursion then.)
   - For printing of sp_instr_set. (Debug mode only.)
 */
-sp_variable_t *
+sp_variable *
 sp_pcontext::find_variable(uint offset)
 {
   if (m_var_offset <= offset && offset < m_var_offset + m_vars.elements)
   {                           // This frame
-    sp_variable_t *p;
+    sp_variable *p;
 
     get_dynamic(&m_vars, (uchar*)&p, offset - m_var_offset);
     return p;
@@ -242,11 +242,11 @@ sp_pcontext::find_variable(uint offset)
   return NULL;                  // index out of bounds
 }
 
-sp_variable_t *
+sp_variable *
 sp_pcontext::push_variable(LEX_STRING *name, enum enum_field_types type,
-                           sp_param_mode_t mode)
+                           sp_variable::enum_mode mode)
 {
-  sp_variable_t *p= (sp_variable_t *)sql_alloc(sizeof(sp_variable_t));
+  sp_variable *p= (sp_variable *)sql_alloc(sizeof(sp_variable));
 
   if (!p)
     return NULL;
@@ -265,27 +265,27 @@ sp_pcontext::push_variable(LEX_STRING *n
 }
 
 
-sp_label_t *
+sp_label *
 sp_pcontext::push_label(char *name, uint ip)
 {
-  sp_label_t *lab = (sp_label_t *)sql_alloc(sizeof(sp_label_t));
+  sp_label *lab = (sp_label *)sql_alloc(sizeof(sp_label));
 
   if (lab)
   {
     lab->name= name;
     lab->ip= ip;
-    lab->type= SP_LAB_IMPL;
+    lab->type= sp_label::IMPLICIT;
     lab->ctx= this;
     m_label.push_front(lab);
   }
   return lab;
 }
 
-sp_label_t *
+sp_label *
 sp_pcontext::find_label(char *name)
 {
-  List_iterator_fast<sp_label_t> li(m_label);
-  sp_label_t *lab;
+  List_iterator_fast<sp_label> li(m_label);
+  sp_label *lab;
 
   while ((lab= li++))
     if (my_strcasecmp(system_charset_info, name, lab->name) == 0)
@@ -299,15 +299,15 @@ sp_pcontext::find_label(char *name)
     In short, a DECLARE HANDLER block can not refer
     to labels from the parent context, as they are out of scope.
   */
-  if (m_parent && (m_label_scope == LABEL_DEFAULT_SCOPE))
+  if (m_parent && (m_scope == REGULAR_SCOPE))
     return m_parent->find_label(name);
   return NULL;
 }
 
 int
-sp_pcontext::push_cond(LEX_STRING *name, sp_cond_type_t *val)
+sp_pcontext::push_cond(LEX_STRING *name, sp_condition_value *val)
 {
-  sp_cond_t *p= (sp_cond_t *)sql_alloc(sizeof(sp_cond_t));
+  sp_condition *p= (sp_condition *)sql_alloc(sizeof(sp_condition));
 
   if (p == NULL)
     return 1;
@@ -320,14 +320,14 @@ sp_pcontext::push_cond(LEX_STRING *name,
 /*
   See comment for find_variable() above
 */
-sp_cond_type_t *
+sp_condition_value *
 sp_pcontext::find_cond(LEX_STRING *name, my_bool scoped)
 {
   uint i= m_conds.elements;
 
   while (i--)
   {
-    sp_cond_t *p;
+    sp_condition *p;
 
     get_dynamic(&m_conds, (uchar*)&p, i);
     if (my_strnncoll(system_charset_info,
@@ -348,24 +348,24 @@ sp_pcontext::find_cond(LEX_STRING *name,
   Returns TRUE if found.
 */
 bool
-sp_pcontext::find_handler(sp_cond_type_t *cond)
+sp_pcontext::find_handler(sp_condition_value *cond)
 {
   uint i= m_handlers.elements;
 
   while (i--)
   {
-    sp_cond_type_t *p;
+    sp_condition_value *p;
 
     get_dynamic(&m_handlers, (uchar*)&p, i);
     if (cond->type == p->type)
     {
       switch (p->type)
       {
-      case sp_cond_type_t::number:
+      case sp_condition_value::number:
 	if (cond->mysqlerr == p->mysqlerr)
 	  return TRUE;
 	break;
-      case sp_cond_type_t::state:
+      case sp_condition_value::state:
 	if (strcmp(cond->sqlstate, p->sqlstate) == 0)
 	  return TRUE;
 	break;
@@ -423,7 +423,7 @@ sp_pcontext::retrieve_field_definitions(
 
   for (uint i = 0; i < m_vars.elements; ++i)
   {
-    sp_variable_t *var_def;
+    sp_variable *var_def;
     get_dynamic(&m_vars, (uchar*) &var_def, i);
 
     field_def_lst->push_back(&var_def->field_def);

=== modified file 'sql/sp_pcontext.h'
--- a/sql/sp_pcontext.h	2011-06-30 15:50:45 +0000
+++ b/sql/sp_pcontext.h	2011-08-02 08:34:30 +0000
@@ -21,20 +21,18 @@
 #include "mysql_com.h"                          // enum_field_types
 #include "field.h"                              // Create_field
 
-class sp_pcontext;
-
-typedef enum
+struct sp_variable
 {
-  sp_param_in,
-  sp_param_out,
-  sp_param_inout
-} sp_param_mode_t;
+  enum enum_mode
+  {
+    MODE_IN,
+    MODE_OUT,
+    MODE_INOUT
+  };
 
-typedef struct sp_variable
-{
   LEX_STRING name;
   enum enum_field_types type;
-  sp_param_mode_t mode;
+  enum_mode mode;
   
   /*
     offset -- this the index to the variable's value in the runtime frame.
@@ -46,12 +44,8 @@ typedef struct sp_variable
 
   Item *dflt;
   Create_field field_def;
-} sp_variable_t;
-
+};
 
-#define SP_LAB_IMPL  0		// Implicit label generated by parser
-#define SP_LAB_BEGIN 1		// Label at BEGIN
-#define SP_LAB_ITER  2		// Label at iteration control
 
 /*
   An SQL/PSM label. Can refer to the identifier used with the
@@ -62,20 +56,32 @@ typedef struct sp_variable
   a combination of low-level jump/jump_if instructions and labels.
 */
 
-typedef struct sp_label
+struct sp_label
 {
+  enum enum_type
+  {
+    /// Implicit label generated by parser.
+    IMPLICIT,
+
+    /// Label at BEGIN.
+    BEGIN,
+
+    /// Label at iteration control
+    ITERATION
+  };
+
   char *name;
-  uint ip;			// Instruction index
-  int type;			// begin/iter or ref/free 
-  sp_pcontext *ctx;             // The label's context
-} sp_label_t;
+  uint ip;                // Instruction index
+  enum_type type;         // begin/iter or ref/free 
+  class sp_pcontext *ctx; // The label's context
+};
 
-typedef struct sp_cond_type
+struct sp_condition_value
 {
   enum { number, state, warning, notfound, exception } type;
   char sqlstate[SQLSTATE_LENGTH+1];
   uint mysqlerr;
-} sp_cond_type_t;
+};
 
 /*
   Sanity check for SQLSTATEs. Will not check if it's really an existing
@@ -84,26 +90,10 @@ typedef struct sp_cond_type
 extern bool
 sp_cond_check(LEX_STRING *sqlstate);
 
-typedef struct sp_cond
+struct sp_condition
 {
   LEX_STRING name;
-  sp_cond_type_t *val;
-} sp_cond_t;
-
-/**
-  The scope of a label in Stored Procedures,
-  for name resolution of labels in a parsing context.
-*/
-enum label_scope_type
-{
-  /**
-    The labels declared in a parent context are in scope.
-  */
-  LABEL_DEFAULT_SCOPE,
-  /**
-    The labels declared in a parent context are not in scope.
-  */
-  LABEL_HANDLER_SCOPE
+  sp_condition_value *val;
 };
 
 /**
@@ -125,6 +115,16 @@ enum label_scope_type
 class sp_pcontext : public Sql_alloc
 {
 public:
+  enum enum_scope
+  {
+    /// REGULAR_SCOPE designates regular BEGIN ... END blocks.
+    REGULAR_SCOPE,
+
+    /// HANDLER_SCOPE designates SQL-handler blocks.
+    HANDLER_SCOPE
+  };
+
+public:
 
   /**
     Constructor.
@@ -138,11 +138,11 @@ public:
 
   /**
     Create and push a new context in the tree.
-    @param label_scope label scope for the new parsing context
+    @param scope scope of the new parsing context
     @return the node created
   */
   sp_pcontext *
-  push_context(label_scope_type label_scope);
+  push_context(enum_scope scope);
 
   /**
     Pop a node from the parsing context tree.
@@ -211,7 +211,7 @@ public:
   inline void
   set_type(uint i, enum enum_field_types type)
   {
-    sp_variable_t *p= find_variable(i);
+    sp_variable *p= find_variable(i);
 
     if (p)
       p->type= type;
@@ -221,15 +221,15 @@ public:
   inline void
   set_default(uint i, Item *it)
   {
-    sp_variable_t *p= find_variable(i);
+    sp_variable *p= find_variable(i);
 
     if (p)
       p->dflt= it;
   }
 
-  sp_variable_t *
+  sp_variable *
   push_variable(LEX_STRING *name, enum enum_field_types type,
-                sp_param_mode_t mode);
+                sp_variable::enum_mode mode);
 
   /*
     Retrieve definitions of fields from the current context and its
@@ -239,11 +239,11 @@ public:
   retrieve_field_definitions(List<Create_field> *field_def_lst);
 
   // Find by name
-  sp_variable_t *
+  sp_variable *
   find_variable(LEX_STRING *name, my_bool scoped=0);
 
   // Find by offset (from the top)
-  sp_variable_t *
+  sp_variable *
   find_variable(uint offset);
 
   /*
@@ -299,23 +299,23 @@ public:
   // Labels
   //
 
-  sp_label_t *
+  sp_label *
   push_label(char *name, uint ip);
 
-  sp_label_t *
+  sp_label *
   find_label(char *name);
 
-  inline sp_label_t *
+  inline sp_label *
   last_label()
   {
-    sp_label_t *lab= m_label.head();
+    sp_label *lab= m_label.head();
 
     if (!lab && m_parent)
       lab= m_parent->last_label();
     return lab;
   }
 
-  inline sp_label_t *
+  inline sp_label *
   pop_label()
   {
     return m_label.pop();
@@ -326,9 +326,9 @@ public:
   //
 
   int
-  push_cond(LEX_STRING *name, sp_cond_type_t *val);
+  push_cond(LEX_STRING *name, sp_condition_value *val);
 
-  sp_cond_type_t *
+  sp_condition_value *
   find_cond(LEX_STRING *name, my_bool scoped=0);
 
   //
@@ -336,13 +336,13 @@ public:
   //
 
   inline void
-  push_handler(sp_cond_type_t *cond)
+  push_handler(sp_condition_value *cond)
   {
     insert_dynamic(&m_handlers, &cond);
   }
 
   bool
-  find_handler(sp_cond_type *cond);
+  find_handler(sp_condition_value *cond);
 
   inline uint
   max_handler_index()
@@ -387,9 +387,9 @@ protected:
   /**
     Constructor for a tree node.
     @param prev the parent parsing context
-    @param label_scope label_scope for this parsing context
+    @param scope scope of this parsing context
   */
-  sp_pcontext(sp_pcontext *prev, label_scope_type label_scope);
+  sp_pcontext(sp_pcontext *prev, enum_scope scope);
 
   /*
     m_max_var_index -- number of variables (including all types of arguments)
@@ -440,14 +440,14 @@ private:
   DYNAMIC_ARRAY m_cursors;	// Cursors
   DYNAMIC_ARRAY m_handlers;	// Handlers, for checking for duplicates
 
-  List<sp_label_t> m_label;	// The label list
+  List<sp_label> m_label;	// The label list
 
   List<sp_pcontext> m_children;	// Children contexts, used for destruction
 
   /**
-    Scope of labels for this parsing context.
+    Scope of this parsing context.
   */
-  label_scope_type m_label_scope;
+  enum_scope m_scope;
 
 private:
   sp_pcontext(const sp_pcontext &); /* Prevent use of these */

=== modified file 'sql/sp_rcontext.cc'
--- a/sql/sp_rcontext.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sp_rcontext.cc	2011-08-02 08:34:30 +0000
@@ -78,12 +78,12 @@ bool sp_rcontext::init(THD *thd)
 
   return
     !(m_handler=
-      (sp_handler_t*)thd->alloc(handler_count * sizeof(sp_handler_t))) ||
+      (sp_handler*)thd->alloc(handler_count * sizeof(sp_handler))) ||
     !(m_hstack=
       (uint*)thd->alloc(handler_count * sizeof(uint))) ||
     !(m_in_handler=
-      (sp_active_handler_t*)thd->alloc(handler_count *
-                                       sizeof(sp_active_handler_t))) ||
+      (sp_active_handler*)thd->alloc(handler_count *
+                                     sizeof(sp_active_handler))) ||
     !(m_cstack=
       (sp_cursor**)thd->alloc(m_root_parsing_ctx->max_cursor_index() *
                               sizeof(sp_cursor*))) ||
@@ -224,7 +224,7 @@ sp_rcontext::find_handler(THD *thd,
   /* Search handlers from the latest (innermost) to the oldest (outermost) */
   while (i--)
   {
-    sp_cond_type_t *cond= m_handler[i].cond;
+    sp_condition_value *cond= m_handler[i].cond;
     int j= m_ihsp;
 
     /* Check active handlers, to avoid invoking one recursively */
@@ -236,27 +236,27 @@ sp_rcontext::find_handler(THD *thd,
 
     switch (cond->type)
     {
-    case sp_cond_type_t::number:
+    case sp_condition_value::number:
       if (sql_errno == cond->mysqlerr &&
-          (m_hfound < 0 || m_handler[m_hfound].cond->type > sp_cond_type_t::number))
+          (m_hfound < 0 || m_handler[m_hfound].cond->type > sp_condition_value::number))
 	m_hfound= i;		// Always the most specific
       break;
-    case sp_cond_type_t::state:
+    case sp_condition_value::state:
       if (strcmp(sqlstate, cond->sqlstate) == 0 &&
-	  (m_hfound < 0 || m_handler[m_hfound].cond->type > sp_cond_type_t::state))
+	  (m_hfound < 0 || m_handler[m_hfound].cond->type > sp_condition_value::state))
 	m_hfound= i;
       break;
-    case sp_cond_type_t::warning:
+    case sp_condition_value::warning:
       if ((IS_WARNING_CONDITION(sqlstate) ||
            level == Sql_condition::WARN_LEVEL_WARN) &&
           m_hfound < 0)
 	m_hfound= i;
       break;
-    case sp_cond_type_t::notfound:
+    case sp_condition_value::notfound:
       if (IS_NOT_FOUND_CONDITION(sqlstate) && m_hfound < 0)
 	m_hfound= i;
       break;
-    case sp_cond_type_t::exception:
+    case sp_condition_value::exception:
       if (IS_EXCEPTION_CONDITION(sqlstate) &&
 	  level == Sql_condition::WARN_LEVEL_ERROR &&
 	  m_hfound < 0)
@@ -314,7 +314,7 @@ sp_rcontext::pop_cursors(uint count)
 }
 
 void
-sp_rcontext::push_handler(struct sp_cond_type *cond, uint h, int type)
+sp_rcontext::push_handler(sp_condition_value *cond, uint h, int type)
 {
   DBUG_ENTER("sp_rcontext::push_handler");
   DBUG_ASSERT(m_hcount < m_root_parsing_ctx->max_handler_index());
@@ -561,7 +561,7 @@ sp_cursor::destroy()
 
 
 int
-sp_cursor::fetch(THD *thd, List<struct sp_variable> *vars)
+sp_cursor::fetch(THD *thd, List<sp_variable> *vars)
 {
   if (! server_side_cursor)
   {
@@ -714,9 +714,9 @@ int Select_fetch_into_spvars::prepare(Li
 
 bool Select_fetch_into_spvars::send_data(List<Item> &items)
 {
-  List_iterator_fast<struct sp_variable> spvar_iter(*spvar_list);
+  List_iterator_fast<sp_variable> spvar_iter(*spvar_list);
   List_iterator_fast<Item> item_iter(items);
-  sp_variable_t *spvar;
+  sp_variable *spvar;
   Item *item;
 
   /* Must be ensured by the caller */

=== modified file 'sql/sp_rcontext.h'
--- a/sql/sp_rcontext.h	2011-07-28 10:54:44 +0000
+++ b/sql/sp_rcontext.h	2011-08-02 08:34:30 +0000
@@ -19,7 +19,7 @@
 
 #include "sql_class.h"                    // select_result_interceptor
 
-struct sp_cond_type;
+struct sp_condition_value;
 class sp_cursor;
 struct sp_variable;
 class sp_lex_keeper;
@@ -36,23 +36,23 @@ class Server_side_cursor;
 #define SP_HANDLER_CONTINUE  2
 #define SP_HANDLER_UNDO      3
 
-typedef struct
+struct sp_handler
 {
   /** Condition caught by this HANDLER. */
-  struct sp_cond_type *cond;
+  sp_condition_value *cond;
   /** Location (instruction pointer) of the handler code. */
   uint handler;
   /** Handler type (EXIT, CONTINUE). */
   int type;
-} sp_handler_t;
+};
 
-typedef struct
+struct sp_active_handler
 {
   /** Instruction pointer of the active handler. */
   uint ip;
   /** Handler index of the active handler. */
   uint index;
-} sp_active_handler_t;
+};
 
 /*
   This class is a runtime context of a Stored Routine. It is used in an
@@ -131,7 +131,7 @@ class sp_rcontext : public Sql_alloc
     SQL handlers support.
   */
 
-  void push_handler(struct sp_cond_type *cond, uint h, int type);
+  void push_handler(sp_condition_value *cond, uint h, int type);
 
   void pop_handlers(uint count);
 
@@ -222,7 +222,7 @@ private:
   */
   bool in_sub_stmt;
 
-  sp_handler_t *m_handler;      // Visible handlers
+  sp_handler *m_handler;      // Visible handlers
 
   /**
     SQL conditions caught by each handler.
@@ -234,7 +234,7 @@ private:
   uint *m_hstack;               // Return stack for continue handlers
   uint m_hsp;                   // Stack pointer for m_hstack
   /** Active handler stack. */
-  sp_active_handler_t *m_in_handler;
+  sp_active_handler *m_in_handler;
   uint m_ihsp;                  // Stack pointer for m_in_handler
   int m_hfound;                 // Set by find_handler; -1 if not found
 
@@ -263,12 +263,12 @@ private:
 
 class Select_fetch_into_spvars: public select_result_interceptor
 {
-  List<struct sp_variable> *spvar_list;
+  List<sp_variable> *spvar_list;
   uint field_count;
 public:
   Select_fetch_into_spvars() {}               /* Remove gcc warning */
   uint get_field_count() { return field_count; }
-  void set_spvar_list(List<struct sp_variable> *vars) { spvar_list= vars; }
+  void set_spvar_list(List<sp_variable> *vars) { spvar_list= vars; }
 
   virtual bool send_eof() { return FALSE; }
   virtual bool send_data(List<Item> &items);
@@ -305,7 +305,7 @@ public:
   }
 
   int
-  fetch(THD *, List<struct sp_variable> *vars);
+  fetch(THD *, List<sp_variable> *vars);
 
   inline sp_instr_cpush *
   get_instr()

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_base.cc	2011-08-02 08:14:26 +0000
@@ -8166,7 +8166,7 @@ bool setup_fields(THD *thd, Ref_ptr_arra
     if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM &&
 	sum_func_list)
       item->split_sum_func(thd, ref_pointer_array, *sum_func_list);
-    thd->used_tables|= item->used_tables();
+    thd->lex->used_tables|= item->used_tables();
     thd->lex->current_select->cur_pos_in_select_list++;
   }
   thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
@@ -8473,7 +8473,7 @@ insert_fields(THD *thd, Name_resolution_
       views and natural joins this update is performed inside the loop below.
     */
     if (table)
-      thd->used_tables|= table->map;
+      thd->lex->used_tables|= table->map;
 
     /*
       Initialize a generic field iterator for the current table reference.
@@ -8558,7 +8558,7 @@ insert_fields(THD *thd, Name_resolution_
           field_table= nj_col->table_ref->table;
           if (field_table)
           {
-            thd->used_tables|= field_table->map;
+            thd->lex->used_tables|= field_table->map;
             field_table->covering_keys.intersect(field->part_of_key);
             field_table->merge_keys.merge(field->part_of_key);
             field_table->used_fields++;
@@ -8566,7 +8566,7 @@ insert_fields(THD *thd, Name_resolution_
         }
       }
       else
-        thd->used_tables|= item->used_tables();
+        thd->lex->used_tables|= item->used_tables();
       thd->lex->current_select->cur_pos_in_select_list++;
     }
     /*

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_class.cc	2011-08-02 08:14:26 +0000
@@ -821,7 +821,6 @@ THD::THD(bool enable_plugins)
   is_slave_error= thread_specific_used= FALSE;
   my_hash_clear(&handler_tables_hash);
   tmp_table=0;
-  used_tables=0;
   cuted_fields= 0L;
   m_sent_row_count= 0L;
   limit_found_rows= 0;

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2011-07-28 10:54:44 +0000
+++ b/sql/sql_class.h	2011-08-02 08:14:26 +0000
@@ -2315,13 +2315,6 @@ public:
   void set_status_no_index_used();
   void set_status_no_good_index_used();
 
-  /*
-    The set of those tables whose fields are referenced in all subqueries
-    of the query.
-    TODO: possibly this it is incorrect to have used tables in THD because
-    with more than one subquery, it is not clear what does the field mean.
-  */
-  table_map  used_tables;
   USER_CONN *user_connect;
   const CHARSET_INFO *db_charset;
 #if defined(ENABLED_PROFILING)

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_insert.cc	2011-08-02 08:14:26 +0000
@@ -723,7 +723,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
   lock_type= table_list->lock_type;
 
   THD_STAGE_INFO(thd, stage_init);
-  thd->used_tables=0;
+  thd->lex->used_tables=0;
   values= its++;
   value_count= values->elements;
 
@@ -889,7 +889,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
     }
     else
     {
-      if (thd->used_tables)			// Column used in values()
+      if (thd->lex->used_tables)		      // Column used in values()
 	restore_record(table,s->default_values);	// Get empty record
       else
       {

=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2011-07-25 10:54:06 +0000
+++ b/sql/sql_lex.cc	2011-08-02 08:14:26 +0000
@@ -435,6 +435,7 @@ void lex_start(THD *thd)
   lex->server_options.port= -1;
 
   lex->is_lex_started= TRUE;
+  lex->used_tables= 0;
   DBUG_VOID_RETURN;
 }
 

=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h	2011-07-20 10:24:14 +0000
+++ b/sql/sql_lex.h	2011-08-02 08:14:26 +0000
@@ -2287,6 +2287,16 @@ struct LEX: public Query_tables_list
   bool escape_used;
   bool is_lex_started; /* If lex_start() did run. For debugging. */
 
+  /*
+    The set of those tables whose fields are referenced in all subqueries
+    of the query.
+    TODO: possibly this it is incorrect to have used tables in LEX because
+    with subquery, it is not clear what does the field mean. To fix this
+    we should aggregate used tables information for selected expressions
+    into the select_lex.
+  */
+  table_map  used_tables;
+
   LEX();
 
   virtual ~LEX()

=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_plugin.cc	2011-08-03 11:23:01 +0000
@@ -2279,7 +2279,9 @@ static void update_func_str(THD *thd, st
   *(char **)tgt= *(char **) save;
   if (var->flags & PLUGIN_VAR_MEMALLOC)
   {
-    *(char **)tgt= my_strdup(*(char **) save, MYF(0));
+    if (*(char **) save != NULL) {
+      *(char **)tgt= my_strdup(*(char **) save, MYF(0));
+    }
     my_free(old);
   }
 }

=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc	2011-07-28 09:00:43 +0000
+++ b/sql/sql_prepare.cc	2011-08-02 08:14:26 +0000
@@ -1472,7 +1472,7 @@ static int mysql_test_select(Prepared_st
   if (open_normal_and_derived_tables(thd, tables, MYSQL_OPEN_FORCE_SHARED_MDL))
     goto error;
 
-  thd->used_tables= 0;                        // Updated by setup_fields
+  thd->lex->used_tables= 0;                        // Updated by setup_fields
   thd->thd_marker.emb_on_expr_nest= 0;
 
   /*
@@ -1646,7 +1646,7 @@ static bool select_like_stmt_test(Prepar
   if (specific_prepare && (*specific_prepare)(thd))
     DBUG_RETURN(TRUE);
 
-  thd->used_tables= 0;                        // Updated by setup_fields
+  thd->lex->used_tables= 0;                        // Updated by setup_fields
 
   /* Calls JOIN::prepare */
   DBUG_RETURN(lex->unit.prepare(thd, 0, setup_tables_done_option));

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_select.cc	2011-08-02 08:14:26 +0000
@@ -550,7 +550,7 @@ fix_inner_refs(THD *thd, List<Item> &all
 
     if (!ref->fixed && ref->fix_fields(thd, 0))
       return TRUE;
-    thd->used_tables|= item->used_tables();
+    thd->lex->used_tables|= item->used_tables();
   }
   return false;
 }
@@ -2742,7 +2742,7 @@ JOIN::optimize()
 
     if (exec_tmp_table1->distinct)
     {
-      table_map used_tables= thd->used_tables;
+      table_map used_tables= thd->lex->used_tables;
       JOIN_TAB *last_join_tab= join_tab+tables-1;
       do
       {
@@ -3763,7 +3763,7 @@ mysql_select(THD *thd,
     if (!(join= new JOIN(thd, fields, select_options, result)))
 	DBUG_RETURN(TRUE); /* purecov: inspected */
     THD_STAGE_INFO(thd, stage_init);
-    thd->used_tables=0;                         // Updated by setup_fields
+    thd->lex->used_tables=0;                         // Updated by setup_fields
     err= join->prepare(tables, wild_num,
                        conds, og_num, order, group, having, proc_param,
                        select_lex, unit);

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_show.cc	2011-08-02 08:34:30 +0000
@@ -4680,16 +4680,16 @@ bool store_schema_params(THD *thd, TABLE
     for (uint i= 0 ; i < params ; i++)
     {
       const char *tmp_buff;
-      sp_variable_t *spvar= spcont->find_variable(i);
+      sp_variable *spvar= spcont->find_variable(i);
       field_def= &spvar->field_def;
       switch (spvar->mode) {
-      case sp_param_in:
+      case sp_variable::MODE_IN:
         tmp_buff= "IN";
         break;
-      case sp_param_out:
+      case sp_variable::MODE_OUT:
         tmp_buff= "OUT";
         break;
-      case sp_param_inout:
+      case sp_variable::MODE_INOUT:
         tmp_buff= "INOUT";
         break;
       default:

=== modified file 'sql/sql_signal.cc'
--- a/sql/sql_signal.cc	2011-07-28 10:54:44 +0000
+++ b/sql/sql_signal.cc	2011-08-02 08:34:30 +0000
@@ -114,7 +114,7 @@ void Sql_cmd_common_signal::eval_default
     /*
       SIGNAL is restricted in sql_yacc.yy to only signal SQLSTATE conditions.
     */
-    DBUG_ASSERT(m_cond->type == sp_cond_type::state);
+    DBUG_ASSERT(m_cond->type == sp_condition_value::state);
     sqlstate= m_cond->sqlstate;
     cond->set_sqlstate(sqlstate);
   }

=== modified file 'sql/sql_signal.h'
--- a/sql/sql_signal.h	2011-07-28 10:54:44 +0000
+++ b/sql/sql_signal.h	2011-08-02 08:34:30 +0000
@@ -28,7 +28,7 @@ protected:
     @param cond the condition signaled if any, or NULL.
     @param set collection of signal condition item assignments.
   */
-  Sql_cmd_common_signal(const sp_cond_type_t *cond,
+  Sql_cmd_common_signal(const sp_condition_value *cond,
                         const Set_signal_information& set)
     : Sql_cmd(),
       m_cond(cond),
@@ -79,7 +79,7 @@ protected:
     The condition to signal or resignal.
     This member is optional and can be NULL (RESIGNAL).
   */
-  const sp_cond_type_t *m_cond;
+  const sp_condition_value *m_cond;
 
   /**
     Collection of 'SET item = value' assignments in the
@@ -99,7 +99,7 @@ public:
     @param cond the SQL condition to signal (required).
     @param set the collection of signal informations to signal.
   */
-  Sql_cmd_signal(const sp_cond_type_t *cond,
+  Sql_cmd_signal(const sp_condition_value *cond,
                  const Set_signal_information& set)
     : Sql_cmd_common_signal(cond, set)
   {}
@@ -126,7 +126,7 @@ public:
     @param cond the SQL condition to resignal (optional, may be NULL).
     @param set the collection of signal informations to resignal.
   */
-  Sql_cmd_resignal(const sp_cond_type_t *cond,
+  Sql_cmd_resignal(const sp_condition_value *cond,
                    const Set_signal_information& set)
     : Sql_cmd_common_signal(cond, set)
   {}

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2011-07-28 10:54:44 +0000
+++ b/sql/sql_yacc.yy	2011-08-02 08:34:30 +0000
@@ -464,7 +464,7 @@ set_system_variable(THD *thd, struct sys
 */
 
 static bool
-set_local_variable(THD *thd, sp_variable_t *spv, Item *val)
+set_local_variable(THD *thd, sp_variable *spv, Item *val)
 {
   Item *it;
   LEX *lex= thd->lex;
@@ -764,7 +764,7 @@ static bool add_create_index (LEX *lex,
   timestamp_type date_time_type;
   st_select_lex *select_lex;
   chooser_compare_func_creator boolfunc2creator;
-  struct sp_cond_type *spcondtype;
+  struct sp_condition_value *spcondvalue;
   struct { int vars, conds, hndlrs, curs; } spblock;
   sp_name *spname;
   LEX *lex;
@@ -1628,7 +1628,7 @@ END_OF_INPUT
 %type <NONE> case_stmt_specification simple_case_stmt searched_case_stmt
 
 %type <num>  sp_decl_idents sp_opt_inout sp_handler_type sp_hcond_list
-%type <spcondtype> sp_cond sp_hcond sqlstate signal_value opt_signal_value
+%type <spcondvalue> sp_cond sp_hcond sqlstate signal_value opt_signal_value
 %type <spblock> sp_decls sp_decl
 %type <lex> sp_cursor_stmt
 %type <spname> sp_name
@@ -2583,9 +2583,9 @@ sp_fdparam:
               my_error(ER_SP_DUP_PARAM, MYF(0), $1.str);
               MYSQL_YYABORT;
             }
-            sp_variable_t *spvar= spc->push_variable(&$1,
-                                                     (enum enum_field_types)$3,
-                                                     sp_param_in);
+            sp_variable *spvar= spc->push_variable(&$1,
+                                                   (enum enum_field_types)$3,
+                                                   sp_variable::MODE_IN);
 
             if (lex->sphead->fill_field_definition(YYTHD, lex,
                                                    (enum enum_field_types) $3,
@@ -2620,9 +2620,9 @@ sp_pdparam:
               my_error(ER_SP_DUP_PARAM, MYF(0), $3.str);
               MYSQL_YYABORT;
             }
-            sp_variable_t *spvar= spc->push_variable(&$3,
-                                                     (enum enum_field_types)$4,
-                                                     (sp_param_mode_t)$1);
+            sp_variable *spvar= spc->push_variable(&$3,
+                                                   (enum enum_field_types)$4,
+                                                   (sp_variable::enum_mode)$1);
 
             if (lex->sphead->fill_field_definition(YYTHD, lex,
                                                    (enum enum_field_types) $4,
@@ -2636,10 +2636,10 @@ sp_pdparam:
         ;
 
 sp_opt_inout:
-          /* Empty */ { $$= sp_param_in; }
-        | IN_SYM      { $$= sp_param_in; }
-        | OUT_SYM     { $$= sp_param_out; }
-        | INOUT_SYM   { $$= sp_param_inout; }
+          /* Empty */ { $$= sp_variable::MODE_IN; }
+        | IN_SYM      { $$= sp_variable::MODE_IN; }
+        | OUT_SYM     { $$= sp_variable::MODE_OUT; }
+        | INOUT_SYM   { $$= sp_variable::MODE_INOUT; }
         ;
 
 sp_proc_stmts:
@@ -2711,7 +2711,7 @@ sp_decl:
             for (uint i = num_vars-$2 ; i < num_vars ; i++)
             {
               uint var_idx= pctx->var_context2runtime(i);
-              sp_variable_t *spvar= pctx->find_variable(var_idx);
+              sp_variable *spvar= pctx->find_variable(var_idx);
             
               if (!spvar)
                 MYSQL_YYABORT;
@@ -2768,7 +2768,7 @@ sp_decl:
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
 
-            lex->spcont= lex->spcont->push_context(LABEL_HANDLER_SCOPE);
+            lex->spcont= lex->spcont->push_context(sp_pcontext::HANDLER_SCOPE);
 
             sp_pcontext *ctx= lex->spcont;
             sp_instr_hpush_jump *i=
@@ -2790,7 +2790,7 @@ sp_decl:
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
             sp_pcontext *ctx= lex->spcont;
-            sp_label_t *hlab= lex->spcont->pop_label(); /* After this hdlr */
+            sp_label *hlab= lex->spcont->pop_label(); /* After this hdlr */
             sp_instr_hreturn *i;
 
             if ($2 == SP_HANDLER_CONTINUE)
@@ -2909,10 +2909,10 @@ sp_cond:
               my_error(ER_WRONG_VALUE, MYF(0), "CONDITION", "0");
               MYSQL_YYABORT;
             }
-            $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
+            $$= (sp_condition_value *)YYTHD->alloc(sizeof(sp_condition_value));
             if ($$ == NULL)
               MYSQL_YYABORT;
-            $$->type= sp_cond_type_t::number;
+            $$->type= sp_condition_value::number;
             $$->mysqlerr= $1;
           }
         | sqlstate
@@ -2926,10 +2926,10 @@ sqlstate:
               my_error(ER_SP_BAD_SQLSTATE, MYF(0), $3.str);
               MYSQL_YYABORT;
             }
-            $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
+            $$= (sp_condition_value *)YYTHD->alloc(sizeof(sp_condition_value));
             if ($$ == NULL)
               MYSQL_YYABORT;
-            $$->type= sp_cond_type_t::state;
+            $$->type= sp_condition_value::state;
             memcpy($$->sqlstate, $3.str, SQLSTATE_LENGTH);
             $$->sqlstate[SQLSTATE_LENGTH]= '\0';
           }
@@ -2956,24 +2956,24 @@ sp_hcond:
           }
         | SQLWARNING_SYM /* SQLSTATEs 01??? */
           {
-            $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
+            $$= (sp_condition_value *)YYTHD->alloc(sizeof(sp_condition_value));
             if ($$ == NULL)
               MYSQL_YYABORT;
-            $$->type= sp_cond_type_t::warning;
+            $$->type= sp_condition_value::warning;
           }
         | not FOUND_SYM /* SQLSTATEs 02??? */
           {
-            $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
+            $$= (sp_condition_value *)YYTHD->alloc(sizeof(sp_condition_value));
             if ($$ == NULL)
               MYSQL_YYABORT;
-            $$->type= sp_cond_type_t::notfound;
+            $$->type= sp_condition_value::notfound;
           }
         | SQLEXCEPTION_SYM /* All other SQLSTATEs */
           {
-            $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
+            $$= (sp_condition_value *)YYTHD->alloc(sizeof(sp_condition_value));
             if ($$ == NULL)
               MYSQL_YYABORT;
-            $$->type= sp_cond_type_t::exception;
+            $$->type= sp_condition_value::exception;
           }
         ;
 
@@ -2996,7 +2996,7 @@ signal_value:
           ident
           {
             LEX *lex= Lex;
-            sp_cond_type_t *cond;
+            sp_condition_value *cond;
             if (lex->spcont == NULL)
             {
               /* SIGNAL foo cannot be used outside of stored programs */
@@ -3009,7 +3009,7 @@ signal_value:
               my_error(ER_SP_COND_MISMATCH, MYF(0), $1.str);
               MYSQL_YYABORT;
             }
-            if (cond->type != sp_cond_type_t::state)
+            if (cond->type != sp_condition_value::state)
             {
               my_error(ER_SIGNAL_BAD_CONDITION_TYPE, MYF(0));
               MYSQL_YYABORT;
@@ -3145,7 +3145,7 @@ sp_decl_idents:
               my_error(ER_SP_DUP_VAR, MYF(0), $1.str);
               MYSQL_YYABORT;
             }
-            spc->push_variable(&$1, (enum_field_types)0, sp_param_in);
+            spc->push_variable(&$1, (enum_field_types)0, sp_variable::MODE_IN);
             $$= 1;
           }
         | sp_decl_idents ',' ident
@@ -3160,7 +3160,7 @@ sp_decl_idents:
               my_error(ER_SP_DUP_VAR, MYF(0), $3.str);
               MYSQL_YYABORT;
             }
-            spc->push_variable(&$3, (enum_field_types)0, sp_param_in);
+            spc->push_variable(&$3, (enum_field_types)0, sp_variable::MODE_IN);
             $$= $1 + 1;
           }
         ;
@@ -3298,7 +3298,7 @@ sp_proc_stmt_leave:
             LEX *lex= Lex;
             sp_head *sp = lex->sphead;
             sp_pcontext *ctx= lex->spcont;
-            sp_label_t *lab= ctx->find_label($2.str);
+            sp_label *lab= ctx->find_label($2.str);
 
             if (! lab)
             {
@@ -3314,11 +3314,11 @@ sp_proc_stmt_leave:
                 When jumping to a BEGIN-END block end, the target jump
                 points to the block hpop/cpop cleanup instructions,
                 so we should exclude the block context here.
-                When jumping to something else (i.e., SP_LAB_ITER),
+                When jumping to something else (i.e., sp_label::ITERATION),
                 there are no hpop/cpop at the jump destination,
                 so we should include the block context here for cleanup.
               */
-              bool exclusive= (lab->type == SP_LAB_BEGIN);
+              bool exclusive= (lab->type == sp_label::BEGIN);
 
               n= ctx->diff_handlers(lab->ctx, exclusive);
               if (n)
@@ -3351,9 +3351,9 @@ sp_proc_stmt_iterate:
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
             sp_pcontext *ctx= lex->spcont;
-            sp_label_t *lab= ctx->find_label($2.str);
+            sp_label *lab= ctx->find_label($2.str);
 
-            if (! lab || lab->type != SP_LAB_ITER)
+            if (! lab || lab->type != sp_label::ITERATION)
             {
               my_error(ER_SP_LILABEL_MISMATCH, MYF(0), "ITERATE", $2.str);
               MYSQL_YYABORT;
@@ -3462,7 +3462,7 @@ sp_fetch_list:
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
             sp_pcontext *spc= lex->spcont;
-            sp_variable_t *spv;
+            sp_variable *spv;
 
             if (!spc || !(spv = spc->find_variable(&$1)))
             {
@@ -3482,7 +3482,7 @@ sp_fetch_list:
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
             sp_pcontext *spc= lex->spcont;
-            sp_variable_t *spv;
+            sp_variable *spv;
 
             if (!spc || !(spv = spc->find_variable(&$3)))
             {
@@ -3669,7 +3669,7 @@ sp_labeled_control:
           {
             LEX *lex= Lex;
             sp_pcontext *ctx= lex->spcont;
-            sp_label_t *lab= ctx->find_label($1.str);
+            sp_label *lab= ctx->find_label($1.str);
 
             if (lab)
             {
@@ -3680,13 +3680,13 @@ sp_labeled_control:
             {
               lab= lex->spcont->push_label($1.str,
                                            lex->sphead->instructions());
-              lab->type= SP_LAB_ITER;
+              lab->type= sp_label::ITERATION;
             }
           }
           sp_unlabeled_control sp_opt_label
           {
             LEX *lex= Lex;
-            sp_label_t *lab= lex->spcont->pop_label();
+            sp_label *lab= lex->spcont->pop_label();
 
             if ($5.str)
             {
@@ -3710,7 +3710,7 @@ sp_labeled_block:
           {
             LEX *lex= Lex;
             sp_pcontext *ctx= lex->spcont;
-            sp_label_t *lab= ctx->find_label($1.str);
+            sp_label *lab= ctx->find_label($1.str);
 
             if (lab)
             {
@@ -3720,12 +3720,12 @@ sp_labeled_block:
 
             lab= lex->spcont->push_label($1.str,
                                          lex->sphead->instructions());
-            lab->type= SP_LAB_BEGIN;
+            lab->type= sp_label::BEGIN;
           }
           sp_block_content sp_opt_label
           {
             LEX *lex= Lex;
-            sp_label_t *lab= lex->spcont->pop_label();
+            sp_label *lab= lex->spcont->pop_label();
 
             if ($5.str)
             {
@@ -3742,8 +3742,8 @@ sp_unlabeled_block:
           { /* Unlabeled blocks get a secret label. */
             LEX *lex= Lex;
             uint ip= lex->sphead->instructions();
-            sp_label_t *lab= lex->spcont->push_label((char *)"", ip);
-            lab->type= SP_LAB_BEGIN;
+            sp_label *lab= lex->spcont->push_label((char *)"", ip);
+            lab->type= sp_label::BEGIN;
           }
           sp_block_content
           {
@@ -3758,7 +3758,7 @@ sp_block_content:
               together. No [[NOT] ATOMIC] yet, and we need to figure out how
               make it coexist with the existing BEGIN COMMIT/ROLLBACK. */
             LEX *lex= Lex;
-            lex->spcont= lex->spcont->push_context(LABEL_DEFAULT_SCOPE);
+            lex->spcont= lex->spcont->push_context(sp_pcontext::REGULAR_SCOPE);
           }
           sp_decls
           sp_proc_stmts
@@ -3794,7 +3794,7 @@ sp_unlabeled_control:
           {
             LEX *lex= Lex;
             uint ip= lex->sphead->instructions();
-            sp_label_t *lab= lex->spcont->last_label();  /* Jumping back */
+            sp_label *lab= lex->spcont->last_label();  /* Jumping back */
             sp_instr_jump *i = new sp_instr_jump(ip, lex->spcont, lab->ip);
             if (i == NULL ||
                 lex->sphead->add_instr(i))
@@ -3822,7 +3822,7 @@ sp_unlabeled_control:
           {
             LEX *lex= Lex;
             uint ip= lex->sphead->instructions();
-            sp_label_t *lab= lex->spcont->last_label();  /* Jumping back */
+            sp_label *lab= lex->spcont->last_label();  /* Jumping back */
             sp_instr_jump *i = new sp_instr_jump(ip, lex->spcont, lab->ip);
             if (i == NULL ||
                 lex->sphead->add_instr(i))
@@ -3835,7 +3835,7 @@ sp_unlabeled_control:
           {
             LEX *lex= Lex;
             uint ip= lex->sphead->instructions();
-            sp_label_t *lab= lex->spcont->last_label();  /* Jumping back */
+            sp_label *lab= lex->spcont->last_label();  /* Jumping back */
             sp_instr_jump_if_not *i = new sp_instr_jump_if_not(ip, lex->spcont,
                                                                $5, lab->ip,
                                                                lex);
@@ -10087,7 +10087,7 @@ limit_option:
           THD *thd= YYTHD;
           LEX *lex= thd->lex;
           Lex_input_stream *lip= & thd->m_parser_state->m_lip;
-          sp_variable_t *spv;
+          sp_variable *spv;
           sp_pcontext *spc = lex->spcont;
           if (spc && (spv = spc->find_variable(&$1)))
           {
@@ -10287,7 +10287,7 @@ select_var_ident:
         | ident_or_text
           {
             LEX *lex=Lex;
-            sp_variable_t *t;
+            sp_variable *t;
 
             if (!lex->spcont || !(t=lex->spcont->find_variable(&$1)))
             {
@@ -12127,7 +12127,7 @@ simple_ident:
             THD *thd= YYTHD;
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
-            sp_variable_t *spv;
+            sp_variable *spv;
             sp_pcontext *spc = lex->spcont;
             if (spc && (spv = spc->find_variable(&$1)))
             {
@@ -13083,7 +13083,7 @@ sys_option_value:
             else
             {
               sp_pcontext *spc= lex->spcont;
-              sp_variable_t *spv= spc->find_variable(name);
+              sp_variable *spv= spc->find_variable(name);
 
               if ($1)
               {
@@ -13231,7 +13231,7 @@ internal_variable_name:
           {
             THD *thd= YYTHD;
             sp_pcontext *spc= thd->lex->spcont;
-            sp_variable_t *spv;
+            sp_variable *spv;
 
             /* Best effort lookup for system variable. */
             if (!spc || !(spv = spc->find_variable(&$1)))

=== modified file 'storage/perfschema/pfs_instr_class.cc'
--- a/storage/perfschema/pfs_instr_class.cc	2011-07-29 09:10:56 +0000
+++ b/storage/perfschema/pfs_instr_class.cc	2011-08-03 15:07:17 +0000
@@ -1223,7 +1223,8 @@ void update_table_share_derived_flags(PF
 
   for ( ; pfs < pfs_last; pfs++)
   {
-    pfs->refresh_setup_object_flags(thread);
+    if (pfs->m_lock.is_populated())
+      pfs->refresh_setup_object_flags(thread);
   }
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5378 branch (marc.alff:3368 to 3370) Marc Alff4 Aug