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

5.5-merge

This commit is contained in:
Sergei Golubchik
2011-07-02 22:08:51 +02:00
3220 changed files with 94894 additions and 422456 deletions

View File

@ -821,7 +821,6 @@ drop trigger t1_bi;
create trigger t1_bi after insert on t1 for each row insert into t3 values (new.id);
execute stmt1;
call p1();
ERROR 42S02: Table 'test.t3' doesn't exist
deallocate prepare stmt1;
drop procedure p1;
drop table t1, t2, t3;
@ -1072,8 +1071,6 @@ SELECT @x;
NULL
SET @x=2;
UPDATE t1 SET i1 = @x;
Warnings:
Warning 1365 Division by 0
SELECT @x;
@x
NULL
@ -1085,9 +1082,6 @@ SELECT @x;
NULL
SET @x=4;
UPDATE t1 SET i1 = @x;
Warnings:
Warning 1365 Division by 0
Warning 1365 Division by 0
SELECT @x;
@x
NULL
@ -1198,8 +1192,6 @@ Warnings:
Warning 1365 Division by 0
create trigger t1_bi before insert on t1 for each row set @a:=1/0|
insert into t1 values(20, 20)|
Warnings:
Warning 1365 Division by 0
drop trigger t1_bi|
create trigger t1_bi before insert on t1 for each row
begin
@ -1218,8 +1210,6 @@ set @a:=1/0;
end|
set @check=0, @t4_bi_called=0, @t4_bu_called=0|
insert into t1 values(30, 30)|
Warnings:
Warning 1365 Division by 0
select @check, @t4_bi_called, @t4_bu_called|
@check @t4_bi_called @t4_bu_called
2 1 1
@ -2063,12 +2053,8 @@ SELECT 1 FROM t1 c WHERE
END//
SET @bug51650 = 1;
INSERT IGNORE INTO t2 VALUES();
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
INSERT IGNORE INTO t1 SET b = '777';
INSERT IGNORE INTO t2 SET a = '111';
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
SET @bug51650 = 1;
INSERT IGNORE INTO t2 SET a = '777';
DROP TRIGGER trg1;
@ -2105,7 +2091,7 @@ CREATE TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERT/*!INTO*/t1 VALUES (1
SHOW TRIGGERS IN db1;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
INSERT INTO t2 VALUES (1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1)' at line 1
ERROR 42000: Trigger 'trg1' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1)' at line 1'
SELECT * FROM t1;
b
# Work around Bug#45235
@ -2150,8 +2136,6 @@ 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;
@ -2169,20 +2153,12 @@ 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;
@ -2205,4 +2181,22 @@ trigger_name
# Clean-up.
drop temporary table t1;
drop table t1;
End of 6.0 tests.
#
# Bug #12362125: SP INOUT HANDLING IS BROKEN FOR TEXT TYPE.
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c TEXT);
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE v TEXT;
SET v = 'aaa';
SET NEW.c = v;
END|
INSERT INTO t1 VALUES('qazwsxedc');
SELECT c FROM t1;
c
aaa
DROP TABLE t1;
End of 5.5 tests.