Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Yuriy Kaminskiy
2014 08:32:02 +0400 Subject: Re: [sqlite] Once again about random values appearance On Fri, Feb 14, 2014 at 6:35 AM, James K. Lowden jklow...@schemamania.orgwrote: select id, (select id from TestTable where id = abs(random() % 100)) as rndid from TestTable where id=rndid On Thu, 13 Feb 2014

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 7:59am, Max Vlasov max.vla...@gmail.com wrote: So the nanosec example modified Select v-v from ( Select nanosec() as v from TestTable ) ...shows non-zero values for the current (3.8.3) and for older (3.6.10) version. Erm ... that worries me a

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Max Vlasov
On Mon, Feb 17, 2014 at 2:27 PM, Simon Slavin slav...@bigfraud.org wrote: On 17 Feb 2014, at 7:59am, Max Vlasov max.vla...@gmail.com wrote: So the nanosec example modified Select v-v from ( Select nanosec() as v from TestTable ) ...shows non-zero values for

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread RSmith
On 2014/02/17 09:59, Max Vlasov wrote: Ok, I hope I found the topic, the title was racing with date('now') (was: Select with dates): one of the links to the archive https://www.mail-archive.com/sqlite-users@sqlite.org/msg79456.html CMIIW, but as I see it, the final modification was

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Max Vlasov
On Mon, Feb 17, 2014 at 7:00 PM, RSmith rsm...@rsweb.co.za wrote: On 2014/02/17 09:59, Max Vlasov wrote: . So Select nanosec() - nanosec() from ... returns non-zero values for most of the times, so there's no guarantee the user functions or any other functions will be called once

Re: [sqlite] Once again about random values appearance

2014-02-16 Thread James K. Lowden
Subject: Re: [sqlite] Once again about random values appearance On Fri, Feb 14, 2014 at 6:35 AM, James K. Lowden jklow...@schemamania.orgwrote: select id, (select id from TestTable where id = abs(random() % 100)) as rndid from TestTable where id=rndid On Thu, 13 Feb 2014 07:26:55 -0500

Re: [sqlite] Once again about random values appearance

2014-02-16 Thread Max Vlasov
of SQLite Database sqlite-users@sqlite.org Date: Fri, 14 Feb 2014 08:32:02 +0400 Subject: Re: [sqlite] Once again about random values appearance On Fri, Feb 14, 2014 at 6:35 AM, James K. Lowden jklow...@schemamania.orgwrote: select id, (select id from TestTable where id = abs(random

[sqlite] Once again about random values appearance

2014-02-13 Thread Max Vlasov
Hi, probably was discussed and modified before, but I still can not understand some peculiarities with random column values. The table Create table [TestTable] ([id] integer primary key) populated with 100 default values (thanks to CTE now made with a single query): with recursive

Re: [sqlite] Once again about random values appearance

2014-02-13 Thread Richard Hipp
On Thu, Feb 13, 2014 at 4:45 AM, Max Vlasov max.vla...@gmail.com wrote: Hi, probably was discussed and modified before, but I still can not understand some peculiarities with random column values. The table Create table [TestTable] ([id] integer primary key) populated with 100 default

Re: [sqlite] Once again about random values appearance

2014-02-13 Thread Max Vlasov
On Thu, Feb 13, 2014 at 4:26 PM, Richard Hipp d...@sqlite.org wrote: On Thu, Feb 13, 2014 at 4:45 AM, Max Vlasov max.vla...@gmail.com wrote: Hi, probably was discussed and modified before, but I still can not understand some peculiarities with random column values. It is undefined

Re: [sqlite] Once again about random values appearance

2014-02-13 Thread James K. Lowden
select id, (select id from TestTable where id = abs(random() % 100)) as rndid from TestTable where id=rndid On Thu, 13 Feb 2014 07:26:55 -0500 Richard Hipp d...@sqlite.org wrote: It is undefined behavior, subject to change depending the specific version of SQLite, compile-time options,

Re: [sqlite] Once again about random values appearance

2014-02-13 Thread Max Vlasov
On Fri, Feb 14, 2014 at 6:35 AM, James K. Lowden jklow...@schemamania.orgwrote: select id, (select id from TestTable where id = abs(random() % 100)) as rndid from TestTable where id=rndid On Thu, 13 Feb 2014 07:26:55 -0500 Richard Hipp d...@sqlite.org wrote: It is undefined behavior,