I want to read the mem when the program is inside the sqlite3VdbeExec()
function and in case OP_Insert.
Here the mem consists of entire row to be inserted. When I read the mem
*pData, I found from the member pData->flags that it contains a BLOB. But
when I tried to print BLOB in pData->z, I
Thank you very much!!
It helped a lot.
On Wed, Mar 9, 2016 at 9:26 PM, Clemens Ladisch wrote:
> Sairam Gaddam wrote:
> > The documentation says that the function sqlite3_update_hook() is called
> > whenever a row is updated, deleted or inserted
>
> No. It says that th
http://www.sqlite.org/c3ref/update_hook.html
The documentation says that the function sqlite3_update_hook() is called
whenever a row is updated, deleted or inserted for a rowid table. But I
don't find this function to be invoked in my program. When will this
function be invoked??
And I am
> I have done some manual WAL decoding for my forensic software that can
> identifiy a previous DB state - its fun :)...
>
> (From memory)
>
> To determine which pages belong to the last transaction, you need to :
>
> Read the WAL header to obtain the current salt, then read each wal
> frame to
>
> Sounds to me you want to implement logical decoding, that is to
> extract an SQL form from the binary WAL format.
> I don't believe SQLite provides such a feature, that is something
> other databases use for bidirectional replication.
I just want to know which tables and rows are changed
>
> To achieve what goal?
>
> In any case, perhaps https://www.sqlite.org/rbu.html is of interest to
> you.
>
I want to make note of those changes and replicate in another DB. And I
found that WAL is the correct place where changes to the database are
present. So my main aim is to get those
>
> If you're really sure that the database files are identical, the easiest
> way to do the replication would be to copy the WAL file.
>
> What processing do you want to do?
>
I want to take note of changes and depending on data, I might replicate in
some other DB. The database files are not
>
> This requires detailed knowledge of how SQLite works. If the file format
> page I referred you to does not help you may have to study the SQLite
> source code to find out what you need.
>
Yeah I read the source file wal.c and based on what I read, SQLite syncs
the frames which have page data
My main aim is to find the fresh changes which are to be made to database
through WAL module.
How is data stored in WAL?
If the data is stored in pages inside WAL then how to see the changes which
are presently made to the database?
Should I decrypt the information from WAL to know the changes
Before checkpointing the data from WAL, if the DB is queried, will the
result include updated data from WAL or not?
Will this situation arise? because writing to WAL and checkpoint occur very
fast but if a query comes in between, will the result be updated or not
before checkpoint.
Is it necessary to have AVL tree in closure tables method and does it
result in speed improvements?
On Wed, Sep 9, 2015 at 4:59 PM, Richard Hipp wrote:
> On 9/9/15, Sairam Gaddam wrote:
> > I know that one of the method to compute transitive closure is closure
> > tables metho
I know that one of the method to compute transitive closure is closure
tables method. But I didn't understand why AVL tree implementation is
present in the closure.c extension in order to compute transitive closure
because the result can be directly queried from the Virtual table(closure
table).
Deep inside SQLite source files, there is a module called closure.c for
computing transitive closure and it is provided as an extension.
Inside, it uses an AVL tree implementation, so why to use that kind of
implementation(or importance) for computing transitive closure in this case?
And when is
> Hello !
>
> Look this comment on ext/misc/closure.c:
>
> --
>
> ** When it is created, the new transitive_closure table may be supplied
> ** with default values for the name of a table T and columns T.X and T.P.
> ** *The T.X and T.P columns must contain integers*. The ideal case is
> for
>
>
> Given that SQLite supports CTE's now, why use that extension?
>
> AFAIK, it was to add hierarchical query capability to SQLite, which CTE
> does builtin now. --DD
But will that solve my problem of having the data type of groupId other
than Integer primary key like Text???
I have enabled the transitive closure extension and I followed the steps
regarding querying the virtual table mentioned in closure.c file as follows
CREATE VIRTUAL TABLE ct1 USING transitive_closure(
tablename='group1',
idcolumn='groupId',
parentcolumn='parentId'
);
I was testing a custom SQLite with the test files and one of the
file(tclsqlite.test) gave a segmentation fault, when I used Valgrind, it
didn't give any stack trace but instead gave the following error.
==5697==
==5697== Process terminating with default action of signal 11 (SIGSEGV):
dumping
> Try "locate memleak" if the file is not present in the working directory
> of the process running the test.
>
>
I tried that but there is no file named memleak.txt in the whole system !!!
I ran the test files which are present in SQLite for my custom build and I
got some memory leaks.
I got a message like,
Writing unfreed memory log to "./memleak.txt"
But I couldn't able to locate that file.
Can anyone kindly tell where to find that file or where the unfreed memory
log is written
I want to make some changes to the result set and I need to add an extra
column.
On Mon, Jul 13, 2015 at 12:33 PM, Clemens Ladisch
wrote:
> Sairam Gaddam wrote:
> > I have tried a method to create a Mem and add a string to it, which is as
> > below
> >
> > sqlite3Vdb
I have tried a method to create a Mem and add a string to it, which is as
below
sqlite3VdbeMemInit(&(p->custom_aMem[0]), p->db, MEM_Null);
memAboutToChange(p,&(p->custom_aMem[0]));
sqlite3VdbeMemSetStr(&(p->custom_aMem[0]), zColumn ,
Sir,
I created a custom Result set in Resultrow case in sqlite3VdbeExec
function as below
custom_pResultSet = (Mem*) malloc(sizeof (Mem) * (custom_numElements));
and I initialized it using sqlite3VdbeMemInit function.
for( i = 0 ; i < custom_numElements ; i++ )
I created a custom Result set in Resultrow case in sqlite3VdbeExec function
as below
custom_pResultSet = (Mem*) malloc(sizeof (Mem) * (custom_numElements));
and I initialized it using sqlite3VdbeMemInit function.
for( i = 0 ; i < custom_numElements ; i++ )
{
I was testing a custom build of SQLite by TCL test scripts which are
present in test folder of SQLite, some of the test scripts like
multiplex.test result in an error from the line number 536 which is below
536.faultsim_restore_and_reopen
I included the file multiplex.test for
I was testing a custom build of SQLite by the test scripts which are
present in test folder of SQLite, some of the test scripts like
multiplex.test, wal4.test etc., have this line
faultsim_restore_and_reopen
which results in error.
Can anyone kindly tell what is the function of
I know that SQLite will perform some internal select statements when
executing a join query but will it break a join query and execute in parts
???
For example if I join 10 tables, will it perform join of 8 and 2 tables at
once and in turn join the result of those two joins?
How to correctly copy the contents of original VdbeOp aOp which is created
by SQlite for some query into another custom VdbeOp object.
I tried by normally copying the contents one by one but it resulted in
errors.
And how to correctly allocate memory to the custom VdbeOp object and how to
free
On Fri, May 15, 2015 at 4:46 PM, Hick Gunter wrote:
> The keyword "static" before a function name limits its visibility to the
> current source file.
>
> But many of the PRIVATE functions are not declared static like the
> "sqlite3VdbePrintOp"
function.
If they do declare, can i know where they
On Fri, May 15, 2015 at 4:42 PM, Simon Slavin wrote:
>
>
> By not declaring them in the header file you're meant to be using ?
>
But I think they are declared in the header.
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
On Fri, May 15, 2015 at 3:53 PM, Hick Gunter wrote:
> SQLITE_PRIVATE means that the function is PRIVATE.
How they achieved PRIVATE functions in C?
You are not allowed to call this function, it is not supported as part of
> the SQLite API. Because you are not allowed to call the function
In order to run .test files(sqlite test codes) in SQLite, I used
./testfixture NAMEOFFILE.test
Can anyone kindly tell which build of sqlite will TESTFIXTURE access?
Because even when I make modifications to sqlite3.c source code, the output
of the test file under test has no effect.
And one
On Tue, May 12, 2015 at 5:14 PM, Richard Hipp wrote:
>
>
> ./testfixture NAMEOFFILE.test
> testfixture.exe NAMEOFFILE.test
>
> Respectively for unix and windows.
>
> Thanks! That helped a lot.
On Tue, May 12, 2015 at 5:05 PM, Richard Hipp wrote:
>
>
> Did you try the commands provided above?
>
>
> yeah I tried those commands and installed both tcl and sqlite but i need
help in executing the .test file which requires tcl like the one I attached
in this mail.
pfa.
On Tue, May 12, 2015 at 4:36 PM, Richard Hipp wrote:
>
> Unix: ./configure; make test
>
> Windows: nmake /f makefile.msc test
>
I installed both tcl and sqlite but i need help to run .test files which
are present in test folder for sqlite!
---Original Message-----
> > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-
> > bounces at mailinglists.sqlite.org] On Behalf Of Sairam Gaddam
> > Sent: Tuesday, May 12, 2015 8:47 AM
> > To: General Discussion of SQLite Database
> > Subje
Can anyone kindly help me how to compile and run TCL test scripts ?
All the test scripts are .test files and I need help in executing them.
I installed TCL and then unpacked the SQLite archive, then typed
"./configure; make test"
what to do next?
On Fri, May 8, 2015 at 6:13 PM, Richard Hipp wrote:
> On 5/8/15, Sairam Gaddam wrote:
> > Is sqllogictest a program which can be downloaded and installed?
>
&g
Is sqllogictest a program which can be downloaded and installed?
On Fri, May 8, 2015 at 5:21 PM, Richard Hipp wrote:
> On 5/8/15, Sairam Gaddam wrote:
> > I have custom SQLite and in order to test it I downl
> > oaded sqlite-src-3081000.zip
> > (7.29 MiB) as advised, whi
I have custom SQLite and in order to test it I downl
oaded sqlite-src-3081000.zip
(7.29 MiB) as advised, which contains some test files but most of them are
.test files and how to execute them? should I use sqllogictest program? If
it should be used where is it available?
And regarding .c test
Yeah I read that link previously but how do i get all those test cases?
On Mon, Apr 27, 2015 at 5:27 PM, Simon Slavin wrote:
>
> On 27 Apr 2015, at 12:54pm, Sairam Gaddam wrote:
>
> > How SQLite is tested and can I get those test cases?
>
> <
> http://lmgtfy.com/?q=H
How SQLite is tested and can I get those test cases?
Thanks! Comments are enabled now.
On Thu, Apr 16, 2015 at 4:41 PM, Richard Hipp wrote:
> On 4/16/15, Sairam Gaddam wrote:
> > I am using C SQLite interface. How to enable comments in the VDBE program
> > here?
> > because they are not enabled by default.
> > gcc
I am using C SQLite interface. How to enable comments in the VDBE program
here?
because they are not enabled by default.
gcc -DSQLITE -DEBUG filename.c ../sqlite3.c -ldl -lpthread
I tried with the above line in the terminal but could not succeed in
enabling the comments. Can any one help me with
Yes sir, I know about " .explain ". Next time I would try that @ Richard
Hipp.
And thanks Clemens.
On Fri, Apr 10, 2015 at 3:57 PM, Clemens Ladisch wrote:
> Sairam Gaddam wrote:
> > On Thu, Apr 9, 2015 at 1:04 PM, Clemens Ladisch
> wrote:
> >> Sairam Gaddam wr
Then why there is a loop (Next opcode at 23rd instruction) over second
table when it created an index ?
On Thu, Apr 9, 2015 at 1:04 PM, Clemens Ladisch wrote:
> Sairam Gaddam wrote:
> > sql="create table em(name text primary key,age text,pts text);"\
> > "cr
//create table
sql="create table em(name text primary key,age text,pts text);"\
"create table l(name text primary key,fame text);";
//insert values
sql="insert into em values(44,20,1);"\
"insert into em values(11,20,2);"\
"insert into em values(5,21,3);"\
"insert into l values(11,11);"\
What Next opcode does is advance cursor P1 so that it points to the next
key/data pair in its table or index. If there are no more key/value pairs
then fall through to the following instruction.
But i have a program where i need clarification regarding its operation
(I inserted printf statement
01 NULL
> 16Close 1 0 000 NULL
> 17Close 0 0 000 NULL
> 18Halt 0 0 000 NULL
> 19Transaction1 0 0 00 NULL
> 20
When joining a table in sqlite with some condition using where clause,
sqlite sometimes generate less number of loops(Next opcodes) than the
number of tables.
Can anyone explain how sqlite iterates through all the tables when it has
less number of loops.
n.
>
> Since em.name and lo.name are matching primary keys, why the two tables?
> Which other entity has a lo(cation)? And how are you going to keep that
> other entity from assigning conflicting keys (i.e. those already used for
> em entries)?
>
> Are you sure the
sir,
I have a join query with 3 tables and 2 conditions in the where
clause.But the program executes by opening single loop.Can any one know how
is executes?
I have included the query and the vdbe program in the link below:
http://pastebin.com/aA3QSJ7w
chricht-----
> Von: Sairam Gaddam [mailto:gaddamsairam at gmail.com]
> Gesendet: Mittwoch, 25. Februar 2015 08:23
> An: General Discussion of SQLite Database
> Betreff: Re: [sqlite] Regarding creating a mem object and copying contents
> to it in SQLite
>
> I am trying to optimize
ou think you need to manipulate
> internal structures?
>
> -Urspr?ngliche Nachricht-
> Von: Sairam Gaddam [mailto:gaddamsairam at gmail.com]
> Gesendet: Mittwoch, 25. Februar 2015 07:41
> An: sqlite-users at sqlite.org
> Betreff: [sqlite] Regarding creating
hello,
I created a mem object in SQLite and copied a string value to its
member and i initialized some other members to default values manually, it
worked well but some times it shows realloc() error.
I also found a function sqlite3VdbeMemSetStr() which will copy the
string value
Normally for executing joins in sqlite,the vdbe program opens 1 loop for
each and every table but in my code(attached that file via pastebin) ,i am
facing an issue because it is opening only 2 loops even if i use 4 tables
in joining operation.
can anyone explain why it happened like that and
I have one doubt regarding sqlite code.
I have 2 programs-one with sqlite3_exec() included in the code and in other
it is not included.I included those files which are zmain.c and zmain1.c
respectively.
First i created a database and added a table "em" and added some contents
to it,then i executed
I have one doubt regarding sqlite code.
I have 2 programs-one with sqlite3_exec() included in the code and in other
it is not included.I included those files which are zmain.c and zmain1.c
respectively.
First i created a database and added a table "em" and added some contents
to it,then i executed
57 matches
Mail list logo