[vlc-devel] [PATCH] SQLite module

Srikanth Raju srikiraju at gmail.com
Wed Nov 25 11:56:17 CET 2009


2009/11/12 Rémi Denis-Courmont <remi at remlab.net>
>
>
> > > +  then
> > > +    AC_ARG_WITH(sqlite,
> > > +      [    --with-sqlite=PATH sqlite path linking])
> > >
> > > Do we really need this? Also, same error as AC_ARG_ENABLE.
> >
> > Yes, because Darwin doesn't have the latest sqlite.
>
> What's wrong with contribs? Why do you need your own path?
>
>
We can include sqlite in the contribs.
MacPorts had an old version of sqlite and a new version was required for
testing. So, with-sqlite was included. Shall I remove it and include sqlite
in the contribs? Or do we want to keep the contribs minimal?



>
> > +static char* VMSprintf( const char* psz_fmt, va_list args )
> > > +{
> > > +    char *psz = sqlite3_vmprintf( psz_fmt, args );
> > > +    char *ret = strdup( psz );
> > > +    sqlite3_free( psz );
> > > +    return ret;
> > > +}
> > >
> > > Do we really need this double copy/allocation?
> >
> > Yes. psz is allocated with sqlite3_malloc. Some "fastmem" builds can use
> > different allocation strategies, hence we cannot rely on free() to free
> >  psz. Hence the copy.
>
> That's not the point. Why do you need strdup and free?
>
Is there a way to do this without strdup?


>
> > > Same stalling problem.
> > >
> > > IMHO, RollbackTransaction should return void, because it does not make
> > > much sense to fail here.
> >
> > I agree that it should return void. However, the people who made sqlite
> > decided that a ROLLBACK can fail if there are pending reads/writes.
>
> I don't care what the SQLite people decided. There _must_ be a way to
> recover
> from the error. Keeping a stalled mutex is _not_ acceptable under any
> circumstances. In fact, it will cause an assertion failure when you close
> the
> DB.
>
> Ah. The Rollback needs to be called again after a while.


> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>



-- 
Regards,
Srikanth Raju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091125/f359c7cd/attachment.html>


More information about the vlc-devel mailing list