mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -2139,3 +2139,70 @@ s1
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
DROP TEMPORARY TABLE t2;
|
||||
DROP TRIGGER IF EXISTS trg1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a INT);
|
||||
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|
|
||||
INSERT INTO t1 VALUES (1);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
DROP TRIGGER trg1;
|
||||
DROP TABLE t1;
|
||||
DROP TRIGGER IF EXISTS trg1;
|
||||
DROP TRIGGER IF EXISTS trg2;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a INT);
|
||||
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|
|
||||
INSERT INTO t1 VALUES (0);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'trg1' at row 1
|
||||
Warning 1265 Data truncated for column 'trg2' at row 1
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
0
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'trg1' at row 1
|
||||
Warning 1265 Data truncated for column 'trg2' at row 1
|
||||
Warning 1265 Data truncated for column 'trg1' at row 1
|
||||
Warning 1265 Data truncated for column 'trg2' at row 1
|
||||
DROP TRIGGER trg1;
|
||||
DROP TRIGGER trg2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive
|
||||
# on TRIGGER + TEMP table".
|
||||
#
|
||||
drop trigger if exists t1_bi;
|
||||
drop temporary table if exists t1;
|
||||
drop table if exists t1;
|
||||
create table t1 (i int);
|
||||
create trigger t1_bi before insert on t1 for each row set @a:=1;
|
||||
# Create temporary table which shadows base table with trigger.
|
||||
create temporary table t1 (j int);
|
||||
# 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';
|
||||
trigger_name
|
||||
# Clean-up.
|
||||
drop temporary table t1;
|
||||
drop table t1;
|
||||
End of 6.0 tests.
|
||||
|
Reference in New Issue
Block a user