[Yum-devel] Problems with yum and sqlite 3.1

Gijs Hollestelle g.hollestelle at gmail.com
Mon Mar 14 20:55:11 UTC 2005


Hi all,

Sqlite 3.1 just landed in rawhide and it's causing problems for us.
Below is a quick description of the problem:

select * from table1,table2

<3.1 gives back: table1.name = foo, table2.version = bar
>=3.1 gives back: name=foo, version=bar

In other words where <3.1 added a table prefix table. if you used more
than one table in a select, but 3.1 does not do this anymore. Instead
the sqlite author wants you to explicitly select the variables you
need and name them properly and never rely on how sqlite names them.
In the example above:

select table1.name as tb1name, table2.version as tb2version from table1, table2.

Which will result (in both versions) in tb1name = foo, tb2version =
bar. The implications of this for yum is that all queries that use
more than 1 table have to be rewritten to explicitly mention how the
resulting attributes should be named.

I've attached a quick fix to make yum work with sqlite 3.1, note that
this fix does not work on 3.0 and that this is not the prefered way to
solve the problem (the patch now relies on the fact that sqlite never
prefixes with table. which in turn is wrong for sqlite <3.1).

Unfortunately I do not have time to rewrite these queries now (I have
two imporant exams in the next few days).

Greets,
  Gijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqlite3.1.quickfix
Type: application/octet-stream
Size: 8290 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20050314/a465c4c0/attachment.obj 


More information about the Yum-devel mailing list