Re: [gnome-db] MySQL hex to blob marking as unknown node
Arthur Neves <[email protected]> Wed, 03 Feb 2016 14:29:30 +0000
| Newsgroups | gmane.comp.gnome.db |
|---|---|
| Message-ID | <CAA6kw-_qw3ndEfzsoULCjooJhcdMrbhvvEt56rWgPeTfwv+f-g@mail.gmail.com> |
--===============6839241017839716926== Content-Type: multipart/alternative; boundary=94eb2c08447aca9388052ade7275 --94eb2c08447aca9388052ade7275 Content-Type: text/plain; charset=UTF-8 Interesting, I thought it did, by looking at the code: https://github.com/GNOME/libgda/blob/293b3c1a9ae0c0e5f4f6b8997ceb3e48dfab4892/libgda/sql-parser/gda-sql-parser.c#L1435 https://github.com/GNOME/libgda/blob/293b3c1a9ae0c0e5f4f6b8997ceb3e48dfab4892/libgda/sql-parser/gda-sql-parser.c#L1299 I havent debugged it yet to tell for sure if it is a bug or not. But from the code, seems like it was suppose to support that. Thoughts? If you can confirm it is a bug, I can work in a patch. Thanks On Mon, Feb 1, 2016 at 2:15 PM Vivien Malerba <[email protected]> wrote: > Hi! > > Sorry for taking so long to answer... > Libgda's internal parser does not recognize that syntax, hence the result. > The parser could probably quite easily corrected, but it was never meant > to be a comprehensive parser (in the way that some specific SQL constructs > are not and will probably never be recognized); it was meant to be able to > actually distinguish in many cases the type of SQL query. > > Regards, > Vivien > > > 2016-01-14 22:49 GMT+01:00 Arthur Neves <[email protected]>: > >> Hi everyone, >> I am using libgda to parse some queries from my application, however I am >> confused about a few queries been marked as unknown (top level node). >> Seems like that queries that include a x'' syntax, which is valid on >> mysql are marked as unknown. Follow an example code: >> https://gist.github.com/arthurnn/a5056d644e5b0076bec5 , This is hitting >> the UNKNOWN branch. Not sure where the problem is. Any clue? >> >> Thanks a lot >> >> _______________________________________________ >> gnome-db-list mailing list >> [email protected] >> https://mail.gnome.org/mailman/listinfo/gnome-db-list >> >> > --94eb2c08447aca9388052ade7275 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Interesting, I thought it did, by looking at the code:=C2= =A0<div><a href=3D"https://github.com/GNOME/libgda/blob/293b3c1a9ae0c0e5f4f= 6b8997ceb3e48dfab4892/libgda/sql-parser/gda-sql-parser.c#L1435">https://git= hub.com/GNOME/libgda/blob/293b3c1a9ae0c0e5f4f6b8997ceb3e48dfab4892/libgda/s= ql-parser/gda-sql-parser.c#L1435</a></div><div><a href=3D"https://github.co= m/GNOME/libgda/blob/293b3c1a9ae0c0e5f4f6b8997ceb3e48dfab4892/libgda/sql-par= ser/gda-sql-parser.c#L1299">https://github.com/GNOME/libgda/blob/293b3c1a9a= e0c0e5f4f6b8997ceb3e48dfab4892/libgda/sql-parser/gda-sql-parser.c#L1299</a>= <br></div><div><br></div><div>I havent debugged it yet to tell for sure if = it is a bug or not. But from the code, seems like it was suppose to support= that.</div><div><br></div><div>Thoughts? If you can confirm it is a bug, I= can work in a patch.</div><div><br></div><div>Thanks</div><div><br></div><= /div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Feb 1, 2016 at= 2:15 PM Vivien Malerba <<a href=3D"mailto:[email protected]">vmalerba@= gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir= =3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,= sans-serif">Hi!<br><br></div><div class=3D"gmail_default" style=3D"font-fam= ily:arial,helvetica,sans-serif">Sorry for taking so long to answer...<br></= div><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-= serif">Libgda's internal parser does not recognize that syntax, hence t= he result.<br></div><div class=3D"gmail_default" style=3D"font-family:arial= ,helvetica,sans-serif">The parser could probably quite easily corrected, bu= t it was never meant to be a comprehensive parser (in the way that some spe= cific SQL constructs are not and will probably never be recognized); it was= meant to be able to actually distinguish in many cases the type of SQL que= ry.<br><br></div><div class=3D"gmail_default" style=3D"font-family:arial,he= lvetica,sans-serif">Regards,<br></div><div class=3D"gmail_default" style=3D= "font-family:arial,helvetica,sans-serif">Vivien<br></div><div class=3D"gmai= l_default" style=3D"font-family:arial,helvetica,sans-serif"><br></div></div= ><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"></div></div><div= class=3D"gmail_extra"><div class=3D"gmail_quote">2016-01-14 22:49 GMT+01:0= 0 Arthur Neves <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>></span>:<br></div></div><div cl= ass=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_q= uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e= x"><div dir=3D"ltr"><div>Hi everyone,=C2=A0</div><div>I am using libgda to = parse some queries from my application, however I am confused about a few q= ueries been marked as unknown (top level node).=C2=A0</div><div>Seems like = that queries that include a x'' syntax, which is valid on mysql are= marked as unknown. Follow an example code: <a href=3D"https://gist.github.= com/arthurnn/a5056d644e5b0076bec5" target=3D"_blank">https://gist.github.co= m/arthurnn/a5056d644e5b0076bec5</a>=C2=A0, This is hitting the UNKNOWN bran= ch. Not sure where the problem is. Any clue?</div><div><br></div><div>Thank= s a lot=C2=A0</div></div> <br></blockquote></div></div><div class=3D"gmail_extra"><div class=3D"gmail= _quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border= -left:1px #ccc solid;padding-left:1ex">____________________________________= ___________<br> gnome-db-list mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">gnome-db-list@= gnome.org</a><br> <a href=3D"https://mail.gnome.org/mailman/listinfo/gnome-db-list" rel=3D"no= referrer" target=3D"_blank">https://mail.gnome.org/mailman/listinfo/gnome-d= b-list</a><br> <br></blockquote></div><br></div> </blockquote></div> --94eb2c08447aca9388052ade7275-- --===============6839241017839716926== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnome-db-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gnome-db-list --===============6839241017839716926==--