1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Manual merge of mysql-trunk into mysql-trunk-merge.

Conflicts:

Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/Makefile.am
Text conflict in mysql-test/collections/default.daily
Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test
Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
Text conflict in mysys/charset.c
Text conflict in sql/field.cc
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_func.cc
Text conflict in sql/log.cc
Text conflict in sql/log_event.cc
Text conflict in sql/log_event_old.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/rpl_utility.cc
Text conflict in sql/rpl_utility.h
Text conflict in sql/set_var.cc
Text conflict in sql/share/Makefile.am
Text conflict in sql/sql_delete.cc
Text conflict in sql/sql_plugin.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_table.cc
Text conflict in storage/example/ha_example.h
Text conflict in storage/federated/ha_federated.cc
Text conflict in storage/myisammrg/ha_myisammrg.cc
Text conflict in storage/myisammrg/myrg_open.c
This commit is contained in:
Alexey Kopytov
2010-03-24 18:03:44 +03:00
2460 changed files with 596951 additions and 233067 deletions

View File

@ -2455,3 +2455,92 @@ DELETE FROM t1;
DROP TABLE t1;
DROP TEMPORARY TABLE t2;
#
# Bug#36649: Condition area is not properly cleaned up after stored routine invocation
#
--disable_warnings
DROP TRIGGER IF EXISTS trg1;
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (a INT);
delimiter |;
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE a CHAR;
SELECT 'ab' INTO a;
SELECT 'ab' INTO a;
SELECT 'a' INTO a;
END|
delimiter ;|
INSERT INTO t1 VALUES (1);
DROP TRIGGER trg1;
DROP TABLE t1;
#
# Successive trigger actuations
#
--disable_warnings
DROP TRIGGER IF EXISTS trg1;
DROP TRIGGER IF EXISTS trg2;
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (a INT);
delimiter |;
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE trg1 CHAR;
SELECT 'ab' INTO trg1;
END|
CREATE TRIGGER trg2 AFTER INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE trg2 CHAR;
SELECT 'ab' INTO trg2;
END|
delimiter ;|
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;
SHOW WARNINGS;
INSERT INTO t1 VALUES (1),(2);
DROP TRIGGER trg1;
DROP TRIGGER trg2;
DROP TABLE t1;
--echo #
--echo # Bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive
--echo # on TRIGGER + TEMP table".
--echo #
--disable_warnings
drop trigger if exists t1_bi;
drop temporary table if exists t1;
drop table if exists t1;
--enable_warnings
create table t1 (i int);
create trigger t1_bi before insert on t1 for each row set @a:=1;
--echo # Create temporary table which shadows base table with trigger.
create temporary table t1 (j int);
--echo # Dropping of trigger should succeed.
drop trigger t1_bi;
select trigger_name from information_schema.triggers
where event_object_schema = 'test' and event_object_table = 't1';
--echo # Clean-up.
drop temporary table t1;
drop table t1;
--echo End of 6.0 tests.