From the ftruncate page: If the file size is increased, the extended
area shall appear as if it were zero-filled.
It doesn't have to write zeros, just act like it did.
--David Garfield
On Tue, Jan 24, 2012 at 08:19, Simon Slavin slav...@bigfraud.org wrote:
On 24 Jan 2012, at 6:43am, David
, without actually zero filling anything.
Having said that, I would expect certain operating systems (like DOS)
to actually do the zero-filling and complete it before returning from
the call.
--David Garfield
On Tue, Jan 24, 2012 at 14:00, Simon Slavin slav...@bigfraud.org wrote:
On 24 Jan 2012
the datatype listed on the
column as a hint, then I can't help you.
--David Garfield
On Tue, Jan 17, 2012 at 19:32, Bill McCormick wpmccorm...@gmail.com wrote:
I'm trying to write a function with a sig like this:
int BindParameter(sqlite3_stmt* stmt, int sqlType, const char* pname,
char
know how this compares in terms of performance with Igor's solution.
--David Garfield
On Fri, Jan 13, 2012 at 06:07, Dilip Ranganathan misc.us...@gmail.comwrote:
I have a table that looks like something like this:
timestampvalue person
are there only
so that the SQL command and the API user can be matched up, particularly
when one or more value need to be reused.
--David Garfield
On Wed, Jan 11, 2012 at 19:01, Steven Michalske smichal...@gmail.comwrote:
On Tue, Jan 10, 2012 at 4:11 PM, Simon Slavin slav...@bigfraud.org
wrote:
On 10
http://www.sqlite.org/lang_createtable.html#rowid
Simon.
If I am reading that page correctly, AUTOINCREMENT is not permitted in
this context. Is that right? Or are the diagrams incomplete in this?
(I will admit that it doesn't really make sense for a multi-column
constraint.)
--David
software, but in communications,
you can't even trust yourself.)
http://xkcd.com/327/
--David Garfield
Simon Slavin writes:
On 14 Nov 2011, at 5:53pm, Dotan Cohen wrote:
I recommend against formulating the SQL statements in Javascript.
Because if I find that page, I _will_ try to inject my
Sounds like it could be a difference in calling convention... Check
compile options and function declaration modifiers.
--David
Stuart Thomson writes:
Hi,
I'm in the middle of porting sqlite3 to a new Operating System and have come
across a problem with the sqlite3OsRead function in the
Also, if this is debugger output (as it appears), it could be that an
optimizer is confusing the parameters. I see that all the time on GCC
i386 when I set a breakpoint at the start of a function.
--David
David Garfield writes:
Sounds like it could be a difference in calling convention
are at it.
(Actually... should it really be a string in the first place?)
3) digits[] may be insufficient in some cases (though not in your
samples).
--David Garfield
ChingChang Hsiao writes:
The purpose of function antok is that solve the problem of order by cli_id.
Function antok converts
at least, these
are treated as 0. This might be system dependent or undefined
behavior.
3) It says nothing about non-integer values of Y. For me at least,
they are truncated (not rounded), so round(1.234,1.8) is 1.2.
Again, this might be system dependent or undefined behavior.
--David
-dangerous.
That sqlite3_errmsg() had to guess and guessed wrong is not
surprising.
--David Garfield
Krystian Bigaj writes:
Hi,
Documentation says that:
The only exception is that if SQLite is unable to allocate memory to hold
the sqlite3 object, a NULL will be written into *ppDb instead
WHERE or HAVING clauses that refer back to named results could be a
problem with the simple replacement.
SELECT a,b,a+b AS ab FROM t WHERE ab10
Igor's suggestion work there too.
--David Garfield
Simon Slavin writes:
I'm trying to write some code which has to be useful under many
COUNT(*) FROM t1, t2;
SELECT (SELECT COUNT(*) FROM t1) * (SELECT COUNT(*) FROM t2);
Of course, those are special cases. Application programmers should
probably watch for this kind of thing, but it probably wasn't what the
programmer wanted to count in the first place.
--David Garfield
is magic for a INTEGER PRIMARY KEY column.
Use NULL instead of '0' in both platforms.
--David Garfield
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
in the first place.
Or use a binary blob instead of a hex dump of it, and use (note the
x):
SELECT * FROM recordings WHERE key =
x'4df0247ce1a97685a782d2cb051b48ed952e666c';
--David Garfield
Eric Anderson writes:
The below statement returns records:
SELECT * FROM recordings WHERE key LIKE
to a terminal. I think the only easy way to externally
disable the buffer is to wrap the program in a pseudo-tty.
Alternatively, look for an option that lets you explicitly unbuffer.
(for instance, in perl, do: $| = 1; )
--David Garfield
Patrick Proniewski writes:
On 27 sept. 2011, at 18:31, Roger
Patrick Proniewski writes:
On 27 sept. 2011, at 20:14, David Garfield wrote:
Any entry in a pipe could be buffering. In a quick test here, awk is
buffering. To find the buffering, try using the pieces up to a given
stage with | cat added at the end. If this buffers, you've found
Roger Binns writes:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/23/2011 05:51 PM, David Garfield wrote:
SQLite's API supports both (mostly). Internally, you must use one or
the other (or hideously duplicate code),
Not really. If your own code only uses NUL termination
replace the built-in functions. You should not
have to.
--David Garfield
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
to not have to count the length of strings.
--David
Roger Binns writes:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/26/2011 01:13 PM, David Garfield wrote:
In documented one case
(prepare), NULs are string terminators even with the count, and there
is an extra optimization you may
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
--David Garfield
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin
text and would like to have the text portions
at least be visible.
I suspect that at least part of this problem came from SQLite's
history as a TCL add-on. I suspect TCL, at least in it's early days,
didn't allow NUL in a string.
--David Garfield
Richard Hipp writes:
On Thu, Sep 22, 2011 at 7
Roger Binns writes:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/23/2011 08:47 AM, David Garfield wrote:
But that is the point. Strings are generally defined in two ways.
Either:
1) a pointer, and count every byte up to but not including a NUL.
2) a pointer and a length
Without the hex() calls, you can't even tell what worked and what didn't.
--David Garfield
Mira Suk writes:
On 9/21/2011 21:22 Igor Tandetnik wrote:
You can include the NUL terminator, if you want it to actually be stored
in the database.
Igor Tandetnik
for this optimization has changed.
Having said this, it may well be reasonable to leave the test in place
in case you someday choose to stop using the struct hack (which is
undefined behavior as well), knowing that the compiler will optimize
out the dead test.
--David Garfield
Richard Hipp writes
I think you are right, that it is too easy, at least on its own. You
also should account for partial writes.
I think the general rule is: if it wrote anything, it tells you how
much it wrote, which can be everything you asked it to write, or less.
If it wrote nothing, it usually returns -1 and
ways to waste ones time.
Having said that, let me present a database for consideration: Any
filesystem. Split the hex of the MD5 into directory levels and make
what you need. Might be slower, particularly with some OSes, but the
tools are easy.
--David Garfield
or blob.
--David Garfield
Jan writes:
On http://www.sqlite.org/cvstrac/tktview?tn=3806
this bug is fixed.
But I still get a NULL with group_concat(distinct x) with the latest
windows sqlite shell:
SQLite version 3.7.7.1 2011-06-28 17:39:05
Enter .help for instructions
Enter SQL
is the batches.
--David Garfield
Simon Slavin writes:
On 28 Jul 2011, at 2:22am, Stephan Wehner wrote:
There are some benchmark's at
http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html
I don't have anything to point to, but I thought sqlite3 does better
than stated there.
i
you know a full table scan is acceptable.
--David Garfield
Michael Stephenson writes:
Wondering if anyone has a way to execute a query that selects rows based on
a list of rowids and returns the results in the order of the rowids passed
in.
Thanks,
~Mike
Wonderful.
The other answer is that one probably should not have a table with
seven columns and one row when one could have a table with two columns
(day of week and value) and seven rows. Like the view you are
suggesting.
--David
Nico Williams writes:
On May 11, 2011 7:14 PM, John
imagery.
--David Garfield
Enrico Thierbach writes:
Hi,
I think an R Tree is what you are after.
http://www.sqlite.org/rtree.html
/eno
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo
http://www.sqlite.org/lang_datefunc.html
This page has an error in documenting the range of values when using
modifier 'unixepoch'. It says the limit is 10675199167. There should
be one more digit in that to get the documented year 5352 result.
--David Garfield
Mihai Militaru writes:
On Thu
they are uniform).
--David Garfield
Simon Slavin writes:
On 21 Apr 2011, at 12:34am, Andrew Lindsay wrote:
I am trying to search an SQL database that is meant to have entries logged
every minute for a period of approximately 15 months.
I want to create a query that will search
A bit redundant, but how about:
CREATE TABLE table_a (akey integer, avalue float);
CREATE TABLE table_b (bkey integer, bvalue float);
INSERT INTO table_a (akey, avalue) VALUES (1, 1.0);
INSERT INTO table_a (akey, avalue) VALUES (2, 2.0);
INSERT INTO table_a (akey, avalue) VALUES (3, 3.0);
Nice.
For general use, you may also need to include duplicates in od. For
the GNU coreutils and Solaris 10 implementations, this would be the -v
or --output-duplicates option.
--David Garfield
Kees Nuyt writes:
On Wed, 30 Mar 2011 12:51:11 -0400, Santin, Gloria
sant...@westinghouse.com wrote
37 matches
Mail list logo