Re: question about UDF
Shaukat Mahmood Ahmad <[email protected]> Fri, 30 Nov 2012 20:02:44 +0500
| Newsgroups | gmane.comp.db.mysql.devel |
|---|---|
| Message-ID | <CAG0LXhwK=Gkto_dd4Ux0L=C5EX3QXUWO3XFi4-kn+pnkNPxQaw@mail.gmail.com> |
One little explanation: you cant introduce new keywords by simply adding them to sql/lex.h, you will have to write grammar for new reserve words / commands, and then will have to regenerate sql parser using gnu bison ( that is a parser generator tool). Regards, Shaukat Mahmood Ahmad On Fri, Nov 30, 2012 at 7:48 PM, Shaukat Mahmood Ahmad <[email protected]> wrote: > One little explanation: you cant introduce new keywords by simply adding > them to sql/lex.h, you will have to write grammar for new reserve words / > commands, and then will have to regenerate sql parser using gnu bison ( > that is a parser generator tool). > > Regards, > Shaukat Mahmood Ahmad > > > On Fri, Nov 30, 2012 at 12:13 PM, Michael Widenius <[email protected]> > wrote: >> >> >> Hi! >> >> >>>>> "Zhixuan" == Zhixuan Zhu <[email protected]> writes: >> >> Zhixuan> Hi, >> Zhixuan> I have two questions: >> >> Zhixuan> 1. Is there a way that I can add customized reserved words to >> mysql? >> >> Yes, by adding them to sql/lex.h >> >> >> Zhixuan> 2. Is it possible that I can use the customized reserve words in >> my udf >> Zhixuan> function? >> >> No. You would get a syntax error when using the reserved word as the >> parser would not know what to do with the word. >> >> Regards, >> Monty >> Creator of MySQL and MariaDB >> >> >> -- >> MySQL Internals Mailing List >> For list archives: http://lists.mysql.com/internals >> To unsubscribe: http://lists.mysql.com/internals >> > -- MySQL Internals Mailing List For list archives: http://lists.mysql.com/internals To unsubscribe: http://lists.mysql.com/internals