mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Fix for bug #5887 "Triggers with string literals cause errors"
Fixed small error in new .FRM parser which caused it to handle improperly escaped strings.
This commit is contained in:
parent
ffc8bd5986
commit
80d2d8d662
3 changed files with 20 additions and 0 deletions
|
@ -169,3 +169,8 @@ create temporary table t1 (i int);
|
|||
create trigger trg before insert on t1 for each row set @a:=1;
|
||||
ERROR HY000: Trigger's 't1' is view or temporary table
|
||||
drop table t1;
|
||||
create table t1 (x1col char);
|
||||
create trigger tx1 before insert on t1 for each row set new.x1col = 'x';
|
||||
insert into t1 values ('y');
|
||||
drop trigger t1.tx1;
|
||||
drop table t1;
|
||||
|
|
|
@ -193,3 +193,17 @@ create temporary table t1 (i int);
|
|||
--error 1361
|
||||
create trigger trg before insert on t1 for each row set @a:=1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Tests for various trigger-related bugs
|
||||
#
|
||||
|
||||
# Test for bug #5887 "Triggers with string literals cause errors".
|
||||
# New .FRM parser was not handling escaped strings properly.
|
||||
create table t1 (x1col char);
|
||||
create trigger tx1 before insert on t1 for each row set new.x1col = 'x';
|
||||
insert into t1 values ('y');
|
||||
drop trigger t1.tx1;
|
||||
drop table t1;
|
||||
|
|
|
@ -502,6 +502,7 @@ read_escaped_string(char *ptr, char *eol, LEX_STRING *str)
|
|||
break;
|
||||
case '\'':
|
||||
*write_pos= '\'';
|
||||
break;
|
||||
default:
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue