On 2018-01-26, at 17:05, J Decker <d3c...@gmail.com> wrote:
> On Fri, Jan 26, 2018 at 1:21 PM, Peter Da Silva <
> peter.dasi...@flightaware.com> wrote:
>> Sqlite uses NUL as the string terminator internally, the published API
>> specifies has stuff like this all
Sqlite uses NUL as the string terminator internally, the published API
specifies has stuff like this all over the place:
> In those routines that have a fourth argument, its value is the number of
> bytes in the parameter. To be clear: the value is the number of bytes in the
> value, not the
On 1/26/18, 2:34 PM, "sqlite-users on behalf of J. King"
wrote:
> Do you have a point in making either statement? If you do, I'm really not
> seeing it.
The point is that apart from CP/M and derivatives like DOS,
On 1/26/18, 2:11 PM, "sqlite-users on behalf of John McKown"
wrote:
> In the distant past (CP/M-80), the filesystem meta data did not include the
> actual _length_ of the data for a text data file.
Since
On 1/26/18, 1:37 PM, "sqlite-users on behalf of J Decker"
wrote:
>doesn't get 26 either. 0x1a
26 isn't EOF, it's SUB (substitute). It was used to represent untranslatable
characters when converting (for example)
On 1/26/18, 12:40 PM, "sqlite-users on behalf of J Decker"
wrote:
> reads the bytes and does things with them. the EOF would get returned with
> fgetc() but not the character.
Fgetc returns an int, not a byte. That
On 1/26/18, 12:31 PM, "sqlite-users on behalf of J Decker"
wrote:
> ctrl-z was end of file text character in DOS (wrote char 26; not FF)
DOS wasn't an operating system.
On 1/26/18, 12:12 PM, "sqlite-users on behalf of Keith Medcalf"
wrote:
> Actually, EOF (0xFF) *is* part of a text file, and is the byte in an ASCII
> byte-stream that indicates end-of-file. In the "old days" the
On 1/26/18, 8:24 AM, "sqlite-users on behalf of Gary R. Schmidt"
wrote:
> But how would you differentiate EOF??? (Let me guess, 0. :-) )
End of file is not part of the contents of the file or a string.
What is the goal of this discussion? Changing the string terminator SQLite
uses? I think it's almost 50 years too late for that, but I'm sure that if
Unicode and UTF8 had been a thing in 1970 then C would have selected FF as the
string terminator.
On 1/17/18, 11:07 AM, "sqlite-users on behalf of Jens Alfke"
wrote:
> If I were tackling this, I’d look for an open-source CSV parser/generator
> library. Once you have that, the part that reads/writes the rows to
On 1/16/18, 10:29 AM, "sqlite-users on behalf of petern"
wrote:
> https://sqlite.org/csv.html
BTW typo on that page:
“The example above showed a single filename='th3file.csv' argument for the CSV
On 1/16/18, 8:12 AM, "sqlite-users on behalf of Don V Nielsen"
wrote:
> Off topic question regarding fix: "0!=(wctrlFlags & WHERE_ONEPASS_MULTIROW)"
> Is there a performance bonus or compiler optimization if one
I would have thought that the logical platform-independent scripting language
to use with sqlite would be tcl. By default tcl comes with sqlite built in, so
you don’t even need to compile anything.
___
sqlite-users mailing list
These are different requests in SQL.
"ID = NULL" is comparing the ID to "NULL". Comparing any value to "NULL" fails.
This is equivalent to
SELECT ID FROM Tbl WHERE FALSE;
A smarter query planner would run it in zero ms. :)
"ID IS NULL" is checking if the value in ID is null.
Neither will
> Ok. I've read the Document and I think I may be having a rouge thread issue.
> I hope not since I use synclock in my code when ever a thread is attempting a
> write to the database. That seems like the only issue from that page that I
> may be doing. I could have up to 30 or more threads
I don’t see what the problem is, do you not expect a newline at the end of the
line in a file?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
On 12/27/17, 2:23 PM, "sqlite-users on behalf of Simon Slavin"
wrote:
> Fair point. Automatic de-duplication would be more beneficial. And it
> wouldn’t require extreme cleverness to be separately written into
On 12/27/17, 12:14 PM, "sqlite-users on behalf of Simon Slavin"
wrote:
> Would running git/fossil on a filesystem like that solve the problem ?
You would have to modify it to use the new APIs for things like
I suspect you would be best advised to do more processing of the data to
extract just the email addresses rather than treating it like an unstructured
text blob.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
What I don’t understand is this app that’s making SQLite calls, so it’s using
the SQLite library, and it’s expecting a result from updates and inserts?
That seems like a bug or design flaw in the application.
Possibly it’s looking for the number of rows effected result and not finding it
for
SELECT name, address
CASE behaviour
WHEN 'nice' THEN SELECT toy FROM stocking_stuffers ORDER BY random() LIMIT 1
WHEN 'naughty' THEN 'coal'
ELSE phnglui mgwlnafth cthulhu
END
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
On 12/14/17, 12:08 PM, "sqlite-users on behalf of Simon Slavin"
wrote:
> Just to remind you that if something is not documented it can change. The
> next version of SQLite might decide that 1 / 2 is 0. So don’t
This seems like a job for regular expressions.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
I’d recommend expr {double($temp)} so the bytecode compiler can optimize the
expression.
On 12/6/17, 8:40 AM, "sqlite-users on behalf of Cecil Westerhof"
wrote:
return [expr double(${temp})]
Like
expr {sqrt($foo) < 3.7 && $bazflag > 0}
Instead of
expr sqrt($foo) < 3.7 && $bazflag > 0
Same for the first argument to “if”, second argument to “for”, etc.
On 12/4/17, 9:27 AM, "sqlite-users on behalf of Cecil Westerhof"
>> What about time resets to the epoch which are not restored, user time
>> changes,
>
> I know some systems at least increment the node each time a time change is
> detected. It will take 2^47 time changes to roll over. Since the node part is
> not relevant to SQLite, this is perfectly safe.
Ah, I see someone else has already brought up version 1 UUIDs.
> What about invalid and reused MAC addresses and devices with no MAC address
> at all?
Not an issue with SQLite since that part of the UUID is a constant within a
given database. It would be reasonable to simply pick "0" then set
Are people here talking about UUIDs or things that just look like UUIDs? It
sounds like the latter. UUIDs are actually structured objects, with embedded
type bits. There are multiple UUID generation schemes, one of which is based on
random numbers, others are based on hashes, and there is the
On 11/22/17, 1:43 AM, "sqlite-users on behalf of R Smith"
wrote:
> Oh there are many valid reasons why to have Order in data, one I use
> regularly is to dictate the process flow in manufacturing where some thing
>
On 11/21/17, 9:54 PM, "sqlite-users on behalf of jose isaias cabrera"
wrote:
> But, whatever it is, I will be part of the next phase of communication.
This.
___
On 11/21/17, 11:21 AM, "sqlite-users on behalf of Warren Young"
wrote:
> You don’t get proper threading with the current ticket comment system, but
> both mailers I use these days lack that feature, as do most forum
I’m a mailing list fan, too. Reddit I use for yucks only.
On 11/21/17, 10:48 AM, "sqlite-users on behalf of Stephen Chrzanowski"
wrote:
All in all, just please, oh PLEASE stay away from redit I will not
On 11/21/17, 10:30 AM, "sqlite-users on behalf of Keith Medcalf"
wrote:
> I simply tell those people that they either (a) fix their systems or (b) use
> snail-mail. Takes care of the problem entirely.
I am
On 11/21/17, 9:59 AM, "sqlite-users on behalf of Keith Medcalf"
wrote:
> If you run an RFC complaint MTA then there is really very little problem with
> SPAM at all -- I have many connections per second rejected for
On 11/21/17, 8:52 AM, "sqlite-users on behalf of Dominique Devienne"
wrote:
> After re-inventing database and source-control, forum software next? :) I
> have no doubt it would be lean, fast, SQLite-based, in C
If you want to maintain something like a user-selected display order, I would
suggest adding an explicit “display order” column.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
Sqlite will perform the substitution of Tcl variables in a query. You can flag
the variable with a ‘$’ or with a ‘:’ (which makes it more like other SQL APIs).
So you can write:
$db eval {
SELECT Tea
FROM teaInStock
ORDER BY LastUsed DESC
On 11/16/17, 11:37 AM, "sqlite-users on behalf of Cecil Westerhof"
wrote:
> When I use:
> db eval {SELECT * FROM teaInStock} {
>puts $Tea, $Location
> }
puts takes a single string, so you can do
Wouldn’t you create a view instead, and not bother calculating age_at_issue
until necessary since it’s derived completely from two other columns?
On 11/15/17, 3:16 PM, "sqlite-users on behalf of Bart Smissaert"
Tk is platform independent, so long as you don’t do UNIX-specific stuff (eg,
assume UNIX file paths and stuff) any Tk app should work just fine on Windows.
You may need to tweak the fonts, eg:
if { $tcl_platform(platform) eq "windows" } { set font {Arial} } else { set
font {Helvetica} }
On 11/14/17, 10:32 PM, "sqlite-users on behalf of J Decker"
wrote:
> Initially I was interested in tcl/tk, and still am, but I'm not sure about
> the tcl/tk packaging that would be necessary to make use on multiple
>
I contacted the Tcl core team and this is the response from Steve Landers:
> tcl-lang.org was a temporary measure a few years ago when the .tk DNS went
> missing. It wasn’t advertised but I guess it is now.
> I’ve fixed it
The official site is still at tcl.tk.
On 11/14/17, 3:33 PM, "sqlite-users on behalf of Balaji Ramanathan"
wrote:
> I am leaning towards tcl/tk given the endorsement from both Peter and DRH.
> So, I downloaded tcl/tk version 8.6.7 from magicsplat
Since sqlite originated as a Tcl extension it’s got excellent Tcl bindings, and
Tcl has an excellent platform-independent GUI in Tk, so it seems to me that
would be the best and simplest way to create a GUI front end for sqlite.
___
sqlite-users
Looking back through the thread, from the original post:
> I'm using the amalgamation by default, so I don't think FTS is in the DLL. I
> can recompile, but that now introduces complications on machines that may not
> have this exact DLL. (A couple people in my company use this app)
The same
Also perhaps “page cache” rather than “pager cache”?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
On 11/9/17, 2:51 PM, "sqlite-users on behalf of Stephen Chrzanowski"
wrote:
> I've added a simple filter function that uses SQLites LIKE operator, but I'd
> like something a little bit more advanced. Right now, the
On 11/8/17, 8:20 AM, "sqlite-users on behalf of Richard Hipp"
wrote:
> The technical reason for this is that, from the point of view of the query
> planner, a WITHOUT ROWID table is really a covering index
So basically
The table contains a single row with a single column that contains a string.
That doesn't make it a string. It's still a table. When you say "select ...
from table" it doesn't matter where the table came from, it's still an
operation on a table. You are not performing "select ... from 'tab1';",
On 2017-11-05, at 05:28, Klaus Maas wrote:
> I thought it was because what SQL returns is a value (in this case a string)
> and not an object?
>
> The string value might be the same as the name of an object, but is not the
> object.
Select returns a table, not a name or a
On 10/25/17, 11:18 AM, "sqlite-users on behalf of Richard Hipp"
<sqlite-users-boun...@mailinglists.sqlite.org on behalf of d...@sqlite.org>
wrote:
> On 10/25/17, Peter Da Silva <peter.dasi...@flightaware.com> wrote:
> > Another question I have is... is an
On 10/25/17, 10:42 AM, "sqlite-users on behalf of Arno Gramatke"
wrote:
>Jens, Simon,
>
> thanks for your feedback and suggestions. I will take a closer look at
> keeping a "shadow“ copy in the current
There doesn’t seem to be a straightforward way to get the SQLite handle from
the Tcl SQL command, but it is possible.
https://github.com/flightaware/Pgtcl/blob/master/generic/pgtclSqlite.c#L838
On 10/7/17, 9:31 AM, "sqlite-users on behalf of apajabo yaro"
Generally, when you talk about whether a language is strongly or weakly typed,
you're talking about the storage, not the content.
Pretty much every "weakly typed" language out there (there are a few
exceptions, like Tcl) does have fully typed values. In many cases you can even
interrogate the
On 8/9/17, 2:45 PM, "sqlite-users on behalf of Nico Williams"
wrote:
> I'm not fond of web fora, but a good integration would be nice, for sure. An
> IMAP service would be fantastic for users like me. The need
On 8/4/17, 1:59 PM, "sqlite-users on behalf of Nico Williams"
wrote:
> The checkpoint process would look like this:
> - make a new file in the same directory
> - copy the DB to the new file
> - rename the new
On 8/4/17, 1:45 PM, "sqlite-users on behalf of Nico Williams"
wrote:
> SQLite3's WAL is already log-structured. The main DB file isn't. So SQLite3
> is a hybrid. But it doesn't have to be a hybrid.
One issue I
On 8/4/17, 1:28 PM, "sqlite-users on behalf of Nico Williams"
wrote:
> Imagine a mode where there is only a WAL, and to checkpoint is to write a new
> WAL with only live contents and... rename(2) into place. Such
On 8/4/17, 8:29 AM, "sqlite-users on behalf of Bob Friesenhahn"
wrote:
> Lazy programmers who request such things are of the same ilk which use
> programming practices resulting in SQL injection attacks.
On 8/3/17, 9:16 AM, "sqlite-users on behalf of Ulrich Telle"
wrote:
> The description of the new pointer-passing interface gives the impression
> that restricting the pointer type parameter to static strings or
On 8/3/17, 8:56 AM, "sqlite-users on behalf of Ulrich Telle"
wrote:
> Nevertheless, I think the pointer type string restriction gives a false sense
> of security.
You described creating a malicious extension that
On 8/3/17, 8:27 AM, "sqlite-users on behalf of Ulrich Telle"
wrote:
> I really don't think that the latter is true. To overcome the restriction is
> extremly simple, if you don't care about memory leaks. Just do
On 8/3/17, 4:22 AM, "sqlite-users on behalf of Ulrich Telle"
wrote:
> IMHO it would be better if the function sqlite3_bind_pointer would make a
> copy of the type string and would thus be independent of the life
qlite-users on behalf of Sylvain Pointeau"
<sqlite-users-boun...@mailinglists.sqlite.org on behalf of
sylvain.point...@gmail.com> wrote:
On Wed, Aug 2, 2017 at 5:54 PM, Peter Da Silva <
peter.dasi...@flightaware.com> wrote:
> Can’t you do the same basic logic th
ote:
On Wed, Aug 2, 2017 at 5:43 PM, Peter Da Silva <
peter.dasi...@flightaware.com> wrote:
> Hence the suggestion to script a transaction. For example, in pseudocode:
>
> BEGIN;
> SELECT value, increment from super_sequences where table = :table and
+ increment) WHERE table = :table
and column = :column;
COMMIT;
On 8/2/17, 10:37 AM, "sqlite-users on behalf of Sylvain Pointeau"
<sqlite-users-boun...@mailinglists.sqlite.org on behalf of
sylvain.point...@gmail.com> wrote:
On Wed, Aug 2, 2017 at 5:27 PM, Peter Da Silva
Have a look at https://sqlite.org/autoinc.html
Also keep in mind that latency for SQLITE is low, since it’s not client-server,
so you can script a transaction that has any sequence behavior you want with
similar overhead to having SQLITE implement the sequence for you.
On 8/2/17, 10:23 AM,
Any application that depends on column names should be using “AS” anyway, might
as well break them sooner.
Disclaimer: I’m probably guilty of depending on column names without “AS”,
which explains why I’ve been sneezing so much lately.
On 7/31/17, 10:21 AM, "sqlite-users on behalf of Richard
If you’re in a position to perform an attack that address space randomization
can defend against, then you have already successfully performed a code
execution attack.
And so far as I can tell... *any* constant strings in the executable, including
things like elements of the SQL language
On 7/25/17, 11:25 AM, "sqlite-users on behalf of petern"
wrote:
> You're trying to change the topic to the security model.
All I was doing was pointing out that hiding the type information from
attackers is
On 7/24/17, 3:50 PM, "sqlite-users on behalf of petern"
wrote:
> BTW, if the hypothetical attacker has a copy of the application, aren't the
> constant space pointer access keys' string addresses all there
un...@mailinglists.sqlite.org] Im
Auftrag von Peter Da Silva
Gesendet: Montag, 24. Juli 2017 15:37
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: Re: [sqlite] New draft document on the new pointer-passing
interfaces
What about imposing
What about imposing some structure on the pointer type strings that uses a
guaranteed unique substring, for example “org.sqlite.fts3.snippet”, to ensure
there wouldn’t be accidental conflicts?
On 7/24/17, 6:54 AM, "sqlite-users on behalf of Richard Hipp"
On 7/22/17, 1:46 AM, "sqlite-users on behalf of Keith Medcalf"
wrote:
> Not very well. How do you think "drive by downloads" work? Javascript in
> browsers is the most dangerous thing ever invented!
I think the
I assume BEGIN, COMMIT, and ROLLBACK are safe too :)
On 7/21/17, 1:08 PM, "sqlite-users on behalf of Richard Hipp"
wrote:
On 7/21/17, Simon Slavin wrote:
>
> The new features
On Fri, Jul 21, 2017 at 11:35 AM, Peter Da Silva
<peter.dasi...@flightaware.com> wrote:
> The problem is that SQLITE_VERSION_NUMBER is not “the database version”,
it’s something like “the last version of SQLite that committed a transaction”.
>
> The databas
The problem is that SQLITE_VERSION_NUMBER is not “the database version”, it’s
something like “the last version of SQLite that committed a transaction”.
The database version number is “3”.
___
sqlite-users mailing list
On 7/21/17, 10:14 AM, "sqlite-users on behalf of Igor Korot"
wrote:
> This is also stored at offset 96 in the db file:
>
> https://www.sqlite.org/fileformat.html
Is this the number I'm after?
https://www.sqlite.org/c3ref/c_source_id.html
This is also stored at offset 96 in the db file:
https://www.sqlite.org/fileformat.html
I don’t think there’s a pragma for extracting it from within SQLite code.
On 7/21/17, 9:58 AM, "sqlite-users on behalf of Igor Korot"
Using a straight PHP-level substitution like that performs the substitution
before the SQL parser sees it. It’s also super dangerous if you’re not
absolutely sure there’s no path for an untrusted agent to inject the name
you’re selecting on.
https://xkcd.com/327/
On 7/21/17, 3:42 AM,
Have a look at prepared statements and statement parameters.
Also, if you’re quoting strings you should use single quotes rather than double
quotes. Double quotes just override the tokenizer, the result is still untyped
and technically an identifier (the tokenizer actually marks it as TK_ID)
I notice that “read_uncommitted pragma” is spelled “PRAGMA read_uncommitted” in
one place. The links all match. This small inconsistency is probably a mistake.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
In wal_hook we have:
** The callback function should normally return [SQLITE_OK]. ^If an error
** code is returned, that error will propagate back up through the
** SQLite code base to cause the statement that provoked the callback
** to report an error, though the commit will have still
Nicely put. There’s a couple of prepared statements that I’m using that
absolutely will benefit from this, now I understand it.
On 7/13/17, 3:30 PM, "sqlite-users on behalf of Marc L. Allen"
wrote:
If
I always saw byte as something that was relevant for systems that could address
objects smaller than words... “byte addressed” machines. The term was mnemonic
for something bigger than a bit and smaller than a word. It was usually 8 bits
=but there were 36-bit machines that were byte
On 6/29/17, 5:20 AM, "sqlite-users on behalf of R Smith"
wrote:
> SQLite isn't helping the confusion in this case, because it allows
> double-quotes to be regarded as string values IF an identifier with that name
>
On 6/29/17, 1:22 AM, "sqlite-users on behalf of Robert M. Münch"
wrote:
> Hi, sorry, should have mentioned that this doesn't work in my case, because
> we are building the column placeholders dynamically.
On 6/27/17, 4:02 PM, "sqlite-users on behalf of Keith Medcalf"
wrote:
> Nowadays we use 8 bits for data with no parity, no error correction, and no
> timing bits. Cuz when things screw up we want them to REALLY
On 6/26/17, 11:48 AM, "drhsql...@gmail.com on behalf of Richard Hipp"
wrote:
> OK. I'll back out the change, then.
That’s definitely safer, it’s a super useful capability but needs to be applied
selectively.
On 6/26/17, 11:15 AM, "drhsql...@gmail.com on behalf of Richard Hipp"
wrote:
> If you get the latest check-in (https://www.sqlite.org/src/info/trunk) there
> is a new option on the "sqlite3" command called "-unsetnull 1" which causes
> "db
I didn’t mean to imply you had to scan the whole content for a BOM, but rather
for illegal characters in the absence of a BOM.
On 6/26/17, 10:02 AM, "sqlite-users on behalf of Simon Slavin"
wrote:
Folks, I’m
On 6/26/17, 9:00 AM, "sqlite-users on behalf of Richard Hipp"
wrote:
> The "db nullvalue STRING" command lets you translate NULL values into the
> string value of your choice. But there is not (currently) a way to
What’s the best way to handle NULLs out of band when walking the results of a
query:
$sqlite_db eval “SELECT * FROM table ...” array {
...
}
In other Tcl database bindings it’s common to return arrays containing possible
null values with NULL values simply unset, so `[info exists]` can
Just occurred to me: another problem with the BOM is that some people who are
*not* writing UTF-8 are cargo-culting the BOM in anyway. So you may have to
scan the whole file to see if it’s really UTF-8 anyway.
You’re better off just assuming UTF-8 everywhere, generating an error (and
backing
On 6/26/17, 2:09 AM, "sqlite-users on behalf of Eric Grange"
wrote:
> Alas, there is no end in sight to the pain for the Unicode decision to not
> make the BOM compulsory for UTF-8.
It’s not actually providing any
101 - 196 of 196 matches
Mail list logo