Re: SQLite3 database corrupted
Travis Everett <[email protected]> Fri, 21 Apr 2023 13:12:08 -0500
| Newsgroups | gmane.text.doxygen.general |
|---|---|
| Message-ID | <CAC=jSUXdavTj-Tcu55LRJkGXfpR9PeLN=N-m8tjCc194b7Se2A@mail.gmail.com> |
--===============3216678242017112635== Content-Type: multipart/alternative; boundary="00000000000013847e05f9dc9990" --00000000000013847e05f9dc9990 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've opened a PR (https://github.com/doxygen/doxygen/pull/9992) and have updated the fix; if you try this before it's merged, you can build from https://github.com/abathur/doxygen/tree/fix_schema_version. Also, I noticed while poking at the sqlite `.read` command: it's not for loading a database--it'll throw parse errors even on a well-formed db. I think it expects the file to contain either SQL or a command that will generate SQL. On Wed, Apr 19, 2023 at 10:40=E2=80=AFPM Travis Everett <travis.a.everett@g= mail.com> wrote: > I have a project with some tests against the SQLite behavior. I needed to > dust it off a bit, but I was able to get it working at the major versions > between now and the last time I touched it (without seeing this issue > myself). > > I did notice some regressed behavior, mostly around some 2021 QCString > refactoring and have a commit fixing it. I'm curious if this happens to > work for you if you build from it: > https://github.com/abathur/doxygen/commit/6106b5119ba84a692dd7cdf1e91535c= bd83ec070 > > > The line you're quoting for the parse error looks like data for the "meta= " > table. Here's an example of what that looks like in a db from one of my > tests: > > sqlite> select * from meta; > doxygen_version =3D 1.9.7 > schema_version =3D 0.2.1 > generated_at =3D Wed Jan 2 1980 00:00:00 > generated_on =3D Wed Jan 2 1980 > project_name =3D ManualTest > project_number =3D 1.1.22 > project_brief =3D A quick idea about the purpose of the project > > and the statement binding the value for `schema_version` is one of the > ones I fixed. > > On Tue, Apr 18, 2023 at 12:30=E2=80=AFPM Chad Cornwell <cornwell.chad@gma= il.com> > wrote: > >> I compiled from source on centos 7 using the scl dev toolset 7 (if this >> matters) for doxygen 1.9.7 with the -Duse_sqlite3 flag on. >> >> I was able to successfully run doxygen on my code directory and did not >> see any error flags pop up relating to sqlite3 (or any at all) however w= hen >> I try to open up the database using sqlite3 it responds to .tables with = ' >> Errror: file is not a database' >> >> Additionally when I try to .read doxygen_sqlite3.db it gives the >> following error: >> Parse error near line 1: unrecognized token "18a592b71f" >> 18a592b71fc2*)0.2.1TueApr 18 2023 17:54:53Tue Apr 18 2023My Project >> 05acdd2d7 >> ^--- error here >> >> It seems as if the data is populated into the .db file but it is getting >> corrupted somehow along the way, any ideas on how to fix this? Thank you= so >> much for your help! >> _______________________________________________ >> Doxygen-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/doxygen-users >> > --00000000000013847e05f9dc9990 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I've opened a PR (<a href=3D"https://github.com/doxyge= n/doxygen/pull/9992">https://github.com/doxygen/doxygen/pull/9992</a>) and = have updated the fix; if you try this before it's merged, you can build= from <a href=3D"https://github.com/abathur/doxygen/tree/fix_schema_version= ">https://github.com/abathur/doxygen/tree/fix_schema_version</a>.<div><br><= /div><div>Also, I noticed while poking at the sqlite `.read` command: it= 9;s not for loading a database--it'll throw parse errors even on a well= -formed db. I think it expects the file to contain either SQL or a command = that will generate SQL.</div></div><br><div class=3D"gmail_quote"><div dir= =3D"ltr" class=3D"gmail_attr">On Wed, Apr 19, 2023 at 10:40=E2=80=AFPM Trav= is Everett <<a href=3D"mailto:[email protected]">travis.a.evere= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl= e=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid= ;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">I ha= ve a project with some tests against the SQLite behavior. I needed to dust = it off a bit, but I was able to get it working at the major versions betwee= n now and the last time I touched it (without seeing this issue myself).<di= v><br></div><div>I did notice some regressed behavior, mostly around some 2= 021 QCString refactoring and have a commit fixing it. I'm curious if th= is happens to work for you if you build from it:=C2=A0<a href=3D"https://gi= thub.com/abathur/doxygen/commit/6106b5119ba84a692dd7cdf1e91535cbd83ec070" t= arget=3D"_blank">https://github.com/abathur/doxygen/commit/6106b5119ba84a69= 2dd7cdf1e91535cbd83ec070</a>=C2=A0</div><div><br></div><div>The line you= 9;re quoting for the parse error looks like data for the "meta" t= able. Here's an example of what that looks like in a db from one of my = tests:</div><div><br></div><div><font face=3D"monospace">sqlite> select = * from meta;<br>doxygen_version =3D 1.9.7<br>=C2=A0schema_version =3D 0.2.1= <br>=C2=A0 =C2=A0generated_at =3D Wed Jan 2 1980 00:00:00<br>=C2=A0 =C2=A0g= enerated_on =3D Wed Jan 2 1980<br>=C2=A0 =C2=A0project_name =3D ManualTest<= br>=C2=A0project_number =3D 1.1.22<br>=C2=A0 project_brief =3D A quick idea= about the purpose of the project</font><br></div><div><font face=3D"monosp= ace"><br></font></div><div><font face=3D"arial, sans-serif">and the stateme= nt binding the value for `schema_version` is one of the ones I fixed.</font= ></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail= _attr">On Tue, Apr 18, 2023 at 12:30=E2=80=AFPM Chad Cornwell <<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]= om</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi= n:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-le= ft-color:rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">I compiled fro= m source on centos 7 using the scl dev toolset 7 (if this matters) for doxy= gen 1.9.7 with the -Duse_sqlite3 flag on.=C2=A0<div><br></div><div>I was ab= le to successfully run doxygen on my code directory and did not see any err= or flags pop up relating to sqlite3 (or any at all) however when I try to o= pen up the database using sqlite3 it responds to .tables with ' Errror:= file is not a database'</div><div><br></div><div>Additionally when I t= ry to .read doxygen_sqlite3.db it gives the following error:</div><div>Pars= e error=C2=A0near line 1: unrecognized token "18a592b71f"</div><d= iv>=C2=A018a592b71fc2*)0.2.1TueApr 18 2023 17:54:53Tue=C2=A0Apr 18 2023My P= roject 05acdd2d7</div><div>=C2=A0 =C2=A0^--- error here</div><div><br></div= ><div>It seems as if the data is populated=C2=A0into the .db file but it is= getting corrupted somehow along the way, any ideas on how to fix this? Tha= nk you so much for your help!=C2=A0</div></div> _______________________________________________<br> Doxygen-users mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Do= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/doxygen-users" rel= =3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listi= nfo/doxygen-users</a><br> </blockquote></div> </blockquote></div> --00000000000013847e05f9dc9990-- --===============3216678242017112635== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3216678242017112635== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Doxygen-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/doxygen-users --===============3216678242017112635==--