| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> mysql >> MySQL shi jian tiao du qi Event Scheduler xiang jie

MySQL shi jian tiao du qi Event Scheduler xiang jie

2008-08-07 07:34:58 编辑來源:互联网 评论
 
 
 
本文为【MySQL事件调度器Event Scheduler详解】的拼音翻译版
  shi jian tiao du qi shi zai MySQL 5.1 zhong xin zeng de ling yi ge te se gong neng , ke yi zuo wei ding shi ren wu tiao du qi , qu dai bu fen yuan xian zhi neng yong cao zuo xi tong ren wu tiao du qi cai neng wan cheng de ding shi gong > neng 。 li ru ,Linux zhong de crontabe zhi neng jing que dao mei fen zhong zhi xing yi ci , er MySQL de shi jian tiao du qi ze ke yi shi xian mei miao zhong zhi xing yi ge ren wu , zhe zai yi xie dui shi shi xing yao > qiu jiao gao de huan jing xia jiu fei chang shi yong le 。
  shi jian tiao du qi shi ding shi chu fa zhi xing de , zai zhe ge jiao du shang ye ke yi cheng zuo shi " lin shi de chu fa qi "。 chu fa qi zhi shi zhen dui mou ge biao chan sheng de shi jian zhi xing yi xie yu ju , er shi jian tiao du qi ze shi zai mou yi ge ( jian ge ) shi jian zhi xing yi xie yu ju 。 shi jian shi you yi ge te ding de xian cheng lai guan li de , ye jiu shi suo wei de " shi jian tiao du qi "。 qi yong shi jian tiao du qi hou , yong you SUPER quan xian de zhang hu zhi xing SHOW PROCESSLIST jiu ke yi kan dao zhe ge xian cheng le 。 tong guo she ding quan ju bian liang event_scheduler de zhi ji ke dong tai de kong zhi shi jian tiao du qi shi fou qi yong 。
  (root:localhost:)test> SET GLOBAL event_scheduler = ON;(root:localhost:)test> show processlist\G*************************** 4. row ***************************Id: 46147User: event_schedulerHost: localhostdb: NULLCommand: DaemonTime: 1State: Waiting on empty queueInfo: NULL
  ru shang , gai xian cheng de suo you zhe shi event_scheduler。
  ying yong an li
  ben an li shi li yong event scheduler de te xing , mei miao zhong tiao yong yi ci cun chu guo cheng , yong yu pan duan SLAVE shi fou zheng chang yun xing , ru guo fa xian SLAVE guan bi le , hu lue 0 ci cuo wu , ran hou chong xin qi dong SLAVE。
  shou xian chuang jian cun chu guo cheng
  delimiter //create procedure `Slave_Monitor`()beginSELECT VARIABLE_VALUE INTO @SLAVE_STATUS FROM information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME='SLAVE_RUNNING';IF ('ON' != @SLAVE_STATUS) THENSET GLOBAL SQL_SLAVE_SKIP_COUNTER=0;SLAVE START;END IF;end; //delimiter ;
  you yu cun chu guo cheng zhong wu fa tiao yong lei si SHOW SLAVE STATUS zhe yang de yu ju , yin ci wu fa de dao que qie de fu zhi cuo wu xin xi he cuo wu dai ma , bu neng jin yi bu de chu li SLAVE ting zhi de ge zhong qing kuang 。
  jie zhe , chuang jian ren wu
  CREATE EVENT IF NOT EXISTS `Slave_Monitor`
  ON SCHEDULE EVERY 5 SECOND
  ON COMPLETION PRESERVE
  DO
  CALL Slave_Monitor();
  chuang jian le yi ge ren wu , mei 5 miao zhong zhi xing yi ci , ren wu jie shu hou yi jiu bao liu gai ren wu , er bu shi shan chu 。 dang ran le , zai ben li zhong de ren wu bu hui jie shu , chu fei jiang ta shou dong jin zhi le 。
  ru guo zai yun xing zhong xiang yao lin shi guan bi yi xia mou ge ren wu , zhi xing ALTER EVENT yu ju ji ke :
  (root:localhost:)test> alter event `Slave_Monitor` ON
  COMPLETION PRESERVE DISABLE;
  (root:localhost:)test> alter event `Slave_Monitor` ON
  COMPLETION PRESERVE ENABLE;【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
