List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:November 10 2011 1:01pm
Subject:bzr push into mysql-trunk branch (Dmitry.Shulga:3510 to 3511)
View as plain text  
 3511 Dmitry Shulga	2011-11-10
      Added some test cases for WL4179.

    modified:
      mysql-test/t/wl4179.test
 3510 Alexander Nozdrin	2011-11-07 [merge]
      Auto-merge from mysql-trunk.

    removed:
      BUILD/compile-alpha-debug
      BUILD/compile-darwin-mwcc
      BUILD/compile-irix-mips64-mipspro
      BUILD/compile-pentium-icc
      BUILD/compile-pentium-icc-valgrind-max
      BUILD/compile-pentium-icc-yassl
      BUILD/compile-pentium-pgcc
      mysys/my_new.cc
    added:
      include/mysql/psi/psi_abi_v0.h
      include/mysql/psi/psi_abi_v0.h.pp
      include/mysql_com_server.h
      mysql-test/suite/perfschema/r/nesting.result
      mysql-test/suite/perfschema/t/nesting.test
      mysys/my_isnan.c
      unittest/gunit/stdcxx-t.cc
    renamed:
      mysys/psi_noop.cc => mysys/psi_noop.c
      sql/udf_example.c => sql/udf_example.cc
    modified:
      BUILD/SETUP.sh
      BUILD/build_mccge.sh
      BUILD/compile-dist
      BUILD/compile-solaris-amd64
      BUILD/compile-solaris-amd64-forte
      BUILD/compile-solaris-amd64-forte-debug
      BUILD/compile-solaris-sparc
      BUILD/compile-solaris-sparc-debug
      BUILD/compile-solaris-sparc-forte
      BUILD/compile-solaris-sparc-purify
      VERSION
      client/CMakeLists.txt
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqlbinlog.cc
      client/mysqldump.c
      client/mysqltest.cc
      client/sql_string.cc
      cmake/abi_check.cmake
      cmake/build_configurations/mysql_release.cmake
      cmake/configure.pl
      cmake/info_macros.cmake.in
      cmake/os/Windows.cmake
      cmake/readline.cmake
      config.h.cmake
      configure.cmake
      dbug/dbug.c
      include/CMakeLists.txt
      include/m_string.h
      include/my_global.h
      include/my_pthread.h
      include/mysql.h
      include/mysql.h.pp
      include/mysql/psi/mysql_idle.h
      include/mysql/psi/mysql_thread.h
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      include/mysql_com.h
      include/waiting_threads.h
      libmysql/libmysql.c
      libmysqld/lib_sql.cc
      mysql-test/collections/default.experimental
      mysql-test/include/join_cache.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/case.result
      mysql-test/r/join_cache_bka.result
      mysql-test/r/join_cache_bka_nixbnl.result
      mysql-test/r/join_cache_bkaunique.result
      mysql-test/r/join_cache_bnl.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/query_cache.result
      mysql-test/r/udf.result
      mysql-test/suite/funcs_1/t/storedproc.test
      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_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/r/event_aggregate_no_h.result
      mysql-test/suite/perfschema/r/event_aggregate_no_u.result
      mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
      mysql-test/suite/perfschema/r/ortho_iter.result
      mysql-test/suite/perfschema/r/privilege_table_io.result
      mysql-test/suite/perfschema/r/start_server_innodb.result
      mysql-test/suite/perfschema/r/start_server_no_account.result
      mysql-test/suite/perfschema/r/start_server_no_cond_class.result
      mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
      mysql-test/suite/perfschema/r/start_server_no_file_class.result
      mysql-test/suite/perfschema/r/start_server_no_file_inst.result
      mysql-test/suite/perfschema/r/start_server_no_host.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_socket_class.result
      mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
      mysql-test/suite/perfschema/r/start_server_no_stage_class.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
      mysql-test/suite/perfschema/r/start_server_no_table_inst.result
      mysql-test/suite/perfschema/r/start_server_no_thread_class.result
      mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
      mysql-test/suite/perfschema/r/start_server_no_user.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.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/socket_instances_func.test
      mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      mysql-test/suite/rpl/t/rpl_temporary.test
      mysql-test/t/case.test
      mysql-test/t/csv.test
      mysql-test/t/disabled.def
      mysql-test/t/information_schema_parameters.test
      mysql-test/t/information_schema_routines.test
      mysql-test/t/lock.test
      mysql-test/t/mysql_plugin.test
      mysql-test/t/mysqlbinlog2.test
      mysql-test/t/ps.test
      mysql-test/t/ps_ddl.test
      mysql-test/t/query_cache.test
      mysql-test/t/sp-error.test
      mysql-test/t/sp.test
      mysql-test/t/trigger.test
      mysql-test/t/udf.test
      mysql-test/t/view_grant.test
      mysql-test/valgrind.supp
      mysys/CMakeLists.txt
      mysys/array.c
      mysys/default.c
      mysys/lf_alloc-pin.c
      mysys/lf_dynarray.c
      mysys/mf_format.c
      mysys/mf_iocache.c
      mysys/my_alloc.c
      mysys/my_bitmap.c
      mysys/my_compare.c
      mysys/my_compress.c
      mysys/my_file.c
      mysys/stacktrace.c
      mysys/waiting_threads.c
      sql-common/client.c
      sql-common/client_plugin.c
      sql-common/my_time.c
      sql/CMakeLists.txt
      sql/binlog.cc
      sql/debug_sync.cc
      sql/field.cc
      sql/field.h
      sql/field_conv.cc
      sql/filesort.cc
      sql/ha_partition.cc
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/item_buff.cc
      sql/item_cmpfunc.cc
      sql/item_func.cc
      sql/item_func.h
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/item_sum.cc
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/key.cc
      sql/log.cc
      sql/log_event.cc
      sql/log_event.h
      sql/log_event_old.cc
      sql/mdl.cc
      sql/mdl.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/net_serv.cc
      sql/opt_range.cc
      sql/opt_range.h
      sql/opt_trace.cc
      sql/opt_trace.h
      sql/protocol.cc
      sql/rpl_mi.cc
      sql/rpl_record.cc
      sql/rpl_rli.cc
      sql/rpl_slave.cc
      sql/rpl_utility.cc
      sql/rpl_utility.h
      sql/set_var.cc
      sql/set_var.h
      sql/sp_head.cc
      sql/spatial.h
      sql/sql_acl.cc
      sql/sql_analyse.cc
      sql/sql_cache.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_client.cc
      sql/sql_connect.cc
      sql/sql_const.h
      sql/sql_error.cc
      sql/sql_join_cache.cc
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_plugin.cc
      sql/sql_plugin.h
      sql/sql_prepare.cc
      sql/sql_profile.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_string.cc
      sql/sql_table.cc
      sql/sql_table.h
      sql/sql_yacc.yy
      sql/sys_vars.cc
      sql/thr_malloc.cc
      sql/tztime.cc
      sql/udf_example.def
      sql/unireg.cc
      storage/csv/ha_tina.cc
      storage/federated/ha_federated.cc
      storage/heap/hp_create.c
      storage/heap/hp_static.c
      storage/heap/hp_test2.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/sync/sync0rw.c
      storage/myisam/ha_myisam.cc
      storage/myisam/mi_cache.c
      storage/myisam/mi_check.c
      storage/myisam/mi_create.c
      storage/myisam/mi_dynrec.c
      storage/myisam/mi_extra.c
      storage/myisam/mi_open.c
      storage/myisam/mi_packrec.c
      storage/myisam/mi_static.c
      storage/myisam/myisamlog.c
      storage/myisam/myisampack.c
      storage/myisam/rt_mbr.c
      storage/myisam/sort.c
      storage/myisammrg/ha_myisammrg.cc
      storage/perfschema/pfs.cc
      strings/ctype-big5.c
      strings/ctype-bin.c
      strings/ctype-gbk.c
      strings/ctype-mb.c
      strings/ctype-simple.c
      strings/ctype-tis620.c
      strings/ctype-uca.c
      strings/ctype-ucs2.c
      strings/ctype-utf8.c
      strings/ctype.c
      strings/decimal.c
      strings/dtoa.c
      strings/my_vsnprintf.c
      support-files/mysql.spec.sh
      tests/mysql_client_test.c
      unittest/gunit/CMakeLists.txt
      unittest/gunit/gunit_test_main.cc
      unittest/gunit/item-t.cc
      unittest/mysys/lf-t.c
      unittest/mysys/my_atomic-t.c
      unittest/mysys/thr_template.c
      unittest/mysys/waiting_threads-t.c
      vio/viosocket.c
      win/create_def_file.js
      mysys/psi_noop.c
      sql/udf_example.cc
