Re: [sqlite] SQLite Provenance

2012-07-06 Thread Roger Binns
they released. What is of more importance is that you have access to the code (which everyone does) and where the code came from. Especially note the first and third paragraphs here: http://www.sqlite.org/copyright.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] When to call VACUUM - revisited

2012-07-05 Thread Roger Binns
controls, especially SQLITE_FCNTL_CHUNK_SIZE: http://www.sqlite.org/c3ref/c_fcntl_chunk_size.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/1oosACgkQmOOfHg372QQSRACgglDh1oe9cL7Wm7ShbUYjDWdZ ONMAoJApn6aFivn9CtZiD66QIDJUn4md =t518 -END PGP

Re: [sqlite] Can I rely on this being ordered?

2012-07-03 Thread Roger Binns
should help pick up places where you assumed an ordering: http://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/zdDAACgkQmOOfHg372QQNDACgtxix1/92FxlMKP2ZfYIxFDLz qf8AoIityNNnSao0Jh75Vs67swDqvQkw

Re: [sqlite] max size of a TEXT field

2012-07-02 Thread Roger Binns
are, or what the Unicode fuss is then read this article titled The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets http://www.joelonsoftware.com/articles/Unicode.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] catching sqlite errors...what to know

2012-07-01 Thread Roger Binns
it in a new connection and execute BEGIN EXCLUSIVE. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/whmUACgkQmOOfHg372QRYKACgjJ3INXrOuo4caLlFBI246Dz0 KpIAniQwiHYAFhHgI8BotWYhdsrh04hr =nQK1 -END PGP SIGNATURE

Re: [sqlite] SQLITE 64bit Application Support?

2012-06-29 Thread Roger Binns
on, but it is quite a variety and takes a long time. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/uSNkACgkQmOOfHg372QTYTgCcDzZEPE1wdZm4DBbbQmqeyH4D 2YoAnAtsCH9Eh3qdRJHk6iKUQS7sKl7E =Vtwi -END PGP SIGNATURE- ___ sqlite

