[sqlite] sqlite3rbu: void function returns value

2015-07-24 Thread Ralf Junker
Warning: sqlite3rbu.c 3528: void functions may not return a value in function rbuVfsDlClose. http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=3526-3529 Looks like the return value is not needed. Ralf

[sqlite] Implement floor and ceil functions

2015-07-24 Thread Stephan Beal
On Fri, Jul 24, 2015 at 4:49 PM, Richard Hipp wrote: > On 7/24/15, Artem Skoretskiy wrote: > > What about including (some of them) into the core? So that every user on > > every SQLite could use them without extra work? > > > > Because it creates a dependency on -lm > FWIW, floor() and ceil()

[sqlite] Implement floor and ceil functions

2015-07-24 Thread Artem Skoretskiy
What about including (some of them) into the core? So that every user on every SQLite could use them without extra work? Also that looks like you could easily shot your leg: "The files below are contributed by users and are not part of the standard SQLite package. The content of these files has

[sqlite] cross-database transaction

2015-07-24 Thread Jean Chevalier
Presumably you've already made this work for a transaction involving two tables in the same database? Have you tried attaching a second database with Attach Database and using a similar logic? In other words, is your question about using multiple databases in a transaction, or about how to

[sqlite] cross-database transaction

2015-07-24 Thread Simon Slavin
On 24 Jul 2015, at 2:47pm, MM wrote: > Is it possible to only update table1 in database1 and table2 in database2 > if both succeed? Open one database. Use the ATTACH command to attach the second database to the existing connection. Use this connection for all operations on both databases.

[sqlite] Implement floor and ceil functions

2015-07-24 Thread Jean Chevalier
Floor and Ceil can be dynamically loaded. Check last entry here: http://www.sqlite.org/contrib Today, Artem Skoretskiy wrote: > > Hi all, > > According to the documentation https://www.sqlite.org/lang_corefunc.html > SQLite does not provide some basic math functions such as floor and ceil. >

[sqlite] Implement floor and ceil functions

2015-07-24 Thread Artem Skoretskiy
Hi all, According to the documentation https://www.sqlite.org/lang_corefunc.html SQLite does not provide some basic math functions such as floor and ceil. They are pretty handy additions for "round" function that is present. For me as developer it would be great to have them in the core. I'm

[sqlite] sqlite3rbu.c: ANSI C incomatible variable delcaration

2015-07-24 Thread Ralf Junker
sqlite3rbu.c intermingles variable declaration and code, which is not with ANSI C here: http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=623-624 Declaring zSql before calling va_start() solves the problem for me: char *zSql; va_start(ap, zFmt); zSql = sqlite3_vmprintf(zFmt, ap);

[sqlite] sqlite3rbu.c: Replace sprintf() with sqlite3_mprintf()

2015-07-24 Thread Ralf Junker
sqlite3rbu.c uses sprintf(), which SQLite3 uses nowhere else: http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=2643 Could you replace this with sqlite3_mprintf(), just like one function above? http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=2625-2628 Ralf

[sqlite] cross-database transaction

2015-07-24 Thread MM
Hello, Is it possible to only update table1 in database1 and table2 in database2 if both succeed? Rds,

[sqlite] System.Data.SQLite 1.0.97 on Win10

2015-07-24 Thread Simon Slavin
On 24 Jul 2015, at 9:05am, Jan Leimbach wrote: > I created a simple test statement like UPDATE tablename SET field = '123' > WHERE field = '321' > It returns always "Not an error" and does not update the table. It's like your Mum told you to finish empty all bins but they were already empty.

[sqlite] Implement floor and ceil functions

2015-07-24 Thread Richard Hipp
On 7/24/15, Artem Skoretskiy wrote: > What about including (some of them) into the core? So that every user on > every SQLite could use them without extra work? > Because it creates a dependency on -lm -- D. Richard Hipp drh at sqlite.org

[sqlite] System.Data.SQLite 1.0.97 on Win10

2015-07-24 Thread Jan Leimbach
Hi everyone, I try to update a table in my sqlite database and get "Not an error" result from the SQLite engine. The same query works on win7. I know that win10 is not final released yet, but I have no clue wants going wrong here. I created a simple test statement like UPDATE tablename SET field

[sqlite] Help with understanding sqlite3_mprintf_int test expected result

2015-07-24 Thread Richard Hipp
On 7/24/15, Viktor Jancik wrote: > What about these tests? > > do_test printf-1.17.1 { > sqlite3_mprintf_int {abd: %2147483647d %2147483647x %2147483647o} 1 1 1 > } {} > do_test printf-1.17.2 { > sqlite3_mprintf_int {abd: %*d %x} 2147483647 1 1 > } {} > do_test printf-1.17.3 { >

[sqlite] Help with understanding sqlite3_mprintf_int test expected result

2015-07-24 Thread Viktor Jancik
Also, this is what I am getting: printf-1.17.4... Expected: [/.*/] Got: [abd: 1 1 1] shouldn't that pass? If the output is undefined, AKA anything Should pass. Thank you, Viktor - Original Message - From: "Viktor Jancik" To: "General Discussion of SQLite

[sqlite] Help with understanding sqlite3_mprintf_int test expected result

2015-07-24 Thread Viktor Jancik
What about these tests? do_test printf-1.17.1 { sqlite3_mprintf_int {abd: %2147483647d %2147483647x %2147483647o} 1 1 1 } {} do_test printf-1.17.2 { sqlite3_mprintf_int {abd: %*d %x} 2147483647 1 1 } {} do_test printf-1.17.3 { sqlite3_mprintf_int {abd: %*d %x} -2147483648 1 1 } {abd: 1 1}