On Tue, Apr 23, 2013 at 4:44 PM, Steven Boswell II <[email protected]>wrote:
> Please see https://bugs.launchpad.net/mixxx/+bug/1171235 -- my
> performance improvement to playlist/crate import is bugged, and I submitted
> a patch for it. If you've imported playlists/crates with that code, you
> just have to delete them and re-import them, and your database will be
> error-free again.
>
Not the first time broken code has made it in right before a release :). We
really could use library unit tests.
The source of the bug is an error in the database format -- even though
> schema 3 changed library.location from a varchar(512) to an integer, the
> REFERENCES constraint wasn't changed from track_locations(location) to
> track_locations(id). That led me to write bad code without realizing it.
> Also, schema 3 didn't do anything to convert the text-based location to an
> integer-based location, which would be an old bug.
>
>
Good catch! Schema versions 1 and 2 never made it into the wild -- it's
from when we were developing the SQLite library in its own branch so that
explains why we never heard from any users about the conversion issue.
> The patch I submitted to bug #1171235 not only fixes my code, it also
> corrects the constraint in the library table, and adds some comments to the
> place (i.e. schema 3) where the problem was introduced, and how it could
> have been avoided.
>
The REFERENCES change is probably worth doing as long as we don't have to
bump our min_compatible version. Since it just changes the constraint I
don't think we'd have issues unless our previous binaries had issues where
they would violate the constraint. I don't think we've ever seen this so
it's probably fine. Plus we don't even turn on the constraint.
>
> I'm guessing that schema 3 being broken is old news, but I thought I'd say
> something anyway.
> Perhaps we should be using sqlite with "PRAGMA foreign_keys = ON"?
>
Yea, that's probably worth doing as long as we are confident there aren't
users whose constraints are already violated (and so turning on the
checking would break queries for them).
thanks,
RJ
>
> Steven Boswell
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> http://mixxx.org
>
>
> Mixxx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel