show triggers;可以看到这个触发器,但是drop trigger xx
出现ERROR 1360 (HY000): Trigger does not exist这是为什么??????????????????
出现ERROR 1360 (HY000): Trigger does not exist这是为什么??????????????????
解决方案 »
- mysql错误
- mysql自动增长字段auto_increment 如何设置增长的长度,语句应该怎样写?
- mysql 5.1事务处理问题
- mysql 5.1 以上版本在哪里下载
- mysql异步备份的问题,MASTER_HOST可否指定多个?
- MySQL4.0.16导出的文件,导入到另一台同版本数据库就导不进去了!!!
- 简单的送分题
- windows下的mysql移植linux上出错的问题
- 系统服务程序不能连接mysql
- mysql 提示 fails to start the services,please wait 30 seconds to try again?是什么问题
- 索引外键问题
- mysql 命令行下 显示 中文字符 问题 和 关于数据库 2个 笔试题( 在线等待!)
show triggers;
drop trigger xx; 的代码。
+-------------------+--------+----------------+---------------------------------
-------------------------------------------------------------------------+------
--+---------+----------+----------------+
| Trigger | Event | Table | Statement | Timing | Created | sql_mode | Definer
|
+-------------------+--------+----------------+---------------------------------
-------------------------------------------------------------------------+------
--+---------+----------+----------------+
| Insert_vip | INSERT | cdb_creditslog | Begin
set @groupterms=(SELECT groupterms FROM discuz.cdb_memberfields where uid=new.
uid);
set @groupexpiry=(SELECT groupexpiry FROM discuz.cdb_members where uid=new.uid
);
set @groupid=(SELECT groupid FROM discuz.cdb_members where uid=new.uid); if new.receive=980 or new.receive=1000 or new.receive=1490 then
if new.receive=980 then set @id=27; end if;
if new.receive=1000 then set @id=22; end if;
if new.receive=1490 then set @id=26; end if;
update cdb_members set extgroupids=(case when LENGTH(extgroupids)=0 then @id
else concat(@id,' ',extgroupids) end),extcredits2=extcredits2-new.receive
where uid=new.uid; set @expiry=UNIX_TIMESTAMP(DATE_ADD(now(),INTERVAL 1 YEAR)); if LENGTH(@groupterms)>1 then
set @terms=REPLACE(@groupterms,'}}',concat('i:',@id,';i:',@expiry,';}}')); set @t=SUBSTRING(@terms,locate('s:3:"ext";a:',@terms)+12,5);
set @t=SUBSTRING(@t,1,locate(':',@t)-1);
set @tt=@t+1;
set @terms=replace(@terms,concat('s:3:"ext";a:',@t),concat('s:3:"ext";a:',
@tt));
else
set @terms=concat('a:1:{s:3:"ext";a:1:{i:',@id,';i:',@expiry,';}}');
end if;
update cdb_memberfields set groupterms=@terms where uid=new.uid;
end if; if new.receive=299 then
set @id=24;
set @expiry=UNIX_TIMESTAMP(DATE_ADD(now(),INTERVAL 1 MONTH));
update cdb_members set groupid=@id,groupexpiry=@expiry,extcredits2=extcredit
s2-new.receive where uid=new.uid; if LENGTH(@groupterms)>1 then
if LOCATE('a:2:{s:4:',@groupterms)>0 then
set @terms=REPLACE(@groupterms,concat('s:4:"time";i:',@groupexpiry),conc
at('s:4:"time";i:',@expiry));
set @terms=REPLACE(@terms,concat('i:',@groupid,';i:',@groupexpiry),conca
t('i:',@id,';i:',@expiry));
else
set @t=substring('a:1:{s:3:"ext";a:1:{i:22;i:1251561600;}}',18,LENGTH('a
:1:{s:3:"ext";a:1:{i:22;i:1251561600;}}')-17);
set @t=substring(@groupterms,18,LENGTH(@groupterms)-17);
set @back=right(@t,LENGTH(@t)-LOCATE('{',@t));
set @tt=left(@t,LOCATE(':',@t)-1);
set @tt=@tt+1;
set @terms=concat('a:2:{s:4:"main";a:1:{s:4:"time";i:',@expiry,';}s:3:"e
xt";a:',@tt,':{i:',@id,';i:',@expiry,';',@back);
end if;
else
set @terms=concat('a:2:{s:4:"main";a:1:{s:4:"time";i:',@expiry,';}s:3:"ext
";a:1:{i:24;i:',@expiry,';}}');
end if;
update cdb_memberfields set groupterms=@terms where uid=new.uid;
end if;
end | AFTER | NULL | | root@localhost |
| insert_moderators | INSERT | cdb_moderators | Begin
set NEW.adddate = NOW();
end
| BEFORE | NULL | | root@localhost
|
+-------------------+--------+----------------+---------------------------------
-------------------------------------------------------------------------+------
--+---------+----------+----------------+
2 rows in set (0.00 sec)mysql> DROP TRIGGER discuz.Insert_vip;
ERROR 1360 (HY000): Trigger does not exist
mysql>