=== modified file 'mysql-test/t/wl4179.test'
--- a/mysql-test/t/wl4179.test	2011-11-01 12:46:20 +0000
+++ b/mysql-test/t/wl4179.test	2011-11-10 13:00:35 +0000
@@ -264,3 +264,404 @@ CALL p1('b', 321);
 
 DROP PROCEDURE p1;
 DROP TEMPORARY TABLE t1;
+
+--echo #
+--echo # WL#4179: Stored programs: validation of stored program statements.
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP FUNCTION IF EXISTS f1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+delimiter |;
+
+CREATE PROCEDURE p1()
+BEGIN
+  SELECT * FROM t1;
+END;
+|
+
+delimiter ;|
+
+CALL p1();
+
+--echo # Test if added column into table is recognized correctly
+--echo # in a stored procedure.
+ALTER TABLE t1 ADD COLUMN (b INT);
+CALL p1();
+
+--echo # Test if dropped column is not appeared in SELECT query
+--echo # executed inside a stored procedure.
+ALTER TABLE t1 DROP COLUMN a;
+CALL p1();
+
+DROP TABLE t1;
+DROP PROCEDURE p1;
+
+--echo # Test if table's recreation is handled correctly
+--echo # inside a call of stored procedure. 
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+delimiter |;
+
+CREATE PROCEDURE p1()
+BEGIN
+  SELECT * FROM t1;
+END;
+|
+
+delimiter ;|
+
+CALL p1();
+
+--echo # Recreate table t1 with another set of columns and
+--echo # re-call a stored procedure.
+DROP TABLE t1;
+CREATE TABLE t1 (b VARCHAR(10), c VARCHAR(10));
+INSERT INTO t1 VALUES ('1', '2'), ('3', '4');
+
+CALL p1();
+
+--echo # Test procedure behaviour after view recreation.
+DROP TABLE t1;
+DROP PROCEDURE p1;
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+delimiter |;
+CREATE PROCEDURE p1()
+BEGIN
+  SELECT * FROM v1;
+END;
+|
+
+delimiter ;|
+CALL p1();
+
+--echo # Alter underlying table and recreate the view.
+ALTER TABLE t1 ADD COLUMN (b INT);
+ALTER VIEW v1 AS SELECT * FROM t1;
+
+--echo # And check whether the call of stored procedure handles it correctly.
+CALL p1();
+
+DROP VIEW v1;
+DROP TABLE t1;
+DROP PROCEDURE p1;
+
+--echo # Test if metadata changes for temporary table is handled
+--echo # correctly inside a stored procedure.
+CREATE TEMPORARY TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+delimiter |;
+CREATE PROCEDURE p1()
+BEGIN
+  SELECT * FROM t1;
+END;
+|
+
+delimiter ;|
+
+CALL p1();
+
+--echo # Test if added temporary table's column is recognized during
+--echo # procedure invocation.
+ALTER TABLE t1 ADD COLUMN (b INT);
+CALL p1();
+
+--echo # Test if dropped temporary table's column is not appeared
+--echo # in procedure's result.
+ALTER TABLE t1 DROP COLUMN a;
+CALL p1();
+
+DROP PROCEDURE p1;
+DROP TABLE t1;
+
+--echo # Test handle of metadata changes with stored function.
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+delimiter |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+  CREATE TEMPORARY TABLE t1_result_set AS SELECT * FROM t1;
+
+  RETURN 0;
+END;
+|
+delimiter ;|
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+--echo # Check if added column is noticed by invocation of stored function.
+ALTER TABLE t1 ADD COLUMN (b INT);
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+--echo Check if dropped column is noticed by invocation of stored function.
+ALTER TABLE t1 DROP COLUMN a;
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+
+--echo # Test if table's recreation is handled correctly
+--echo # inside a stored function. 
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+delimiter |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+  CREATE TEMPORARY TABLE t1_result_set AS SELECT * FROM t1;
+
+  RETURN 0;
+END;
+|
+delimiter ;|
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+--echo # Recreate table and check if it is handled correctly
+--echo # by function invocation.
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+DROP FUNCTION f1;
+DROP TABLE t1;
+
+--echo # Test if changes in the view's metadata is handled
+--echo # correctly by function call.
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+delimiter |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+  CREATE TEMPORARY TABLE t1_result_set AS SELECT * FROM v1;
+  RETURN 0;
+END;
+|
+
+delimiter ;|
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+ALTER TABLE t1 ADD COLUMN (b INT);
+ALTER VIEW v1 AS SELECT * FROM t1;
+
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+DROP TABLE t1;
+DROP VIEW v1;
+
+DROP FUNCTION f1;
+
+--echo # Check if queried object's type substitution (table->view, view->table,
+--echo # table->temp table, etc.) is handled correctly during invocation of
+--echo # stored function/procedure.
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+delimiter |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+  CREATE TEMPORARY TABLE t1_result_set AS SELECT * FROM t1;
+  RETURN 0;
+END;
+|
+
+CREATE PROCEDURE p1()
+BEGIN
+  SELECT * FROM t1;
+END;
+|
+
+delimiter ;|
+
+CALL p1();
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+CALL p1;
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 VALUES (1), (2);
+CREATE VIEW t1 AS SELECT * FROM t2;
+
+CALL p1;
+SELECT f1();
+SELECT * FROM t1_result_set;
+DROP TABLE t1_result_set;
+
+DROP TABLE t2;
+DROP VIEW t1;
+
+DROP FUNCTION f1;
+DROP PROCEDURE p1;
+
+--echo # Test handle of metadata changes with triggers.
+ 
+CREATE TABLE t1 (a INT);
+--disable_warnings
+DROP TRIGGER IF EXISTS trg1;
+--enable_warnings
+
+delimiter |;
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+  SET new.a = new.a + 100;
+END;
+|
+
+delimiter ;|
+
+INSERT INTO t1 VALUES (1), (2);
+SELECT * FROM t1;
+
+--echo # Check if added table's column is handled correctly inside trigger.
+ALTER TABLE t1 ADD COLUMN (b INT);
+INSERT INTO t1 VALUES (3, 4);
+
+SELECT * FROM t1;
+
+DROP TRIGGER trg1;
+DROP TABLE t1;
+
+--echo # Test if deleted column is handled correctly by trigger invocation.
+CREATE TABLE t1 (a INT, b INT);
+
+delimiter |;
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+  SET new.a = new.a + 100;
+END;
+|
+
+delimiter ;|
+
+INSERT INTO t1 VALUES (1, 2), (3, 4);
+SELECT * FROM t1;
+
+ALTER TABLE t1 DROP COLUMN b;
+
+INSERT INTO t1 VALUES (5);
+SELECT * FROM t1;
+
+DROP TRIGGER trg1;
+DROP TABLE t1;
+
+--echo # Check if server returns and error when was dropped a column
+--echo # that is used inside a trigger body.
+CREATE TABLE t1 (a INT, b INT);
+
+delimiter |;
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+  SET new.a = new.a + 100;
+END;
+|
+
+delimiter ;|
+
+INSERT INTO t1 VALUES (1, 2), (3, 4);
+SELECT * FROM t1;
+
+ALTER TABLE t1 DROP COLUMN a;
+
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t1 VALUES (5);
+
+DROP TRIGGER trg1;
+DROP TABLE t1;
+
+--echo # Test handle of metadata changes with events.
+DROP TABLE IF EXISTS t3;
+CREATE TABLE t1 (a INT, b INT);
+CREATE TABLE t2 (a INT, b INT);
+CREATE TABLE t3 (a INT);
+--disable_warnings
+DROP EVENT IF EXISTS e1;
+--enable_warnings
+INSERT INTO t1 VALUES (1, 2);
+
+SET GLOBAL EVENT_SCHEDULER=ON;
+
+SELECT GET_LOCK('e1_lock', 60);
+
+delimiter |;
+
+CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND STARTS NOW() DO
+BEGIN
+  DECLARE EXIT HANDLER FOR 1136 BEGIN
+    INSERT INTO t3 VALUES (1);
+  END; -- ER_WRONG_VALUE_COUNT_ON_ROW
+
+  SELECT GET_LOCK('e1_lock', 60);
+  SELECT RELEASE_LOCK('e1_lock');
+
+  INSERT INTO t2 SELECT * FROM t1;
+END;
+|
+
+delimiter ;|
+
+SELECT RELEASE_LOCK('e1_lock');
+
+let $wait_condition=SELECT COUNT(*) = 3 FROM t2;
+--source include/wait_condition.inc
+
+SELECT GET_LOCK('e1_lock', 60);
+
+ALTER TABLE t1 ADD COLUMN (c INT);
+
+SELECT RELEASE_LOCK('e1_lock');
+
+--sleep 2
+--echo #Check if there isn't rows in the table t3.
+--echo #When the table t3 is not empty then error occured during
+--echo #the event exectuon. 
+SELECT COUNT(*) FROM t3;
+
+DROP EVENT e1;
+DROP TABLE t1, t2, t3;
+
+SET GLOBAL EVENT_SCHEDULER=OFF;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (Dmitry.Shulga:3510 to 3511) Dmitry Shulga11 Nov