vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| When I execute the following statements in the command line: DELIMITER $$ DROP PROCEDURE IF EXISTS `t_girl`.`sp_test`$$ CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() BEGIN -- Created by david yeung 20080430. select version(); END$$ DELIMITER ; But the result is not my expected,there are no comments in the routine's body. mysql> show create procedure sp_test; +-----------+-----------------------+-------------------------------------------------------------------------------------+ | Procedure | sql_mode | Create Procedure | +-----------+-----------------------+-------------------------------------------------------------------------------------+ | sp_test | NO_AUTO_VALUE_ON_ZERO | CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() BEGIN select version(); END | +-----------+-----------------------+-------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) Can anybody give me a solution to solve this problem. Any *appreciate* is welcome. -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn |
| |||
| Hi, Try forming the comments like this: /*!99999 * comment text here */ See if that works for you. Regards Baron On Wed, Apr 30, 2008 at 5:27 AM, Moon's Father <yueliangdao0608@gmail.com> wrote: > When I execute the following statements in the command line: > > DELIMITER $$ > > DROP PROCEDURE IF EXISTS `t_girl`.`sp_test`$$ > > CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() > BEGIN > -- Created by david yeung 20080430. > select version(); > END$$ > > DELIMITER ; > But the result is not my expected,there are no comments in the routine's > body. > > mysql> show create procedure sp_test; > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > | Procedure | sql_mode | Create > Procedure > | > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > | sp_test | NO_AUTO_VALUE_ON_ZERO | CREATE DEFINER=`web_131`@`%` PROCEDURE > `sp_test`() > BEGIN > > select version(); > END | > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > 1 row in set (0.00 sec) > > Can anybody give me a solution to solve this problem. > Any *appreciate* is welcome. > -- > I'm a mysql DBA in china. > More about me just visit here: > http://yueliangdao0608.cublog.cn > -- Baron Schwartz, Senior Consultant, Percona Inc. Tel: +1 888 401 3401 ext 507 24/7 Emergency Line +1 888 401 3401 ext 911 Our Services: http://www.percona.com/services.html Our Blog: http://www.mysqlperformanceblog.com/ |
| |||
| Use alter procedure procedure_name comment 'comments string' Saravanan --- On Wed, 4/30/08, Moon's Father <yueliangdao0608@gmail.com> wrote: > From: Moon's Father <yueliangdao0608@gmail.com> > Subject: Anybody can tell me how to reserve the comments in the procedure > To: "mysql list" <mysql@lists.mysql.com> > Date: Wednesday, April 30, 2008, 3:57 PM > When I execute the following statements in the command line: > > DELIMITER $$ > > DROP PROCEDURE IF EXISTS `t_girl`.`sp_test`$$ > > CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() > BEGIN > -- Created by david yeung 20080430. > select version(); > END$$ > > DELIMITER ; > But the result is not my expected,there are no comments in > the routine's > body. > > mysql> show create procedure sp_test; > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > | Procedure | sql_mode | Create > Procedure > | > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > | sp_test | NO_AUTO_VALUE_ON_ZERO | CREATE > DEFINER=`web_131`@`%` PROCEDURE > `sp_test`() > BEGIN > > select version(); > END | > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > 1 row in set (0.00 sec) > > Can anybody give me a solution to solve this problem. > Any *appreciate* is welcome. > -- > I'm a mysql DBA in china. > More about me just visit here: > http://yueliangdao0608.cublog.cn __________________________________________________ __________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ |
| |||
| Thanks for your reply. I know this way to comment outside of a store procedure,But this is not my need. On Wed, Apr 30, 2008 at 10:49 PM, Saravanan <suzuki_babu@yahoo.com> wrote: > > Use > > alter procedure procedure_name comment 'comments string' > > Saravanan > > > --- On Wed, 4/30/08, Moon's Father <yueliangdao0608@gmail.com> wrote: > > > From: Moon's Father <yueliangdao0608@gmail.com> > > Subject: Anybody can tell me how to reserve the comments in the > procedure > > To: "mysql list" <mysql@lists.mysql.com> > > Date: Wednesday, April 30, 2008, 3:57 PM > > When I execute the following statements in the command line: > > > > DELIMITER $$ > > > > DROP PROCEDURE IF EXISTS `t_girl`.`sp_test`$$ > > > > CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() > > BEGIN > > -- Created by david yeung 20080430. > > select version(); > > END$$ > > > > DELIMITER ; > > But the result is not my expected,there are no comments in > > the routine's > > body. > > > > mysql> show create procedure sp_test; > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > | Procedure | sql_mode | Create > > Procedure > > | > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > | sp_test | NO_AUTO_VALUE_ON_ZERO | CREATE > > DEFINER=`web_131`@`%` PROCEDURE > > `sp_test`() > > BEGIN > > > > select version(); > > END | > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > 1 row in set (0.00 sec) > > > > Can anybody give me a solution to solve this problem. > > Any *appreciate* is welcome. > > -- > > I'm a mysql DBA in china. > > More about me just visit here: > > http://yueliangdao0608.cublog.cn > > > > __________________________________________________ __________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn |
| |||
| Thanks for your reply.This works for me. Can you tell me why the number is 99999? when I try others,it can not work at all. On Wed, Apr 30, 2008 at 8:08 PM, Baron Schwartz <baron@percona.com> wrote: > Hi, > > Try forming the comments like this: > > /*!99999 > * comment text here > */ > > See if that works for you. > > Regards > Baron > > On Wed, Apr 30, 2008 at 5:27 AM, Moon's Father > <yueliangdao0608@gmail.com> wrote: > > When I execute the following statements in the command line: > > > > DELIMITER $$ > > > > DROP PROCEDURE IF EXISTS `t_girl`.`sp_test`$$ > > > > CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() > > BEGIN > > -- Created by david yeung 20080430. > > select version(); > > END$$ > > > > DELIMITER ; > > But the result is not my expected,there are no comments in the > routine's > > body. > > > > mysql> show create procedure sp_test; > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > | Procedure | sql_mode | Create > > Procedure > > | > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > | sp_test | NO_AUTO_VALUE_ON_ZERO | CREATE DEFINER=`web_131`@`%` > PROCEDURE > > `sp_test`() > > BEGIN > > > > select version(); > > END | > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > 1 row in set (0.00 sec) > > > > Can anybody give me a solution to solve this problem. > > Any *appreciate* is welcome. > > -- > > I'm a mysql DBA in china. > > More about me just visit here: > > http://yueliangdao0608.cublog.cn > > > > > > -- > > Baron Schwartz, Senior Consultant, Percona Inc. > Tel: +1 888 401 3401 ext 507 > 24/7 Emergency Line +1 888 401 3401 ext 911 > Our Services: http://www.percona.com/services.html > Our Blog: http://www.mysqlperformanceblog.com/ > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn |
| ||||
| See http://dev.mysql.com/doc/refman/5.0/en/comments.html. Regards, Baron On Sun, May 4, 2008 at 1:05 AM, Moon's Father <yueliangdao0608@gmail.com> wrote: > Thanks for your reply.This works for me. > Can you tell me why the number is 99999? > when I try others,it can not work at all. > > On Wed, Apr 30, 2008 at 8:08 PM, Baron Schwartz wrote: > > > Hi, > > > > Try forming the comments like this: > > > > /*!99999 > > * comment text here > > */ > > > > See if that works for you. > > > > Regards > > Baron > > > > > > On Wed, Apr 30, 2008 at 5:27 AM, Moon's Father > > <yueliangdao0608@gmail.com> wrote: > > > When I execute the following statements in the command line: > > > > > > DELIMITER $$ > > > > > > DROP PROCEDURE IF EXISTS `t_girl`.`sp_test`$$ > > > > > > CREATE DEFINER=`web_131`@`%` PROCEDURE `sp_test`() > > > BEGIN > > > -- Created by david yeung 20080430. > > > select version(); > > > END$$ > > > > > > DELIMITER ; > > > But the result is not my expected,there are no comments in the > > routine's > > > body. > > > > > > mysql> show create procedure sp_test; > > > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > > | Procedure | sql_mode | Create > > > Procedure > > > | > > > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > > | sp_test | NO_AUTO_VALUE_ON_ZERO | CREATE DEFINER=`web_131`@`%` > > PROCEDURE > > > `sp_test`() > > > BEGIN > > > > > > select version(); > > > END | > > > > > +-----------+-----------------------+-------------------------------------------------------------------------------------+ > > > 1 row in set (0.00 sec) > > > > > > Can anybody give me a solution to solve this problem. > > > Any *appreciate* is welcome. -- Baron Schwartz, Senior Consultant, Percona Inc. Tel: +1 888 401 3401 ext 507 24/7 Emergency Line +1 888 401 3401 ext 911 Our Services: http://www.percona.com/services.html Our Blog: http://www.mysqlperformanceblog.com/ |
| Thread Tools | |
| Display Modes | |
| |