-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> It's been that way for 6 years, and nobody has noticed until Patrick
>> complained earlier today.

Schrödinbug - http://en.wikipedia.org/wiki/Unusual_software_bug#Schr.C3.B6dinbug

>> Hence, the fix is a little trickier than it might seem at first glance.  One
>> approach, I suppose, would be to generate dead code for any unused
>> parameters.

Or keep a bindings table as a separate structure pointing to each place
within the bytecode where they occur.

>> Another approach would be to disable expression optimizations
>> that might optimize out a parameter.

It does seem to me that this specific example is "wrong".  Selects return
zero or more rows yet the equality wants exactly one value.  I would expect
an error rather an implied "LIMIT 1" should there be anything other than
exactly one row.  In some cases you'd only know by executing that subquery
how many rows it returns, rather than at prepare time.

>> Both approaches add code, making the library slightly larger and
>> more complicated, and increasing the number of tests needed for coverage.
>> Both approaches needlessly drain some small but finite amount of energy out
>> of your cellphone battery.

Compared to the sessions or URI stuff it is nothing :-)

But even in these very limited environments it is reasonable to believe the
people doing the queries and those doing the C interface could be different
(both different people and written at different times).  They are unlikely
to be able to test everything since devices will be user and event driven in
real world deployments.  (Or in other words predictable behaviour and
correctness even for developers who only write part of the app using SQLite
and may have done so long ago would seem to be the most important qualities
to me.)

>> So, in summary, the "problem" has been with us for 6 years and nobody has
>> cared.  And "fixing" it reduces the battery life on your cellphone by some
>> small amount.  Are you *sure* this is something that needs to change?

I think it is important to correct, especially as there is no workaround.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk3l3QkACgkQmOOfHg372QRFNACfQtq5RZYRokU6OP5gtmyxUAlh
U1cAn33TYWi1eMC0DaOXSB/JPYtdCXKn
=x+Nn
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to