Re: [sqlite] SQLite4 (don't scream)

2012-06-28 Thread Roger Binns
and SQLite. They have been somewhat mitigated since then, but I'm still sure that a dedicated cracker could figure out ways of exploiting this. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/sjjEACgkQmOOfHg372QTPwACggVC6nosFsJb2caXff1DEhkLh /zwAoNtgC

Re: [sqlite] SQLite4 (don't scream)

2012-06-28 Thread Roger Binns
/comments/vp9uh/sqlite4_the_design/ Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/sjp0ACgkQmOOfHg372QR7HACghy3WA1rXUlXtgUkJMncEGFPa SwsAnA3T1tpMN9QsdXqUq7W/4961Dgmo =JzxV -END PGP SIGNATURE- ___ sqlite-users

Re: [sqlite] I consider this a bug. Anyone else?

2012-06-26 Thread Roger Binns
to listen to the several people who have repeatedly been telling you that what you wanted is the most time consuming and most brittle way of doing things. However you will note that so far there have been zero people clamouring to form some sort of community for what you stated. Good luck! Roger

Re: [sqlite] I consider this a bug. Anyone else?

2012-06-26 Thread Roger Binns
it works on platforms they don't use etc. What they do care about is if the resulting app works for them and their priorities. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/p+I0ACgkQmOOfHg372QR9/wCeMutBjoaFyFjN/RD6BcdGIovm qLUAnjoCN/z+TByIhefrvqspeqPbWmuV

Re: [sqlite] I consider this a bug. Anyone else?

2012-06-25 Thread Roger Binns
and availability? Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/ovYEACgkQmOOfHg372QQrOACffzSBY6ZTR6/M6QrN4yxresMc encAoLOLW8GQs7tVMHCur9jxt0uBCIra =IV37 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite

Re: [sqlite] SQLite database on the android phone

2012-06-23 Thread Roger Binns
is somewhat fussy about databases it didn't create as it does some behind the scenes shenanigans with versioning and collations/locales. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/l7IoACgkQmOOfHg372QS8hgCfRi/ApEil2f/H5XwKPF/5Kaag LSAAn3ZhZkUF9y2HJnOYiv/3/0gJjFvM

Re: [sqlite] Different backend possible?

2012-06-23 Thread Roger Binns
It isn't too easy to replace the btree and that sort of thing, although you do have full control over how SQLite does store the database pages: http://www.sqlite.org/vfs.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk

Re: [sqlite] Bug: incorrect forward declaration ofsqlite3_win32_sleep

2012-06-19 Thread Roger Binns
). In that case shouldn't it be inside #ifdef SQLITE_TEST which then means it won't be encountered in regular builds so how it is declared is moot? Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/gk48ACgkQmOOfHg372QQViwCg5Kbn3a8OEv82E7pOdWu70WPo TPMAoJvTTguZ/JhBzpYw

[sqlite] Bug: incorrect forward declaration of sqlite3_win32_sleep

2012-06-18 Thread Roger Binns
failure. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/ezuMACgkQmOOfHg372QSKzACgkaVUTmho3pIYAEmG1DMmUKd7 A18AoNlE6RxKUcOTggXB4nAclPezZorw =iNne -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users

Re: [sqlite] Bug: incorrect forward declaration of sqlite3_win32_sleep

2012-06-18 Thread Roger Binns
clash with any other versions of SQLite that may end up being loaded or referenced. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/fV34ACgkQmOOfHg372QTLRQCgitnrpy80qcnzII8CSOGOlz+7 qw8AoM8akEVowzhB9kqBKbTon0i/ZooE =R3tj -END PGP SIGNATURE

Re: [sqlite] Bug: incorrect forward declaration of sqlite3_win32_sleep

2012-06-18 Thread Roger Binns
I'll be able to check this evening (it is considerably harder for me to test on Windows than other platforms). However I'll note that sqlite3_win32_sleep really should be private as it isn't documented as part of the SQLite API: https://www.sqlite.org/c3ref/funclist.html Roger -BEGIN PGP

Re: [sqlite] Bug: incorrect forward declaration of sqlite3_win32_sleep

2012-06-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18/06/12 14:16, Roger Binns wrote: I'll be able to check this evening (it is considerably harder for me to test on Windows than other platforms). I failed trying to test, as everything kept going wrong and it would require substantial surgery

Re: [sqlite] Queries on SQLite

2012-06-15 Thread Roger Binns
for the background I/O and then call sqlite3_async_run() in it. See the compilation and usage section of the documentation page you linked to. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/bUP0ACgkQmOOfHg372QQQFQCcDtuK047xMmBHq3wCdeMaGvMH

Re: [sqlite] List manager webpage unavailible.

2012-06-07 Thread Roger Binns
. Unfortunately there isn't much that can be done about that from your end other than trying to access from a different network location. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk/RKNYACgkQmOOfHg372QTdYACeIZDYDk4dXMN7OO6YauiZpy4x

Re: [sqlite] Displaying currently running SQL

2012-06-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/06/12 09:27, Richard Hipp wrote: .trace stdout That is a relatively recent addition so make sure your command-line shell is up-to-date. Version 3.7.12.1. Or `.echo on' which has been in the shell for years :-) Roger -BEGIN PGP

Re: [sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Roger Binns
data. http://www.sqlite.org/c3ref/column_blob.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+v2AYACgkQmOOfHg372QR68ACcDqmI5pAncgUCs2MAu0trFmVS arwAn3/jR4XBktvKe+PtJQhWnje6aHbL =N6o7 -END PGP SIGNATURE

Re: [sqlite] progressbar

2012-05-05 Thread Roger Binns
.) Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+lcIEACgkQmOOfHg372QRiAwCfXZ4KuBNOppllW+HY2os8+wzw IdsAoI3UKPIKFhQVGJZC1tJdbPD6qyf6 =uaYR -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users

Re: [sqlite] progressbar

2012-05-05 Thread Roger Binns
of seeing what things looked like at any point in the past. These days requiring users to tell the program when to copy data from transient storage to persistent is very anachronistic. As an example you'll notice that no mobile apps do that, and most web ones don't either. Roger -BEGIN PGP

Re: [sqlite] Details on New Features

2012-05-04 Thread Roger Binns
rely on undefined behaviour, make no sense or are suboptimal. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+kFhYACgkQmOOfHg372QSV4QCgzWo6QrO5Umx6G49uVhawCvqR KmYAnAiOX67q1yM5i1JOGQB41QVuc/oC =yzM2 -END PGP SIGNATURE

Re: [sqlite] questions regarding WAL and Shared Cache Mode

2012-04-30 Thread Roger Binns
by ... The documentation for WAL clearly explains the advantages and disadvantages, including how it works. http://www.sqlite.org/wal.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+fGY4ACgkQmOOfHg372QTOBQCg43mgDkWsOLOaetJdCYlnvKWq

Re: [sqlite] the xRead method in sqlite3_io_methods

2012-04-26 Thread Roger Binns
then you'll need to keep repeating until you have the amount requested. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+ZyCYACgkQmOOfHg372QRDIQCgyo8nARHPfB3KUYjv/vpS5xWz ZTkAni/JaeSFlNVJjO0xRHTqqtxCyVib =cSZL -END PGP SIGNATURE

Re: [sqlite] the xRead method in sqlite3_io_methods

2012-04-26 Thread Roger Binns
the header page which doesn't exist at that point in time. At all other times a short error is fatal. The extended error code is so that the caller has more details than just I/O error. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk

Re: [sqlite] sqlite3 column widths

2012-04-24 Thread Roger Binns
to modify it, redistribute it etc. You can modify the code to work however you want. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+XEG0ACgkQmOOfHg372QRCpgCdEVfimkFYA8kx3WQixtfEVEAs DpEAoLY1FVYSbQVNZoRM0dTa1fmUbsKj =uuvW -END PGP SIGNATURE

Re: [sqlite] SQLITE3 64-bit version

2012-04-23 Thread Roger Binns
the Windows 64 bit with Microsoft compilers, but 32 bit with both MinGW and Microsoft. Is there anything that lead you to believe it wouldn't work or there may be issues? Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+Vs

Re: [sqlite] SQLITE3 64-bit version

2012-04-23 Thread Roger Binns
amalgamation directly into your application where you can control compilation options, versions and builds (eg 32 or 64 bit). The precompiled binaries below are for some additional tools and those who do not have access to a compiler. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11

Re: [sqlite] National characters in database names on linux

2012-04-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/04/12 04:27, Richard Hipp wrote: The developer of Calibre is mistaken. It also isn't the first time: http://lwn.net/Articles/465311/ Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk

Re: [sqlite] query help with inline conversion of hex data

2012-04-18 Thread Roger Binns
This applies when databases are in the most likely utf8 encoding. In utf16 encoding each character is two bytes(*). 'pragma encoding' will tell you which is in use. (*) Unicode is more complicated than that. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk

Re: [sqlite] query help with inline conversion of hex data

2012-04-18 Thread Roger Binns
extensions that can provide the function although it will also require SQLite to have been called to enable them which is unlikely. If your final output can be html then you could output the field as is, and have some Javascript that finds them and converts to text. Roger -BEGIN PGP SIGNATURE

Re: [sqlite] query help with inline conversion of hex data

2012-04-18 Thread Roger Binns
, but presumably it can call external binaries/scripts. Maybe the user groups will have some advice on other approaches. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk+PSyYACgkQmOOfHg372QQ9/gCgwOYadJdd5HaO+Vl3TatT85nW PowAoJZXUHv/mwzBwM+IY7CvFRaoSnZu =Kp6j -END PGP

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Roger Binns
://web.archive.org/web/20091014161106/http://interglacial.com/~sburke/tpj/as_html/tpj22.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk96ODwACgkQmOOfHg372QTOOgCZAQ95J0sYZZYU5LkmxA2+WtoV 8VQAoMy1FH/wiuaekSIdyspXIGt1pc+1 =ehka -END PGP SIGNATURE

Re: [sqlite] SQLite Profiler

2012-03-30 Thread Roger Binns
use EXPLAIN (not EXPLAIN QUERY PLAN) information. To a first approximation, the more longer the resulting output the more steps are being taken and the more complex your query is, so you should try to keep them short. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] question about zipvfs performance

2012-03-25 Thread Roger Binns
likely a reduction in size. SQLite's data encoding is quite compact so fairly random data won't compress that much. Current hard drives have internal buffers of 16 or 32MB. You'd have to write a heck of a lot of data to fill that and operating system buffers. Roger -BEGIN PGP SIGNATURE

Re: [sqlite] Could/should Windows build of SQLite use #define

2012-03-25 Thread Roger Binns
violated one of the conventions It also dates from the early 80s so I don't really fault Microsoft employees for not having a time machine. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9vfH4ACgkQmOOfHg372QS8wACeI/MSXOopVGOzzusymU2x1nXD

Re: [sqlite] 64-bit Windows Command Shell

2012-03-25 Thread Roger Binns
from slow spinning media to a ramdisk, and how the memory consumed by the ramdisk is then not available for program usage or caching of non-ramdisk media. You were talking about caching of ramdisks themselves. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] 64-bit Windows Command Shell

2012-03-24 Thread Roger Binns
than an SSD-based DB - remains to be seen - but the 2GB experiments seem to show that in-memory is quite promising. Any memory used to store databases is memory that cannot be used for I/O caching. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] 64-bit Windows Command Shell

2012-03-24 Thread Roger Binns
the database itself Your databases should be many times the size of scratchpads so that is where you will get the best effect. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9ueckACgkQmOOfHg372QS9nwCcDRZdLxActvFKUnhh40xyByxW uGsAoMdUBYTGG4sDaghF0NsnE8/vZf5f =p17y

Re: [sqlite] 64-bit Windows Command Shell

2012-03-24 Thread Roger Binns
in time be it caching or for process heap and code. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9ue0AACgkQmOOfHg372QTYOQCgwq8U2/NmEMqrbt5OlQdwTXVX JDgAn0zFcIxaEa8r43Cbi6W5U+NwdcL8 =1tE1 -END PGP SIGNATURE

Re: [sqlite] Could/should Windows build of SQLite use #define

2012-03-24 Thread Roger Binns
combinations of the Microsoft dev tools and sdks. It doesn't happen on the combination I use. (Use is also constrained for binary compatibility reasons.) A shame to have to deal with this bad behavior from Windows.h... Indeed. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU

Re: [sqlite] 64-bit Windows Command Shell

2012-03-24 Thread Roger Binns
somewhere so that isn't inherently a waste. The only waste would be CPU managing a cache that gets no hits. But since CPU is so many orders of magnitude faster than I/O it doesn't really matter. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] NaN in, 0.0 out?

2012-03-24 Thread Roger Binns
was converted to NULL during calculations, or also stored that way. As someone else pointed out, NaNs and NULLs have very similar properties which is presumably why this approach was chosen. I have no idea what the standard says, but this also appears relevant: sqlite select typeof(1.0/0); null Roger

Re: [sqlite] User input checking

2012-03-23 Thread Roger Binns
/interrupt.html I need to check that the input ... That approach requires you to have perfect code and not get outwitted. If I was an attacker I'd be trying hex constants and unicode tricks. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9sKekACgkQmOOfHg372QTPfwCeK

Re: [sqlite] User input checking

2012-03-23 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I also forgot to mention doing all that stuff on a second connection. Open that one read-only (SQLITE_OPEN_READONLY). You can also double check a statement makes no changes: http://www.sqlite.org/c3ref/stmt_readonly.htmla Roger -BEGIN PGP

Re: [sqlite] User input checking

2012-03-23 Thread Roger Binns
. The requirement is for a user to type some or all of an arbitrary SQL statement and then be able to execute that statement against SQLite without harm happening. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9szQcACgkQmOOfHg372QQNQQCfdxINH0/H3g6dXuwQ95l/G9zQ

Re: [sqlite] 64-bit Windows Command Shell

2012-03-21 Thread Roger Binns
of the shell operation do you believe is limited by RAM and how did you work that out? Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9qFpoACgkQmOOfHg372QRL7gCgmWpOxSgcuh1kvjwepNRJSGuy +JoAoIWoBPGk4aMzxor8fbNCLNsMEQm5 =QSVU -END PGP SIGNATURE

Re: [sqlite] 64-bit Windows Command Shell

2012-03-21 Thread Roger Binns
just let the OS do its own caching. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9qK2IACgkQmOOfHg372QQVdwCfbJTAzhCPR4ARPxhYHewLvvcT 4lYAoI4QFXFfxILtsQGxVWm8BRM/mbIX =e0aW -END PGP SIGNATURE- ___ sqlite-users

Re: [sqlite] 64-bit Windows Command Shell

2012-03-21 Thread Roger Binns
bandwidth is not saturated then you'll get an appropriate speedup/concurrency. However again you seem to be seeking out some magic bullet. There isn't one. You'll only get good answers by running your own workloads. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] VACUUMing large DBs

2012-03-20 Thread Roger Binns
of database. Again SSDs will help since the penalty of a RAM/cache miss is less than with spinning media. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9o9ksACgkQmOOfHg372QRIygCgrCnBL5osiqWR+W1bHjLgDwZZ VAoAoN0gKsJU35myHrlFEerHwLnXjyjY =yAEn -END PGP

Re: [sqlite] VACUUMing large DBs

2012-03-20 Thread Roger Binns
. However the data is gathered from various SMART attributes so in theory it is also possible to calculate on other platforms. http://ssd-life.com http://ssd-life.com/eng/how.html My workstation's drive is apparently good till 2029. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU

Re: [sqlite] decimal function not found

2012-03-20 Thread Roger Binns
functions using this API: http://www.sqlite.org/c3ref/create_function.html It looks like the closest to what you want is the round() builtin. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9pV6MACgkQmOOfHg372QRvKgCgy7m+Q/914E77+bNX1yUOYyrg

Re: [sqlite] Do we need locking with multithread off ?

2012-03-17 Thread Roger Binns
that they shouldn't be zero length. (I'm assuming your want your database to survive unexpected power failures) Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9kLV0ACgkQmOOfHg372QSzjwCfUQmZkUozJxUoq3lPL+3tmfhv CeoAn1qBc3UI/UVSUK9ERiC2PwR/0DY/ =m9TS -END PGP

Re: [sqlite] Do we need locking with multithread off ?

2012-03-16 Thread Roger Binns
the database inadvertently (which you may not discover for a while). There really isn't any point trying to micro-optimise this stuff. It won't make a performance or memory difference, and it requires perfection from developers, system administrators and future versions of yourself. Roger

Re: [sqlite] SELECT that returns the name of the fields

2012-03-12 Thread Roger Binns
If you have a SELECT then you can see what the associated names for each column of the result are by using sqlite3_column_name: http://www.sqlite.org/c3ref/column_name.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9ebw4ACgkQmOOfHg372QT26QCg1xAarj3w

Re: [sqlite] Building an SQLite Extension: How to check if a table exists in the database?

2012-03-11 Thread Roger Binns
. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9c3YUACgkQmOOfHg372QROAQCgolj9gZ2tngnJ2rPeGJP1/B1H sc8AnA2tXt2cubC4r6es82M6X1+pGRQp =mxxS -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Building an SQLite Extension: How to check if a table exists in the database?

2012-03-09 Thread Roger Andersson
='tablename'; /Roger ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug? Empty string stored as NULL?

2012-03-08 Thread Roger Binns
an empty string? Yes, store an empty string. sqlite create table a(a text); sqlite insert into a select ''; sqlite insert into a select null; sqlite select * from a; sqlite select typeof(a) from a; text null sqlite select 'X' || a || 'Y' from a; XY sqlite Roger -BEGIN PGP SIGNATURE

Re: [sqlite] Bug? Empty string stored as NULL?

2012-03-08 Thread Roger Binns
could tell the difference between the null value (shown in red) and a string (shown in yellowish). You can also tell the difference between the integer 3 and the string 3 due to the colour. Makes life a lot easier. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] Once again about file change counter

2012-03-07 Thread Roger Binns
is a separate file than the database file. Since backups are made under app control they can be done at logical points for the user, and possibly even annotated as to why they were made. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] SQLite bug?

2012-03-07 Thread Roger Binns
'interpolate' module use existing tables? It is also worth pointing out that table names, column names and column types live in separate namespaces. This works just fine: sqlite create table a(a a); sqlite Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] SQLite bug?

2012-03-07 Thread Roger Binns
details will matter like exactly where the sqlite3_stmt come from etc. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9YTS8ACgkQmOOfHg372QRB+gCfeC5UIHZoP9Pqat+GAHeZcd1K xfAAn3T/pnHWoYl/T8qwHMehqE1WQevz =yy/w -END PGP SIGNATURE

Re: [sqlite] Once again about file change counter

2012-03-06 Thread Roger Binns
would want those history points to be well chosen. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9VyTUACgkQmOOfHg372QS5rACg5W75WhMahjLRGEYA5o1HCubT v0YAoORedNP1OPQPQWeP7fL7paTPGI3o =jXRA -END PGP SIGNATURE

Re: [sqlite] Once again about file change counter

2012-03-06 Thread Roger Binns
for backups. It could checksum pages being written and only save one copy per checksum. Consequently every time you backup to it only changed pages would be stored/added to the backup file. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] Tuning a SQLite database for best compression

2012-03-05 Thread Roger Binns
require considerably more temporary space to work out each row before reconstructing the database. Similarly you may be able to use a custom binary delta encoding that uses fewer bits to encode each row. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9U

Re: [sqlite] Sqlite Bug Report!

2012-03-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 When I compile sqlite3 in VC++6.0, it does not work, but in VS2010 it can work. http://www.beiww.com/doc/oss/smart-questions.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9Q

Re: [sqlite] Interchangeably using SQLite .db file between desktop and android mobile device

2012-03-02 Thread Roger Binns
and example code: http://developer.android.com/resources/samples/SampleSyncAdapter/index.html If you want to ignore all that then you can use adb push/adb pull from the Android dev kit to transfer files between a computer and an Android device. Make sure you also transfer the journals. Roger -BEGIN

Re: [sqlite] Interchangeably using SQLite .db file between desktop and android mobile device

2012-03-02 Thread Roger Binns
as possible so they can be mixed and matched with an app or across apps. ContentProvider is one of those decoupling APIs for data. http://developer.android.com/guide/topics/fundamentals.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] Interchangeably using SQLite .db file between desktop and android mobile device

2012-03-02 Thread Roger Binns
apps for specific platforms if you wanted deeper integration on those. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9RJhUACgkQmOOfHg372QRLrQCeJeEQ+Osth0TssuEfkpHfH8hv xPoAoOJIKSgy9CL9fLVFxHFKKkz9FWOY =Aqb8 -END PGP SIGNATURE

Re: [sqlite] Sqlite3 command shell dump possible bug

2012-03-02 Thread Roger Binns
really don't want it to happen again. Here is how to corrupt a SQLite database: http://www.sqlite.org/howtocorrupt.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9RVc8ACgkQmOOfHg372QQQ3gCfZBxh6oxaZ2OXhYDB9xsK7+BT 38IAnj7aiKugfj1w6/L1GbWfvkAsAz9/ =wWdx

Re: [sqlite] Sqlite3 command shell dump possible bug

2012-03-02 Thread Roger Binns
a SQLite database, nor will other forms of power failure. You can get corruption if the drive or controller lie about content being synced during a power failure, but you should fix the drive/controller. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] DISTINCT bug with 3.7.10

2012-03-02 Thread Roger Binns
, created a ticket, fixed it and added it to the test suite. For some reason they don't tend to mention this on the mailing list. If you follow the timeline you can tell. http://www.sqlite.org/src/info/3557ad65a0 Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] Constraint error messages

2012-02-29 Thread Roger Binns
://www.sqlite.org/src/tktview?name=23b2128201 I think (but have not tried) that you can make a user defined function and have that do the checks. It can then either directly error, or put a message in a buffer somewhere that you can retrieve on constraint failure. Roger -BEGIN PGP SIGNATURE

Re: [sqlite] Constraint error messages

2012-02-29 Thread Roger Binns
of the constraint. A higher level approach depends on a 'raise' function, so A AND B AND C can be rewritten to (A OR raise('A')) AND (B OR raise('B')) AND (C OR raise('C')) There is a reason developers have gone to the trouble of naming their constraints! Roger -BEGIN PGP SIGNATURE

Re: [sqlite] Set Locale for upper() and lower() using a pragma variable

2012-02-29 Thread Roger Binns
. You can simply register your own lower/upper with one argument that looks wherever you want to know what locale to use. It will not affect the one registered by ICU for two arguments. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] Bug hunting in SQLite

2012-02-26 Thread Roger Binns
to set the --freelist-vol flag to a huge number to ensure freed memory is never reused - this is especially good at catching problems in long running programs. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9KkgUACgkQmOOfHg372QRGFACfRr2G/0Pvs2zi6Sr+KM/oodVC

Re: [sqlite] Bug hunting in SQLite

2012-02-26 Thread Roger Binns
problems. By far the safest thing to do is to either only do SQLite activity in one thread, or to give each thread its own sqlite3 connection. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9KtQ0ACgkQmOOfHg372QTkBgCfVM5gyI43xzd8t3XF7P5BZnPh +Y8An1+h4d2

Re: [sqlite] SQLite, portable, image store

2012-02-25 Thread Roger Andersson
On 02/25/12 19:35, Stewart wrote: In fact I would like my first project to be a database of all my photos. This might not be the response you was hoping for but Coppermine might give you some ideas regarding a database with all your photos? http://coppermine-gallery.net/ -- Roger

Re: [sqlite] xFilter or xBestIndex needs to know which columns were selected

2012-02-24 Thread Roger Binns
. In your vtab implementation you can always start out by only getting the cheap columns until xColumn tells you that one of the hidden/expensive ones is needed and then go off and redo the underlying query. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] SQLite shell dot commands

2012-02-24 Thread Roger Binns
. The issue that OP has is that the shell strips off one level of quoting under some circumstances (dot commands), so there are situations where you effectively have to quote names twice. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] best way to use sqlite as application's format

2012-02-22 Thread Roger Binns
thing I worked on didn't even have a 'save' menu item. Every action you did resulted in a database change. You could easily undo these. You could also see of the objects as they were at any prior point in time, being able to undo or redo any change. Roger -BEGIN PGP SIGNATURE- Version

Re: [sqlite] Help request for a query...

2012-02-19 Thread Roger Andersson
) VALUES ('c:\', (select count(*)+ifnull(Hits,1) from History where path='c:\')); sqlite select * from History; Path|Hits c:\|3 -- mvh Roger ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help request for a query...

2012-02-19 Thread Roger Andersson
On 02/19/12 23:04, Igor Tandetnik wrote: The same can be achieved in a less convoluted manner: insert or replace into History (Path, Hits) VALUES ('c:\', (select ifnull(Hits, 0) + 1 from History where path='c:\')); Thanks Igor! -- Roger ___ sqlite

Re: [sqlite] Faster alternative to sqlite3_blob_open

2012-02-17 Thread Roger Binns
- A vacuum every now and then after periods of writes will help Roger ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Faster Alternative to sqlite3_blob_open

2012-02-17 Thread Roger Binns
open that you no longer want to use, and can only be used to point to a different row of the same table. The functions are complementary to each other, not alternatives. Your observations match the documentation as expected. Do you have a question? Roger

Re: [sqlite] sqlite3 windows command line: writing the sql errors to a file (and not to the screen)

2012-02-16 Thread Roger Andersson
On 02/16/12 19:48, Gert Van Assche wrote: I have put this line in a batch file: dbscript.cmd and I just execute this on the command line. (or via a Windows shortcut on my desktop) This works fine, but I would like to redirect the echo to a file, so that I can capture the errors that might occur

Re: [sqlite] Support EXTRACT SQL standard function

2012-02-12 Thread Roger Andersson
| 02| 12 | +--+---+-+ -- Roger ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Support EXTRACT SQL standard function

2012-02-12 Thread Roger Andersson
: 4 2012-02-12 19:20:55 19:20:55 (two first are same due to sqlite [or perl DBI binding?] seems executes one row ahead). But do they use same cached value *within one row*? If not, results may be randomly inconsistent and broken (race condition). No idea! /Roger

Re: [sqlite] custom property db/editor

2012-02-10 Thread Roger Binns
of operational history is always the right answer and developers doing things this new fangled way will remake the old mistakes and learn their lesson eventually.] Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk82DcsACgkQmOOfHg372QQNfACgvmUwe4h/OZk2bluxzB1WY6Jh

Re: [sqlite] Query on Sqlite3 in an Android app

2012-02-09 Thread Roger Binns
then it will work fine as an asset. If you need random access then it can still work as an asset but you need to make sure the file is not compressed in the apk. (Random seeks in a compressed file are very slow.) Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux

Re: [sqlite] Interpolation

2012-02-08 Thread Roger Binns
it later.) If you are working with shorter periods (eg a day) then you can also create temporary tables putting in the missing values. But if you absolutely need every value to be present for arbitrary SQL queries then virtual tables will pretty much be the only transparent thing. Roger

Re: [sqlite] About new ticket Per page/region checksums

2012-02-07 Thread Roger Binns
to control turning it on/off which likely would also involve a vacuum to rewrite the pages. Finally I'd also want the full integrity check to actually read and check every page. Or in other words, a more complete implementation is possible when written into the core. Roger -BEGIN PGP SIGNATURE

Re: [sqlite] About new ticket Per page/region checksums

2012-02-07 Thread Roger Binns
sufficient for, it is certainly enough, way better than what we already have and not as disruptive. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8xiAcACgkQmOOfHg372QR26wCdG2pjahqw6NAW5XB7oeuBRg3U /sYAn16crIpmamTSK/WVetJh4VomvcmI =943A -END PGP SIGNATURE

Re: [sqlite] Interpolation

2012-02-07 Thread Roger Binns
a statement, finds neighbouring readings and returns the interpolated result - eg `select reading(2012-01-01T012345)` Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8yKgAACgkQmOOfHg372QQxBgCfd07QCC8/f2caqq4d0EZLHg67 d0UAoKcm/eVV/MsUdGk+XgHnXuDWXOLJ =OGRj

Re: [sqlite] About new ticket Per page/region checksums

2012-02-06 Thread Roger Binns
integrity protection (and in some cases recovery), but approximately zero percent of the systems out there running SQLite do not have the databases stored in such a configured filesystem today. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8wJ

Re: [sqlite] About new ticket Per page/region checksums

2012-02-06 Thread Roger Binns
to the contents being different than what SQLite wrote hence points fingers at the operating system and storage. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8wN6oACgkQmOOfHg372QTDnACgmHiKBZ43TbYlVGPRxN5a9UF5 uGkAoIbjVsjuA7IuATyC/0M2IDDE6IJN =o4lD -END

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Roger Binns
to remove it, nor is there is any conceivable reason to do so. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8wQMcACgkQmOOfHg372QROzACgqxESS5vKgz1CK5GAxeHFsNPV pq8An39N2qFS5OnWxCKcQ1dCEXxRehsT =zsOv -END PGP SIGNATURE

<    1   2   3   4   5   6   7   8   9   10   >