shi jian tiao du qi shi zai MySQL 5.1 zhong xin zeng de ling yi ge te se gong neng , ke yi zuo wei ding shi ren wu tiao du qi , qu dai bu fen yuan xian zhi neng yong cao zuo xi tong ren wu tiao du qi cai neng wan cheng de ding shi gong > neng 。 li ru ,Linux zhong de crontabe zhi neng jing que dao mei fen zhong zhi xing yi ci , er MySQL de shi jian tiao du qi ze ke yi shi xian mei miao zhong zhi xing yi ge ren wu , zhe zai yi xie dui shi shi xing yao > qiu jiao gao de huan jing xia jiu fei chang shi yong le 。 shi jian tiao du qi shi ding shi chu fa zhi xing de , zai zhe ge jiao du shang ye ke yi cheng zuo shi " lin shi de chu fa qi "。 chu fa qi zhi shi zhen dui mou ge biao chan sheng de shi jian zhi xing yi xie yu ju , er shi jian tiao du qi ze shi zai mou yi ge ( jian ge ) shi jian zhi xing yi xie yu ju 。 shi jian shi you yi ge te ding de xian cheng lai guan li de , ye jiu shi suo wei de " shi jian tiao du qi "。 qi yong shi jian tiao du qi hou , yong you SUPER quan xian de zhang hu zhi xing SHOW PROCESSLIST jiu ke yi kan dao zhe ge xian cheng le 。 tong guo she ding quan ju bian liang event_scheduler de zhi ji ke dong tai de kong zhi shi jian tiao du qi shi fou qi yong 。 (root:localhost:)test> SET GLOBAL event_scheduler = ON;(root:localhost:)test> show processlist\G*************************** 4. row ***************************Id: 46147User: event_schedulerHost: localhostdb: NULLCommand: DaemonTime: 1State: Waiting on empty queueInfo: NULL ru shang , gai xian cheng de suo you zhe shi event_scheduler。 ying yong an li ben an li shi li yong event scheduler de te xing , mei miao zhong tiao yong yi ci cun chu guo cheng , yong yu pan duan SLAVE shi fou zheng chang yun xing , ru guo fa xian SLAVE guan bi le , hu lue 0 ci cuo wu , ran hou chong xin qi dong SLAVE。 shou xian chuang jian cun chu guo cheng delimiter //create procedure `Slave_Monitor`()beginSELECT VARIABLE_VALUE INTO @SLAVE_STATUS FROM information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME='SLAVE_RUNNING';IF ('ON' != @SLAVE_STATUS) THENSET GLOBAL SQL_SLAVE_SKIP_COUNTER=0;SLAVE START;END IF;end; //delimiter ; you yu cun chu guo cheng zhong wu fa tiao yong lei si SHOW SLAVE STATUS zhe yang de yu ju , yin ci wu fa de dao que qie de fu zhi cuo wu xin xi he cuo wu dai ma , bu neng jin yi bu de chu li SLAVE ting zhi de ge zhong qing kuang 。 jie zhe , chuang jian ren wu CREATE EVENT IF NOT EXISTS `Slave_Monitor` ON SCHEDULE EVERY 5 SECOND ON COMPLETION PRESERVE DO CALL Slave_Monitor(); chuang jian le yi ge ren wu , mei 5 miao zhong zhi xing yi ci , ren wu jie shu hou yi jiu bao liu gai ren wu , er bu shi shan chu 。 dang ran le , zai ben li zhong de ren wu bu hui jie shu , chu fei jiang ta shou dong jin zhi le 。 ru guo zai yun xing zhong xiang yao lin shi guan bi yi xia mou ge ren wu , zhi xing ALTER EVENT yu ju ji ke : (root:localhost:)test> alter event `Slave_Monitor` ON COMPLETION PRESERVE DISABLE; (root:localhost:)test> alter event `Slave_Monitor` ON COMPLETION PRESERVE ENABLE;
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
华丽的模特拍摄(8)
华丽的模特拍摄(7)
华丽的模特拍摄(6)
华丽的模特拍摄(5)
八里沟
朝阳宫
天下峨眉 云上金顶
老家(四)
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有