Syntax error with concat in trigger near signal statement
Test this code:

drop table if EXISTS table_social;
create table table_social (
        sid varchar(250) primary key,
        auth char(32) not null,
        social integer,               -- to be checked by triggers
        female boolean,
        given varchar(250) not null,
        family varchar(250) null,
        photo varchar(1000) null,     -- to be checked by triggers
        place varchar(250) null,
        ip varchar(250) not null,
        uid integer not null references 
            table_users(uid) on delete cascade
);

delimiter //

create trigger social_insert_trigger before insert on table_social
for each row begin
        if new.social &lt; 0 OR new.social &gt; 6 then
                set @message_text = concat('WRONG SOCIAL: ', new.social);
                signal sqlstate '45000'
                set MESSAGE_TEXT = @message_text;
        end if;
        if not (new.photo is null OR new.photo regexp '^https?://') then
                set @message_text = concat('WRONG PHOTO: ', new.photo);
                signal sqlstate '45000' set message_text = @message_text;
        end if;
end
//

create trigger social_update_trigger before update on table_social
for each row begin
        if new.social &lt; 0 OR new.social &gt; 6 then
                set @message_text = concat('WRONG SOCIAL: ', new.social);
                signal sqlstate '45000' 
                set message_text = @message_text;
        end if;
        if not (new.photo is null OR new.photo regexp '^https?://') then
                set @message_text = concat('WRONG PHOTO: ', new.photo);
                signal sqlstate '45000' 
                set message_text = @message_text;
        end if;
end
//


it not understand CONCAT() in SIGNAL SQLSTATE SET message_text