List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:November 11 2010 5:26am
Subject:bzr push into mysql-trunk-bugfixing branch (Dmitry.Shulga:3331 to 3332)
View as plain text  
 3332 Dmitry Shulga	2010-11-11 [merge]
      Auto-merge from mysql-5.5-bugteam.

    modified:
      mysql-test/r/sp-bugs.result
      mysql-test/t/sp-bugs.test
      sql/sp_head.cc
 3331 Mats Kindahl	2010-11-10 [merge]
      Merging with mysql-trunk-bugfixing.

    added:
      mysql-test/suite/binlog/t/binlog_index-master.opt
      mysql-test/suite/rpl/t/rpl_bug33931-master.opt
      mysql-test/suite/rpl/t/rpl_current_user-master.opt
      mysql-test/suite/rpl/t/rpl_heartbeat-master.opt
      mysql-test/suite/rpl/t/rpl_ip_mix-master.opt
      mysql-test/suite/rpl/t/rpl_ip_mix2-master.opt
      mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist-master.opt
    modified:
      cmake/install_layout.cmake
      include/mysql/client_plugin.h
      mysql-test/include/mtr_check.sql
      mysql-test/include/mtr_warnings.sql
      mysql-test/lib/mtr_cases.pm
      mysql-test/mysql-test-run.pl
      mysql-test/r/ctype_utf8.result
      mysql-test/r/log_tables.result
      mysql-test/r/subselect.result
      mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt
      mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt
      mysql-test/suite/perfschema/include/binlog_common.inc
      mysql-test/suite/perfschema/include/cleanup_helper.inc
      mysql-test/suite/perfschema/include/privilege.inc
      mysql-test/suite/perfschema/include/setup_helper.inc
      mysql-test/suite/perfschema/include/start_server_common.inc
      mysql-test/suite/perfschema/include/table_io_cleanup_helper.inc
      mysql-test/suite/perfschema/include/table_io_result_helper.inc
      mysql-test/suite/perfschema/include/table_io_setup_helper.inc
      mysql-test/suite/perfschema/r/aggregate.result
      mysql-test/suite/perfschema/r/binlog_mix.result
      mysql-test/suite/perfschema/r/binlog_row.result
      mysql-test/suite/perfschema/r/binlog_stmt.result
      mysql-test/suite/perfschema/r/checksum.result
      mysql-test/suite/perfschema/r/column_privilege.result
      mysql-test/suite/perfschema/r/csv_table_io.result
      mysql-test/suite/perfschema/r/ddl_cond_instances.result
      mysql-test/suite/perfschema/r/ddl_events_waits_current.result
      mysql-test/suite/perfschema/r/ddl_events_waits_history.result
      mysql-test/suite/perfschema/r/ddl_events_waits_history_long.result
      mysql-test/suite/perfschema/r/ddl_ews_by_instance.result
      mysql-test/suite/perfschema/r/ddl_ews_by_thread_by_event_name.result
      mysql-test/suite/perfschema/r/ddl_ews_global_by_event_name.result
      mysql-test/suite/perfschema/r/ddl_file_instances.result
      mysql-test/suite/perfschema/r/ddl_fs_by_event_name.result
      mysql-test/suite/perfschema/r/ddl_fs_by_instance.result
      mysql-test/suite/perfschema/r/ddl_mutex_instances.result
      mysql-test/suite/perfschema/r/ddl_performance_timers.result
      mysql-test/suite/perfschema/r/ddl_rwlock_instances.result
      mysql-test/suite/perfschema/r/ddl_setup_consumers.result
      mysql-test/suite/perfschema/r/ddl_setup_instruments.result
      mysql-test/suite/perfschema/r/ddl_setup_timers.result
      mysql-test/suite/perfschema/r/ddl_threads.result
      mysql-test/suite/perfschema/r/dml_cond_instances.result
      mysql-test/suite/perfschema/r/dml_events_waits_current.result
      mysql-test/suite/perfschema/r/dml_events_waits_history.result
      mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
      mysql-test/suite/perfschema/r/dml_ews_by_instance.result
      mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
      mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
      mysql-test/suite/perfschema/r/dml_file_instances.result
      mysql-test/suite/perfschema/r/dml_file_summary_by_event_name.result
      mysql-test/suite/perfschema/r/dml_file_summary_by_instance.result
      mysql-test/suite/perfschema/r/dml_mutex_instances.result
      mysql-test/suite/perfschema/r/dml_performance_timers.result
      mysql-test/suite/perfschema/r/dml_rwlock_instances.result
      mysql-test/suite/perfschema/r/dml_setup_consumers.result
      mysql-test/suite/perfschema/r/dml_setup_instruments.result
      mysql-test/suite/perfschema/r/dml_setup_timers.result
      mysql-test/suite/perfschema/r/dml_threads.result
      mysql-test/suite/perfschema/r/func_file_io.result
      mysql-test/suite/perfschema/r/func_mutex.result
      mysql-test/suite/perfschema/r/global_read_lock.result
      mysql-test/suite/perfschema/r/indexed_table_io.result
      mysql-test/suite/perfschema/r/information_schema.result
      mysql-test/suite/perfschema/r/innodb_table_io.result
      mysql-test/suite/perfschema/r/memory_table_io.result
      mysql-test/suite/perfschema/r/merge_table_io.result
      mysql-test/suite/perfschema/r/misc.result
      mysql-test/suite/perfschema/r/multi_table_io.result
      mysql-test/suite/perfschema/r/myisam_file_io.result
      mysql-test/suite/perfschema/r/myisam_table_io.result
      mysql-test/suite/perfschema/r/no_threads.result
      mysql-test/suite/perfschema/r/one_thread_per_con.result
      mysql-test/suite/perfschema/r/part_table_io.result
      mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result
      mysql-test/suite/perfschema/r/privilege.result
      mysql-test/suite/perfschema/r/privilege_table_io.result
      mysql-test/suite/perfschema/r/query_cache.result
      mysql-test/suite/perfschema/r/read_only.result
      mysql-test/suite/perfschema/r/rollback_table_io.result
      mysql-test/suite/perfschema/r/schema.result
      mysql-test/suite/perfschema/r/selects.result
      mysql-test/suite/perfschema/r/server_init.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_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_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_nothing.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/r/tampered_perfschema_table1.result
      mysql-test/suite/perfschema/r/temp_table_io.result
      mysql-test/suite/perfschema/r/trigger_table_io.result
      mysql-test/suite/perfschema/r/view_table_io.result
      mysql-test/suite/perfschema/t/aggregate.test
      mysql-test/suite/perfschema/t/checksum.test
      mysql-test/suite/perfschema/t/column_privilege.test
      mysql-test/suite/perfschema/t/csv_table_io.test
      mysql-test/suite/perfschema/t/ddl_cond_instances.test
      mysql-test/suite/perfschema/t/ddl_events_waits_current.test
      mysql-test/suite/perfschema/t/ddl_events_waits_history.test
      mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test
      mysql-test/suite/perfschema/t/ddl_ews_by_instance.test
      mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test
      mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test
      mysql-test/suite/perfschema/t/ddl_file_instances.test
      mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test
      mysql-test/suite/perfschema/t/ddl_fs_by_instance.test
      mysql-test/suite/perfschema/t/ddl_mutex_instances.test
      mysql-test/suite/perfschema/t/ddl_performance_timers.test
      mysql-test/suite/perfschema/t/ddl_rwlock_instances.test
      mysql-test/suite/perfschema/t/ddl_setup_consumers.test
      mysql-test/suite/perfschema/t/ddl_setup_instruments.test
      mysql-test/suite/perfschema/t/ddl_setup_timers.test
      mysql-test/suite/perfschema/t/ddl_threads.test
      mysql-test/suite/perfschema/t/disabled.def
      mysql-test/suite/perfschema/t/dml_cond_instances.test
      mysql-test/suite/perfschema/t/dml_events_waits_current.test
      mysql-test/suite/perfschema/t/dml_events_waits_history.test
      mysql-test/suite/perfschema/t/dml_events_waits_history_long.test
      mysql-test/suite/perfschema/t/dml_ews_by_instance.test
      mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test
      mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test
      mysql-test/suite/perfschema/t/dml_file_instances.test
      mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test
      mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test
      mysql-test/suite/perfschema/t/dml_mutex_instances.test
      mysql-test/suite/perfschema/t/dml_performance_timers.test
      mysql-test/suite/perfschema/t/dml_rwlock_instances.test
      mysql-test/suite/perfschema/t/dml_setup_consumers.test
      mysql-test/suite/perfschema/t/dml_setup_instruments.test
      mysql-test/suite/perfschema/t/dml_setup_timers.test
      mysql-test/suite/perfschema/t/dml_threads.test
      mysql-test/suite/perfschema/t/func_file_io.test
      mysql-test/suite/perfschema/t/func_mutex.test
      mysql-test/suite/perfschema/t/global_read_lock.test
      mysql-test/suite/perfschema/t/indexed_table_io.test
      mysql-test/suite/perfschema/t/information_schema.test
      mysql-test/suite/perfschema/t/innodb_table_io.test
      mysql-test/suite/perfschema/t/memory_table_io.test
      mysql-test/suite/perfschema/t/merge_table_io.test
      mysql-test/suite/perfschema/t/misc.test
      mysql-test/suite/perfschema/t/multi_table_io.test
      mysql-test/suite/perfschema/t/myisam_file_io.test
      mysql-test/suite/perfschema/t/myisam_table_io.test
      mysql-test/suite/perfschema/t/no_threads.test
      mysql-test/suite/perfschema/t/one_thread_per_con.test
      mysql-test/suite/perfschema/t/part_table_io.test
      mysql-test/suite/perfschema/t/privilege.test
      mysql-test/suite/perfschema/t/privilege_table_io.test
      mysql-test/suite/perfschema/t/query_cache.test
      mysql-test/suite/perfschema/t/read_only.test
      mysql-test/suite/perfschema/t/rollback_table_io.test
      mysql-test/suite/perfschema/t/schema.test
      mysql-test/suite/perfschema/t/selects.test
      mysql-test/suite/perfschema/t/server_init.test
      mysql-test/suite/perfschema/t/start_server_no_cond_class.test
      mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
      mysql-test/suite/perfschema/t/start_server_no_file_class.test
      mysql-test/suite/perfschema/t/start_server_no_file_inst.test
      mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
      mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
      mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
      mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
      mysql-test/suite/perfschema/t/start_server_no_thread_class.test
      mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
      mysql-test/suite/perfschema/t/start_server_nothing.test
      mysql-test/suite/perfschema/t/tampered_perfschema_table1.test
      mysql-test/suite/perfschema/t/temp_table_io.test
      mysql-test/suite/perfschema/t/thread_cache.test
      mysql-test/suite/perfschema/t/trigger_table_io.test
      mysql-test/suite/perfschema/t/view_table_io.test
      mysql-test/suite/rpl/r/rpl000017.result
      mysql-test/suite/rpl/r/rpl_ignore_table.result
      mysql-test/suite/rpl/r/rpl_slave_status.result
      mysql-test/suite/rpl/t/rpl000017.test
      mysql-test/suite/rpl/t/rpl_cross_version-master.opt
      mysql-test/suite/rpl/t/rpl_ignore_table.test
      mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh
      mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh
      mysql-test/suite/rpl/t/rpl_semi_sync-master.opt
      mysql-test/suite/rpl/t/rpl_slave_status.test
      mysql-test/suite/rpl/t/rpl_sync.test
      mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt
      mysql-test/t/ctype_utf8.test
      mysql-test/t/key_cache-master.opt
      mysql-test/t/log_tables.test
      mysql-test/t/mysqlbinlog-master.opt
      mysql-test/t/subselect.test
      mysql-test/t/union.test
      mysys/stacktrace.c
      scripts/mysql_system_tables.sql
      sql-common/client.c
      sql/item_func.cc
      sql/mysqld.cc
      sql/sql_rename.cc
      sql/sql_union.cc
      storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_events_waits_summary.cc
      storage/perfschema/table_ews_global_by_event_name.cc
      storage/perfschema/table_file_instances.cc
      storage/perfschema/table_file_summary.cc
      storage/perfschema/table_performance_timers.cc
      storage/perfschema/table_setup_consumers.cc
      storage/perfschema/table_setup_instruments.cc
      storage/perfschema/table_setup_timers.cc
      storage/perfschema/table_sync_instances.cc
      storage/perfschema/table_threads.cc
      storage/perfschema/table_threads.h
=== modified file 'mysql-test/r/sp-bugs.result'
--- a/mysql-test/r/sp-bugs.result	2010-07-30 15:28:36 +0000
+++ b/mysql-test/r/sp-bugs.result	2010-11-11 05:06:16 +0000
@@ -75,4 +75,40 @@ CALL p1 ();
 ERROR HY000: Trigger does not exist
 DROP TABLE t1;
 DROP PROCEDURE p1;
+#
+# Bug#54375: Error in stored procedure leaves connection
+# in different default schema
+#
+SET @@SQL_MODE = 'STRICT_ALL_TABLES';
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (c1 int NOT NULL PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+CREATE FUNCTION f1 (
+some_value int
+)
+RETURNS smallint
+DETERMINISTIC
+BEGIN
+INSERT INTO t1 SET c1 = some_value;
+RETURN(LAST_INSERT_ID());
+END$$
+DROP DATABASE IF EXISTS db2;
+CREATE DATABASE db2;
+USE db2;
+SELECT DATABASE();
+DATABASE()
+db2
+SELECT db1.f1(1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT DATABASE();
+DATABASE()
+db2
+USE test;
+DROP FUNCTION db1.f1;
+DROP TABLE db1.t1;
+DROP DATABASE db1;
+DROP DATABASE db2;
 End of 5.1 tests

=== modified file 'mysql-test/t/sp-bugs.test'
--- a/mysql-test/t/sp-bugs.test	2010-02-13 10:35:14 +0000
+++ b/mysql-test/t/sp-bugs.test	2010-11-11 04:52:51 +0000
@@ -101,4 +101,41 @@ CALL p1 ();
 DROP TABLE t1;
 DROP PROCEDURE p1;
 
+--echo #
+--echo # Bug#54375: Error in stored procedure leaves connection
+--echo # in different default schema
+--echo #
+
+--disable_warnings
+SET @@SQL_MODE = 'STRICT_ALL_TABLES';
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (c1 int NOT NULL PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+DELIMITER $$;
+CREATE FUNCTION f1 (
+	some_value int
+)
+RETURNS smallint
+DETERMINISTIC
+BEGIN
+	INSERT INTO t1 SET c1 = some_value;
+        RETURN(LAST_INSERT_ID());
+END$$
+DELIMITER ;$$
+DROP DATABASE IF EXISTS db2;
+CREATE DATABASE db2;
+--enable_warnings
+USE db2;
+SELECT DATABASE();
+--error ER_DUP_ENTRY
+SELECT db1.f1(1);
+SELECT DATABASE();
+USE test;
+DROP FUNCTION db1.f1;
+DROP TABLE db1.t1;
+DROP DATABASE db1;
+DROP DATABASE db2;
 --echo End of 5.1 tests

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2010-10-27 07:48:44 +0000
+++ b/sql/sp_head.cc	2010-11-11 05:10:48 +0000
@@ -1510,7 +1510,7 @@ sp_head::execute(THD *thd, bool merge_da
     If the DB has changed, the pointer has changed too, but the
     original thd->db will then have been freed
   */
-  if (cur_db_changed && !thd->killed)
+  if (cur_db_changed && thd->killed != THD::KILL_CONNECTION)
   {
     /*
       Force switching back to the saved current database, because it may be


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20101111051048-bz6uzx31hkki6q3q.bundle
Thread
bzr push into mysql-trunk-bugfixing branch (Dmitry.Shulga:3331 to 3332) Dmitry Shulga11 Nov