6. sqlite3_exec without ubiqitous text conversions (Barone Ashura)
> >
> >
> > --
> >
> > Message: 6
> > Date: Tue, 30 Jul 2019 13:13:52 +0200
> > From: Barone Ashura
> > To: sqlite-users@mailinglists.sqli
: sqlite-users@mailinglists.sqlite.org
Subject: [sqlite] sqlite3_exec without ubiqitous text conversions
Message-ID:
Content-Type: text/plain; charset="UTF-8"
Hello,
I have been working on an application based on SQLite for 2 years now,
and
recently we started running some p
Hello,
I have been working on an application based on SQLite for 2 years now, and
recently we started running some performance profiling to check if there
are areas where we can squeeze some extra performance.
SQlite query execution is used almost exclusively through sqlite3_exec, and
the impleme
On 1 Dec 2018, at 1:50pm, Prajeesh Prakash
wrote:
> I have two thread one is for reading and other is for writing the DB. Both
> thread have the same DB connection
One connection can only execute one operation at one time. If you want
simultaneous operations, use two connections.
Simon.
___
Hi Team,
Is this sqlite3_exec() function is a blocking call in the case of writing.I
have two thread one is for reading and other is for writing the DB. Both thread
have the same DB connection(Of course i am in FULLMUTEX mode and sqlite point
of few there is no multiple thread every thing is ser
As per the asyncwriter code, that thread is not giving any BD update success or
failure status so is there any way to get the status from the Asyncwriter
thread because my application needs to know the status of the DB changes.
> On November 27, 2018 at 10:31 PM Keith Medcalf wrote:
>
>
>
>
On Tuesday, 27 November, 2018 07:59, Simon Slavin wrote:
>If you do not register an async writer, SQLite does not start its own
>threads. Each SQLite library call executes in the thread which calls
>it.
Not entirely correct. The sorter can be configured to automatically use
threads.
---
The
In that case if i am not registering the async writer then also my db will get
updated (If i am writing to DB) am i correct?
>
> On November 27, 2018 at 8:29 PM Simon Slavin wrote:
>
> On 27 Nov 2018, at 2:43pm, Prajeesh Prakash
> wrote:
>
> > >
> > I have one doubt
On 27 Nov 2018, at 2:43pm, Prajeesh Prakash
wrote:
> I have one doubt, Is that sqlite3_exec function is working under the main
> application thread (Thread which calls the sqlite3_exec) or in a separate
> thread (If i am trying to INSERT the data in to DB without registering the
> Async write
Dear Members,
I have one doubt, Is that sqlite3_exec function is working under the main
application thread (Thread which calls the sqlite3_exec) or in a separate
thread (If i am trying to INSERT the data in to DB without registering the
Async writer).
Thank you
Prajeesh
petern wrote:
> Regarding sqlite3_trace_v2(db, SQLITE_TRACE_PROFILE,...). Calls to
> sqlite3_sql() on the third trace callback parameter (cast to sqlite_stmt*)
> do retrieve the correct part of the the original sqlite3_exec input SQL
> string except for ill formed SQL. Apparently the SQLITE_TRACE
Hi Clemens.
Found the problem. My IDE is picking up other installed libsqlite3.so. It
was wrong to think that uninstalling the distro's SQLite package would
purge it from /usr/lib. Other copies still exist. I'm sure glad the
project is now linking the correct library file!
Regarding sqlite3_t
petern wrote:
> linker says -> "undefined reference to `sqlite3_trace_v2'"
Then your distribution's package appears to be compiled with
SQLITE_OMIT_TRACE.
Just add sqlite3.c to your project.
Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@
Clemens. I'm trying you suggestion but...
linker says -> "undefined reference to `sqlite3_trace_v2'"
[I am linking to libsqlite3.so. Version by sqlite_version() is 3.19.3.]
Is sqlite3_trace_v2() defined by a SQLite compile time option and if so
what is it?
Help page has only negative SQLITE_O
petern wrote:
> Is there a C API way to get a total count or notification as each statement
> is prepared by sqlite_prepare_v2 within sqlite3_exec?
sqlite3_trace_v2() with SQLITE_TRACE_PROFILE is called at the end of each
statement.
Regards,
Clemens
__
Is there a C API way to get a total count or notification as each statement
is prepared by sqlite_prepare_v2 within sqlite3_exec? The sqlite3_exec
callback interface is silent with respect to CREATE and DROP statements.
Presumably I could copy and paste the entire body of sqlite3_exec into my
pro
Hello all,
* Short story:
To support better security through binding, we would like to request a new
C/C++ API function similar to sqlite3_exec(), however it will take a prepared
statement instead of an sql string.
* Long story:
We finally allowed a user string input directly into our database
On 2015-03-10 10:44 PM, Mayank Kumar (mayankum) wrote:
> Thanks Richard, but we call rollback only when my earlier sqlite3_step has
> failed for some reason. Can it still undo some inserts/updates/deletes from a
> previously executed but not yet commited tx ?
>
> Does completion of sqlite3_step
Hipp
Sent: Monday, March 09, 2015 3:27 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] sqlite3_exec ROLLBACK command
On 3/9/15, Mayank Kumar (mayankum) wrote:
> Hi All
>
> We have some legacy code which calls sqlite3_exec with ROLLBACk every
> time sqlite3_step fails
Hi All
We have some legacy code which calls sqlite3_exec with ROLLBACk every time
sqlite3_step fails irrespective what specific error occurred. I am wondering if
this is a safe behavior or should I change this. Can it cause any sideeffects
or memory leak or any other issues ?
What is the righ
On 3/9/15, Mayank Kumar (mayankum) wrote:
> Hi All
>
> We have some legacy code which calls sqlite3_exec with ROLLBACk every time
> sqlite3_step fails irrespective what specific error occurred. I am wondering
> if this is a safe behavior or should I change this. Can it cause any
> sideeffects or
; General Discussion of SQLite
>Database
>Sent: Tuesday, January 6, 2015 9:46 PM
>Subject: Re: [sqlite] sqlite3_exec and returned error
>
>
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA1
>
>On 01/05/2015 11:43 PM, Valery Reznic wrote:
>> I was p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/05/2015 11:43 PM, Valery Reznic wrote:
> I was planing to use this function like following:
>
> ---
>
> int res; char *errmsg;
I'd recommend you explicitly set that to NULL here.
>
> res = sqlite3_exec( db, zSql,
Hello.
I am not sure if it should go here or to devel list, so please bear with me.
I was about to use sqlite3_exe with not null errmsg parameter and became a bit
confused.
Documentation says:
---
If an error occurs while evaluating the SQL statements passed into
sqlit
On 14 Dec 2010, at 8:22am, Toxico Nimbus wrote:
> I've got a strange SQLITE_MISUSE result when sqlite3_exec()'ing a "BEGIN
> TRANSACTION;" directly after successfully opening the database.
> errmsg contains the path of the database (as given to sqlite3_open()),
> and attempting to sqlite3_free(
I've got a strange SQLITE_MISUSE result when sqlite3_exec()'ing a "BEGIN
TRANSACTION;" directly after successfully opening the database.
errmsg contains the path of the database (as given to sqlite3_open()),
and attempting to sqlite3_free()'ing it causes a segfault.
My calling environment is a b
: [sqlite] sqlite3_exec() returns SQLITE_OK but
Databaseshowsdifferent result
> 1) You are opening a different file than the one you think you are opening.
> E.g. you are using a relative path to the file, and the workding directory is
> not what you expect it to be.
>
> 2) You
> 1) You are opening a different file than the one you think you are opening.
> E.g. you are using a relative path to the file, and the workding directory is
> not what you expect it to be.
>
> 2) You are starting an explicit transaction (see BEGIN) and forgetting to
> commit it.
3) You are sta
souvik.da...@wipro.com wrote:
> I am accessing the same database from two different processes. From one of
> the process , I am able
> to create tables in runtime but when I am trying to create a table from
> another process in runtime on the same DB
> I am not able to create so. The strange part
Hi,
I am accessing the same database from two different processes. From one of the
process , I am able
to create tables in runtime but when I am trying to create a table from another
process in runtime on the same DB
I am not able to create so. The strange part is that I find
sqlite3_exec() is
Hi,
I am accessing the same database from two different processes. From one of the
process , I am able
to create tables in runtime but when I am trying to create a table from another
process in runtime on the same DB
I am not able to create so. The strange part is that I find
sqlite3_exec() is r
This is happening when you open an empty file, correct? Is
the function sqlite3PagerPagecount() in file pager.c setting it's
output parameter to zero as we would expect?
i.e. at the end of sqlite3PagerPagecount():
if( pnPage ){
*pnPage = nPage;
}
is nPage ever non-zero while running
Hi Richard,
sqlite3Corrupt does trigger.
Callstack dump:
#0 decodeFlags(pPage=0xa026a4cc, flagByte=0) (SQLite\btree.c:1325)
#1 A000C1F8 btreeInitPage(pPage=0xa026a4cc) (SQLite\btree.c:1360)
#2 A000CB88 getAndInitPage(pBt=0xa025bc28, pgno=1, ppPage=0xa0269f14)
(SQLite\btree.
On Sep 11, 2009, at 1:58 PM, gprand wrote:
>
> Hi Richard,
>
> First, thanks for replying to my problem.
>
> Definitely answer to your assumptions ist no. I can see the correct
> sql
> statement into the debugger, nothing is malformed. Checking
> sizeof(char)
> delivers 1. Processing the firs
Hi Richard,
First, thanks for replying to my problem.
Definitely answer to your assumptions ist no. I can see the correct sql
statement into the debugger, nothing is malformed. Checking sizeof(char)
delivers 1. Processing the first 100 bytes does'nt produce error. Much more,
processing of sqlite
On Sep 10, 2009, at 2:23 AM, gprand wrote:
> Program's output is:
> OPENX 16 /database_file.db 01002
> OPEN16 /database_file.db
> READ16100 0 0
> SQL error: database disk image is malformed
This indicates that SQLite is reading the first 100 bytes of the
database file (the
Hi,
my ARM7 is a LPC2478. It runs with 16MB RAM. OS is selfmade, consists of
TNKernel, Microwindows-Nano-X, FLTK, Elm-Chans FAT-FS, lwIP. Compiler ist
arm-elf-gcc 4.3.3. Application is linked against newlib-1.17.0.
The SQLite test program:
#include
#include "sqlite3.h"
static int callback(voi
I wasn't able to duplicate this with my ARM system. Can you provide
more details? or was the issue DRH pointed out above your problem?
On Wed, Sep 9, 2009 at 7:02 AM, gprand wrote:
>
> Hi,
>
> I can confirm this behavoir. Now, after 2 days debugging and unsuccessful
> searching around I have f
Hi,
I can confirm this behavoir. Now, after 2 days debugging and unsuccessful
searching around I have found your posting. It drives me crazy, but I can
not locate the problem. Exactly the same code works, compiled for X86, and
fails, compiled for ARM. All machine depending configuration is omitt
On Sep 8, 2009, at 3:16 AM, priyanka sharma wrote:
> Hi
> the sqlite3_exec is called from the following code snippet.
>
> char database_buffer[BUFSIZ];
> rc = sqlite3_open (database_buffer, &db);
Please tell us what you were hoping to accomplish with the two
consecutive lines of code shown a
Hi
the sqlite3_exec is called from the following code snippet.
get_entries_fromdatabase ()
{
sqlite3 *db;
char *zErrMsg = 0;
int rc;
char database_buffer[BUFSIZ];
rc = sqlite3_open (database_buffer, &db);
if (rc)
{
fprintf (stderr, "Can't open database: %s\n", sqlite3_errms
Any help on this issue will be welcome,
hi,
Can you please specify what statement you are passing in to the
sqlite3_exec please ?
Atul
--
View this message in context:
http://www.nabble.com/sqlite3_exec-fails-on-arm-tp25293839p25340486.html
Sent from the SQLite mailing list archive at Nabb
I am using sqlite3_exec() to run a sql query on arm machine but I am getting
error saying : "malformed database schema error : unrecognized token " ' " .
sqlite version is : 3.6.17.
here is the code snippet being used :
**
#include
#include
#include
static int
callback (void *N
Hi,
I am using sqlite3.6.17 on arm_v7 . sqlite3_Exec fails giving the following
error
sqlite3_exec malformed database schema error : unrecognized token "'".
I am able to read the database manually using select commands. Executing the
same sqlite3_exec statements on x86 machine on the same db file
essage-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Edward Wong
> Sent: Monday, June 22, 2009 11:38 AM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] sqlite3_exec unresponsive for insert, delete and
> update
>
>
hi all,
i've been banging my head against the keyboard, trying to figure out what is
going on. i am writing a program in xcode that uses the c/c++ sqlite3
library. the problem i am having is the following:
1. i open a connection to my db using sqlite3_open()
NSString *dbFile
The documentation found at http://sqlite.org/c3ref/exec.html is unclear
about some parts: is it possible to not request an error message (via
passing NULL as the errmsg parameter)? And what are the possible return
values?
- Sherief
___
sqlite-users mail
Hi,
if sqlite3_exec() returns an error code (i.e other than SQLITE_OK),
is it guaranteed that the "errmsg" argument always contains the error
message string. Or should i compare the value of errmsg with NULL before
printing the value?
E.g:
ret = sqlite3_exec(db, sql, NULL, NULL, &err_msg);
"SQLiter" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> b. Is it better to recursively call Prepare, Step & Finalize from my
> Delphi App
It is better to call Prepare once (with a parameterized statement), then
(bind, step, reset) multiple times in a loop, then Finalize at the end
Thanks. The issues regarding injection attacks are not relevant in my present
context. What I wanted to know was this -
a. I want to selectively discard N rows from a SQLite dB table. N could be
1 but again it could be, rarely, 10,000
b. Is it better to recursively call Prepare, Step & Finaliz
2008/11/25 SQLiter <[EMAIL PROTECTED]>:
>
> Is there a limit on the length of the SQL that can be executed using this
> function. I mean stmt1;stmt2;...stmtn upto what length. Even if there is
> no limit is it nevertheless prudent not to exceed a certain maximum length?
> --
http://www.sqlite.or
Is there a limit on the length of the SQL that can be executed using this
function. I mean stmt1;stmt2;...stmtn upto what length. Even if there is
no limit is it nevertheless prudent not to exceed a certain maximum length?
--
View this message in context:
http://www.nabble.com/sqlite3_exec---s
Hi all,
I am using sqlite 3.3.15 version in my setup on Solaris 10 SPARC machine.
sqlite_exec function is hanging suddenly in the middle while retrieveing
rows from a table. I am able to reproduce this very frequently. I did not
understand why it is hanging for 30 to 40 mins without throwing any
Sent: Wednesday, April 23, 2008 5:02:17 PM
Subject: Re: [sqlite] sqlite3_exec return an error message
Thanks to both of you!
Sorry I am new baby to sqlite3.
Now I got it.
So I should use the shell script to execute these commands.
Thanks,
Joanne
- Original Message
From: P Kishor <
:30 PM
Subject: Re: [sqlite] sqlite3_exec return an error message
On 4/23/08, Joanne Pham <[EMAIL PROTECTED]> wrote:
> Thanks a lot Igor!
> But the codes below didn't work too:
> char stmt[STMT_LEN];
> char *sqlStmt = &stmt[0];
> strcpy(&stmt[0],"o
;
>
> - Original Message
> From: Igor Tandetnik <[EMAIL PROTECTED]>
> To: sqlite-users@sqlite.org
> Sent: Wednesday, April 23, 2008 4:03:20 PM
> Subject: Re: [sqlite] sqlite3_exec return an error message
>
> Joanne Pham <[EMAIL PROTECTED]> wrote:
&
Joanne Pham <[EMAIL PROTECTED]> wrote:
> Thanks a lot Igor!
> But the codes below didn't work too:
> char stmt[STMT_LEN];
> char *sqlStmt = &stmt[0];
> strcpy(&stmt[0],"output compressTable; mode csv; select * from
> compressTable; ");
I didn't say the dot in front is wrong: the whole command is
ks a ton,
JP
- Original Message
From: Igor Tandetnik <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, April 23, 2008 4:03:20 PM
Subject: Re: [sqlite] sqlite3_exec return an error message
Joanne Pham <[EMAIL PROTECTED]> wrote:
> I have the following codes to exec
Joanne Pham <[EMAIL PROTECTED]> wrote:
> I have the following codes to execute the sql file but the error
> message return back that dot(.).
> It seems like sqlite3_exec didn't like ".output wanPerfTableTest".
> So how go to get arround with this command ".output wanPerfTableTest"
>
> strcpy(&stmt[
Hi All,
I have the following codes to execute the sql file but the error message return
back that dot(.).
It seems like sqlite3_exec didn't like ".output wanPerfTableTest".
So how go to get arround with this command ".output wanPerfTableTest"
Your help is greatly appreciated.
Thanks
JP
strcpy(&s
Tom Parke wrote:
>From what I think I have learned so far, if I call sqlite3_exec() giving
it a call back function and a select * from tbl, I do not have any
direct access to the column values other that the text representation in
the values char array from within the callback()?
That's cor
>From what I think I have learned so far, if I call sqlite3_exec() giving
it a call back function and a select * from tbl, I do not have any
direct access to the column values other that the text representation in
the values char array from within the callback()?
This leads me to the question,
Are you using any BLOBs in your table?. More often than not it will be your
query which will have direct impact on the performance. I suggest you to
check that appropriate columns have been indexed and are used in right
manner as specified in the SQLite documentation or mailing list with subject
"
Have you raised indices on the keys you use in your queries?
varunkumar wrote:
i have 40 columns table in my database. now my database size is 23MB .
untill now my database has 78752 rows(records). when i am query database it
is taking 10 seconds of time . my database performance is degradi
i have 40 columns table in my database. now my database size is 23MB .
untill now my database has 78752 rows(records). when i am query database it
is taking 10 seconds of time . my database performance is degrading.
i want to improve my database performance what should i do to improve
perfor
varunkumar <[EMAIL PROTECTED]> wrote:
so two different processes cannot access the database at a time
One process cannot access the database at the same instant
in time that another process is modifying the database.
--
D. Richard Hipp <[EMAIL PROTECTED]>
To clarify further: Process A and
Yes, provided you synchronize on the busy checks.
varunkumar wrote:
so two different processes cannot access the database at a time
John Stanton-3 wrote:
You need to handle the SQLITE_BUSY condition in your program.
varunkumar wrote:
is it possible more than one process can access the sql
varunkumar <[EMAIL PROTECTED]> wrote:
> so two different processes cannot access the database at a time
>
One process cannot access the database at the same instant
in time that another process is modifying the database.
--
D. Richard Hipp <[EMAIL PROTECTED]>
-
so two different processes cannot access the database at a time
John Stanton-3 wrote:
>
> You need to handle the SQLITE_BUSY condition in your program.
>
> varunkumar wrote:
>> is it possible more than one process can access the sqlite3 database at a
>> time?
>>
>> I am using sqlite3 database
You need to handle the SQLITE_BUSY condition in your program.
varunkumar wrote:
is it possible more than one process can access the sqlite3 database at a
time?
I am using sqlite3 database , I have the situation like follows in my
project.
In my project one process(daemon) doing as follows
is it possible more than one process can access the sqlite3 database at a
time?
I am using sqlite3 database , I have the situation like follows in my
project.
In my project one process(daemon) doing as follows
it is opening the database using sqlite3_open()
preparing sqlite3 insert st
You would have not closed the database after usage,just check wheather you
have closed the database.
-Original Message-
From: varunkumar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 09, 2007 9:25 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] sqlite3_exec function error:database is
varunkumar wrote:
i am using sqlite3 database in our project
in my project one daemon process running , in this daemon process i am
opening the data base and inserts the data
in to sqlite3database using sqlite3_exec() API . for every one
minute i am opening the database and inserts th
i am using sqlite3 database in our project
in my project one daemon process running , in this daemon process i am
opening the data base and inserts the data
in to sqlite3database using sqlite3_exec() API . for every one
minute i am opening the database and inserts the values in to datab
I'm periodically seeing sqlite3_exec return SQLITE_CANTOPEN.
Unfortunately, I haven't boiled this down to a simple sample that I can
send to this list, but I thought I'd check to see if there is a known
solution before I dive too deep. I'm using sqlite version 3.2.7 on
windows.
Thanks!
Pat
The D
=?ISO-8859-2?Q?Bogus=B3aw_Brandys?= <[EMAIL PROTECTED]> wrote:
> In sqlite 3.3.4 SQLite3_Exec return proper error for example 19 when
> column should be unique, but SQLite3_Prepare always return error code 1
> I'm using sqlite3_prepare before sqlite3_Step to execute some SQL and I
> think it shou
In sqlite 3.3.4 SQLite3_Exec return proper error for example 19 when
column should be unique, but SQLite3_Prepare always return error code 1
I'm using sqlite3_prepare before sqlite3_Step to execute some SQL and I
think it should return the same error code as sqlite3_exec.
Any reasons why it is h
Hello Dennis,
Friday, February 17, 2006, 11:23:02 AM, you wrote:
DC> Pavan Savoy wrote:
>>Hi,
>> sqlite3_exec is a wrapper function for sqlite3_prepare /
>>step, but which one of these is faster, I mean in terms of execution.
>>sqlite3_exec should still call a callback function a
Pavan Savoy wrote:
Hi,
sqlite3_exec is a wrapper function for sqlite3_prepare /
step, but which one of these is faster, I mean in terms of execution.
sqlite3_exec should still call a callback function and do all the string
handling !!
Also how do I use sqlite3_exec along wi
Hi,
sqlite3_exec is a wrapper function for sqlite3_prepare /
step, but which one of these is faster, I mean in terms of execution.
sqlite3_exec should still call a callback function and do all the string
handling !!
Also how do I use sqlite3_exec along with BLOB, I am currentl
Hello All -
I've been programming with sqlite3's C++ api for a few months now
and am quite impressed and happy with the results. But I've hit a bump
in the road.
The following code seems to cause the 'template' table to become locked.
CString querystr;
querystr.Format ("insert into templates va
81 matches
Mail list logo