[sqlite] help with sql query / command SUM

2008-01-13 Thread Jorge Pereira
Hi folks!

I Have two tables, and i need access data from both. below it's my tables;

CREATE TABLE Product (
  CD_PROD INTEGER
CONSTRAINT PK_PROD NOT NULL PRIMARY KEY AUTOINCREMENT,
  CD_REMT_COMM INTEGER
CONSTRAINT FK_PROD_REMT_COMM REFERENCES
Remote_command(CD_REMT_COMM),
  CD_IDEN_PROD TEXT NOT NULL,
  NM_PROD TEXT NOT NULL,
  CD_ALIQ INTEGER NOT NULL
CONSTRAINT FK_PROD_ALIQ REFERENCES Aliquot(CD_ALIQ),
  CD_DEPA INTEGER NOT NULL
CONSTRAINT FK_PROD_DEPA REFERENCES Department(CD_DEPA),
  CD_MEASURE_UNIT INTEGER NOT NULL
CONSTRAINT FK_PROD_MEASURE_UNIT REFERENCES
Measure_unit(CD_MEASURE_UNIT),
  FL_UNITARY_TICKET INTEGER NOT NULL,
  CONSTRAINT FL_PROD_COMIS CHECK(FL_PROD_COMIS in (0,1)),
  CONSTRAINT FL_STOCK_PROD_CTRL CHECK(FL_STOCK_PROD_CTRL in (0,1))
);

and

CREATE TABLE Current_sale_item (
  CD_CURR_SALE_ITEM INTEGER
CONSTRAINT PK_CURR_SALE_ITEM NOT NULL PRIMARY KEY AUTOINCREMENT,
  CD_CURR_SALE INTEGER NOT NULL
CONSTRAINT FK_CURR_SALE_ITEM_CURR_SALE REFERENCES
Current_sale(CD_CURR_SALE),
  CD_PROD INTEGER NOT NULL
CONSTRAINT FK_CURR_SALE_PROD REFERENCES Product(CD_PROD),
  QT_SALE_ITEM REAL NOT NULL,
  VL_INCR_ITEM REAL NULL,
  VL_DISCT_ITEM REAL NULL,
  CD_REMT_COMD INTEGER NOT NULL,
  FL_CANC INTEGER NOT NULL
);

I execute this query below, following result.

sqlite> SELECT si.CD_CURR_SALE_ITEM,si.QT_SALE_ITEM,p.CD_IDEN_PROD,p.NM_PRODFROM
Current_sale_item si, Product p WHERE
si.CD_PROD = p.CD_PROD;
CD_CURR_SALE_ITEM|QT_SALE_ITEM|CD_IDEN_PROD|NM_PROD
1|2.0|-1|Motorola V66V
2|3.0|0003-1|Celular Sony
3|55.0|0005-1|Tabajara N195
4|1.0|-1|Motorola V66V
5|1.0|0002-1|Gradiente Strike
6|1.0|0002-1|Gradiente Strike
7|1.0|0002-1|Gradiente Strike
8|1.0|0002-1|Gradiente Strike
9|1.0|0002-1|Gradiente Strike
10|1.0|0002-1|Gradiente Strike
11|1.0|0002-1|Gradiente Strike
12|1.0|0002-1|Gradiente Strike
13|1.0|0002-1|Gradiente Strike
14|1.0|-1|Motorola V66V
15|1.0|-1|Motorola V66V
sqlite>

i need something for sum the second col, ex:

*sqlite>* SELECT si.CD_CURR_SALE_ITEM,*SUM(si.QT_SALE_ITEM)*,p.CD_IDEN_PROD,
p.NM_PROD FROM Current_sale_item si, Product p WHERE si.CD_PROD = p.CD_PROD;
CD_CURR_SALE_ITEM|QT_SALE_ITEM|CD_IDEN_PROD|NM_PROD
1|2.0|-1|Motorola V66V
2|3.0|0003-1|Celular Sony
3|55.0|0005-1|Tabajara N195
4|1.0|-1|Motorola V66V
* 5|9.0|0002-1|Gradiente Strike*
14|1.0|-1|Motorola V66V
15|1.0|-1|Motorola V66V
* sqlite> *

But, my example of query return this! :(

* sqlite>  *SELECT si.CD_CURR_SALE_ITEM,SUM(si.QT_SALE_ITEM),p.CD_IDEN_PROD,
p.NM_PROD FROM Current_sale_item si, Product p WHERE si.CD_PROD = p.CD_PROD;
si.CD_CURR_SALE_ITEM|SUM(si.QT_SALE_ITEM)|p.CD_IDEN_PROD|p.NM_PROD
15|72.0|-1|Motorola V66V
*sqlite> *

I need sum only col *si.CD_CURR_SALE* equals by p.CD_PROD
Somebody can help-me?!


Re: [sqlite] SQL error: database disk image is malformed

2008-01-13 Thread jose isaias cabrera


"Kees Nuyt" trying to help me said...


On Fri, 11 Jan 2008 15:32:28 -0500, "jose isaias cabrera"
<[EMAIL PROTECTED]> wrote:



Greetings.

I have a problem.  I have this shared DB amongst 4 co-workers where I am
getting this error:

SQL error: database disk image is malformed

that is after I do a,

select * from LSOpenProjects;

and goes and display 1006 records and then I get that error above...

1006|1006|1006|NEW||...ASCII data deleted...||
SQL error: database disk image is malformed
sqlite>

How can I recover the data all the way to record 1006?

thanks,

josé


You can try to use the .dump command of the command line tool to
recover what's left. Sometimes it works.

I had to go back to the previous day backup and I was able to recover it.


But it is weird the database is corrupted in the first place.

I agree.



Did you use any dangerous PRAGMA's to improve speed?

No.  The only PRAGMA command I have is "PRAGMA table_info(TableName);".


What's the operating system?
Let me explain: I have created a Program Manager Software.  This software 
handles two DBs:

1. a local DB on the client's machine
2. a shared DB on a shared drive.
This latter is the damaged DB.  This damaged DB is on a Shared drive handled 
by a software called Hummingbird.  The hummingbird client software is 
installed on the XP client machine to connect to the shared drive which is 
hosted on an UNIX server.  Yes, I know.  The shared DB is used to keep track 
of unique records, so each client will always have an unique record number.



Is your database on a network share / NFS / SAMBA drive, and if
so, is the filelocking of your filesystem fail proof?


I don't know about if it is working or not, but it started after lots of 
activity (new records ID requests.  This are INSERTs or UPDATES)



Or do you use a server layer that connects your users to the
database?

I don't understand the server layer part.


Does your application handle exceptions properly?

I think so.  This is the new record INSERT called,

   try
   {
 dba.execute (cmd);
   }
   catch (DBIException dbe)
   {
 DBIExceptionCaught(dbe,__LINE__);
   }

cmd contains the SQL INSERT command.

thanks for the help. 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Reasons for query execution(C library) to fail?

2008-01-13 Thread Benjamin Fuller

I was wondering what possible reasons the following query to fail on a
certain code path but not from another. When I check the database after
this function is called, from a one code path the database updates, from
the other code path the database does not update. Important to note is
that in both cases the sqlite3_last_insert_rowid(db) call returns the
correct value. This is being done through the sqlite3 C library. This is
a shared library that is being called from a UI application.

INSERT into aaa (b) values (1)

The code of the function is as follows:
char * sql_insert = "INSERT into aaa (b) values (1)";
sqlite3_stmt * statement_insert = 0;
int j= 0;

j = sqlite3_prepare_v2(db, sql_insert, -1, &statement_insert, NULL);
if(j!=SQLITE_OK){ goto err; }
j= sqlite3_step(statement_insert);
if(j!=SQLITE_DONE){ goto err; }

err:
if(statement_insert){ sqlite3_finalize(statement_insert); }


return sqlite3_last_insert_rowid(id);



The schema for the table:

CREATE TABLE aaa (
a integer not null primary key,
b blob not null,
c integer not null default 0,
d integer not null default 0,
insert_time data
);
CREATE TRIGGER bb after insert on aaa
begin
update aaa set insert_time= strftime('%Y-%m-%d %H:%m:%f', 'now','utc')
where id = new.id;
end; 


Thanks in advance,

Ben 


Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Jim Dodgen

this was a true complement and nothing else.

P Kishor wrote:

On 1/13/08, Joe Wilson <[EMAIL PROTECTED]> wrote:
  

--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:


There are people on this mailing list (ex: Joe Wilson) who appear
to read every line of every change that we make to SQLite, within
minutes of making them, and complain if we so much as misspell a
word in a comment.  And I haven't heard a peep from Joe
  

Wow - what prompted that dig against me?

Fixing a spelling mistake in a comment adds no value to the software.
None of those spelling mistake tickets are my doing.

The majority of the tickets I've reported were legitimate problems
in the code - and arguing the case for some of these bugs isn't
exactly the easiest thing. But hey, it's cool. I won't file any
more tickets.





honestly, coming from Richard, that is most definitely a compliment to
an "old friend" indicative of the value of your contribution.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



  



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:
> Sorry for the confusion. 

No problem.

For what it's worth, I am also curious as to the final form of the 
VM opcode transformation. The number of opcodes generated by the various
SQL statements seems to be roughly the same as the old scheme. At this 
point without sub-expresssion elimination are you seeing any speed 
improvement?



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rick Langschultz wrote:
> I was wondering what would constitute the creation of SQLite 4.0?

An incompatible API, or significant behaviour changes.

> Since the VDBE is being revamped I would consider this a pretty big
> revamp of the SQLite code. 

The VDBE is not visible outside of the SQLite library except when
EXPLAIN is used.  It is immaterial to you as a user of SQLite as long as
it is correctly implemented.  For example if SQLite started counting
internally using roman numerals but still always gave correct (decimal)
results then it doesn't matter.

> I also wanted to know what the difference between stack based and
> register based is. Unfortunately, i do not mess with a lot of C / C++
> code in my work. So I was a little curious.

http://en.wikipedia.org/wiki/Virtual_machine#List_of_virtual_machine_software

Except for trivial ones, all virtual machines have a stack.  For example
it is how you implement recursion with the stack growing and shrinking
as you enter and leave "functions".  It is also where intermediate
values are stored.  Expressions are "compiled" to work on the stack.
For example something like b+2*c would become something like:

  push b
  push 2
  push c
  mulitply
  add

To understand this well, I strongly recommend looking up the Forth
programming language and a few Forth tutorials.

Stack based virtual machines as above are easy to understand and
implement.  However there is a limit to their performance.  Every
operation manipulates the stack and you can end up with a lot of stack
manipulation code as operations such as add and multiply in the example
above only work on the top operands of the stack. You also have to be
careful when generating the opcodes that you don't overflow the stack,
and that functions return the stack in the same state they found it (it
would be disastrous if there were more or less entries on it).

Real hardware uses both a stack and registers.  Registers are a fast
temporary storage location, but you can still use the stack.  For
example an x86 processor in 32 bit mode has 8 registers.  For virtual
machines there is no need to limit how many registers there are.

http://en.wikipedia.org/wiki/Processor_register

Current best practise in compilers is to use registers (and has been for
many decades).  Look up three address code and SSA as well as the
optimisations they allow.  It is also easier to JIT register based code.

Virtual machines up to and including Java tended to be stack based.
.NET, parrot, llvm etc are all register based because of the advantages.

In the case of SQLite I suspect that being register based will result in
fewer operations per program and each operation will execute faster (no
futzing with the stack).  You can try it for yourself by using EXPLAIN
in 3.5.4 vs CVS.

Here is a good description of why the Parrot VM used register rather
than stack:

 http://www.sidhe.org/~dan/blog/archives/000189.html

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHitZnmOOfHg372QQRAljEAJ97yFOuWh6/lOlV572iUjHrHThMfgCfQsjN
LMCBk5uiO5IAsUADf96F9lQ=
=VNz/
-END PGP SIGNATURE-

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Bill KING
A colleague brought up a very good point. At least for the first few
revisions, is the old engine/code still going to be available until the
new engine code base settles down? (via #defines maybe?). It would lead
towards a good chance of comparison between the two engines too for people.

D. Richard Hipp wrote:
>
> On Jan 13, 2008, at 11:31 AM, Rich Shepard wrote:
>
>> On Sun, 13 Jan 2008, Darren Duncan wrote:
>>
>>> I would think something like that is worthy of a 3.6.0 version
>>> number. Not just a minor version increase that would be more
>>> suitable for minor
>>> changes or bugfixes.
>>
>>   I agree with Darren that massive changes to the core of the system
>> should
>> be reflected by a major version increase (to 4.0); at a minimum to a
>> minor
>> version increease (to 3.6). A version number change from 3.5.4 to 3.5.5
>> tells folks that it's a minor bug fix or simple adjustment, not a
>> wholesale
>> rewrite of the system's core.
>>
>
> There are no user-visible changes to the interface.  The version numbers
> in SQLite reflect user-visible changes only.
>
> Well, there is one minor user-visible change.  The output of EXPLAIN now
> has 7 columns whereas it used to contain only 5.  But the output of
> EXPLAIN
> changes from point release to point release all the time anyway, so I do
> not consider this something worth bumping a version number.
>
> I do not expect significant instability with the next release.  I want
> to gain
> some experience with the new software before I recommend it for millions
> of deployments.  But it should be solid and stable as soon as it is
> released.
> For that matter, the current code in CVS (which is well into the
> conversion
> to a register machine) has not been giving any problems.  There are
> people
> on this mailing list (ex: Joe Wilson) who appear to read every line of
> every
> change that we make to SQLite, within minutes of making them, and
> complain
> if we so much as misspell a word in a comment.  And I haven't heard a
> peep
> from Joe or anybody else, so I'm thinking the code is still working
> correctly
> for everybody despite the massive changes that have already gone in.
> If you find that the current code in CVS gives problems, or if you see
> significant problems emerge as we get closer to releasing 3.5.5, then
> maybe we might consider calling it 3.6.0.  But I do not anticipate any
> serious problems.  You should not underestimate the level of detail to
> which we test SQLite and the thoroughness of the test suite.  Not much
> is likely to slip through the cracks.
>
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>
>
>
> -
>
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>
>


-- 
Bill King, Software Engineer
Trolltech, Brisbane Technology Park
26 Brandl St, Eight Mile Plains, 
QLD, Australia, 4113
Tel + 61 7 3219 9906 (x137)
Fax + 61 7 3219 9938
mobile: 0423 532 733


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Darren Duncan

At 8:46 PM -0600 1/13/08, Rick Langschultz wrote:

I was wondering what would constitute the creation of SQLite 4.0?

Since the VDBE is being revamped I would consider this a pretty big 
revamp of the SQLite code. I am looking forward to testing this out 
new engine out.


I also wanted to know what the difference between stack based and 
register based is. Unfortunately, i do not mess with a lot of C / 
C++ code in my work. So I was a little curious.


Although I would have considered the current large update to be 3.6.0 
material, I definitely do *not* consider it to be 4.0.0 material.


Major version updates (such as to 4.0) should not be done lightly, 
and should only be done for things like large or particularly 
incompatible database file format changes, such as the 2.x to 3.x 
update was, or for large or incompatible API changes, either way 
things that users could have no excuse not to notice.


So I agree with Richard's current versioning plan concerning this.

-- Darren Duncan

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Rick Langschultz

I was wondering what would constitute the creation of SQLite 4.0?

Since the VDBE is being revamped I would consider this a pretty big  
revamp of the SQLite code. I am looking forward to testing this out  
new engine out.


I also wanted to know what the difference between stack based and  
register based is. Unfortunately, i do not mess with a lot of C / C++  
code in my work. So I was a little curious.


On Jan 13, 2008, at 7:41 PM, D. Richard Hipp wrote:



On Jan 13, 2008, at 7:53 PM, Gerry Snyder wrote:


Joe Wilson wrote:

--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:

There are people on this mailing list (ex: Joe Wilson) who appear  
to read every line of every change that we make to SQLite, within  
minutes of making them, and complain if we so much as misspell a  
word in a comment.  And I haven't heard a peep from Joe


Wow - what prompted that dig against me?


I took it as a kidding compliment. I saw an invisible smiley after  
his comment.


Your contributions to SQLite are appreciated by all of us.



Exactly.  My remark was meant to indicate that I am amazed at how
much attention you pay to the code, not any kind of a dig.  Sorry for
the confusion.  You are an important member of the quality assurance
team and I hope that you will continue in that role.


D. Richard Hipp
[EMAIL PROTECTED]




-
To unsubscribe, send email to [EMAIL PROTECTED]
-





smime.p7s
Description: S/MIME cryptographic signature


[sqlite] Re: Re: How do I do this

2008-01-13 Thread Igor Tandetnik

Vishal Mailinglist  wrote:

Hi ,

I knew I was not explaining better.


sno | id | amount

1| 1 |  200
2| 1 | 300
3   |  2 | 100
4  | 2 | 100
5 | 1 | 500

how could I subtract the sno 1 id 1 and sno 2 id 1 amount .


select
(select amount from tableName where sno=1 and id=1) -
(select amount from tableName where sno=2 and id=1);



What if I do not have control over sno i.e it is  random or
unpredictable , I want to subtract it in order of occurrence. Like
doing subtracion of sno 2 and 5 and so on may be next occurance for
id 1 is at sno 20 , then what.


I don't understand what you are trying to achieve. What would be the 
correct output on your example?


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread D. Richard Hipp


On Jan 13, 2008, at 7:53 PM, Gerry Snyder wrote:


Joe Wilson wrote:

--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:

There are people on this mailing list (ex: Joe Wilson) who appear  
to read every line of every change that we make to SQLite, within  
minutes of making them, and complain if we so much as misspell a  
word in a comment.  And I haven't heard a peep from Joe


Wow - what prompted that dig against me?


I took it as a kidding compliment. I saw an invisible smiley after  
his comment.


Your contributions to SQLite are appreciated by all of us.



Exactly.  My remark was meant to indicate that I am amazed at how
much attention you pay to the code, not any kind of a dig.  Sorry for
the confusion.  You are an important member of the quality assurance
team and I hope that you will continue in that role.


D. Richard Hipp
[EMAIL PROTECTED]




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Re: How do I do this

2008-01-13 Thread miguel manese
On Jan 14, 2008 9:09 AM, Vishal Mailinglist <[EMAIL PROTECTED]> wrote:
> > sno | id | amount
> > > 1| 1 |  200
> > > 2| 1 | 300
> > > 3   |  2 | 100
> > > 4  | 2 | 100
> > > 5 | 1 | 500
> What if I do not have control over sno i.e it is  random or unpredictable ,
> I want to subtract it in order of occurrence. Like doing subtracion of sno 2
> and 5 and so on may be next occurance for id 1 is at sno 20 , then what.

The simple solution is to select both rows separately and then
subtract it in your application. Really, if it were me I'd do that.

Or you can use sum(), the only problem is how to make the the amount
to be subtracted negative. Something like below, where the amount with
the lower sno is turned negative.

select sum(case when sno=(select min(sno) from tableName where (sno=?
and id=?) or (sno=? and id=?)) then -amount else amount end)
from tableName where (sno=? and id=?) or (sno=? and id=?)

M. Manese

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Re: How do I do this

2008-01-13 Thread Vishal Mailinglist
Hi ,

I knew I was not explaining better.

> sno | id | amount
> > 1| 1 |  200
> > 2| 1 | 300
> > 3   |  2 | 100
> > 4  | 2 | 100
> > 5 | 1 | 500
> >
> > how could I subtract the sno 1 id 1 and sno 2 id 1 amount .
>
> select
> (select amount from tableName where sno=1 and id=1) -
> (select amount from tableName where sno=2 and id=1);
>
>
What if I do not have control over sno i.e it is  random or unpredictable ,
I want to subtract it in order of occurrence. Like doing subtracion of sno 2
and 5 and so on may be next occurance for id 1 is at sno 20 , then what.


-- 
Regards,
Vishal Kashyap.
Need help visit
http://help.vishal.net.in


Re: [sqlite] Next Version of SQLite

2008-01-13 Thread P Kishor
On 1/13/08, Joe Wilson <[EMAIL PROTECTED]> wrote:
> --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:
> > There are people on this mailing list (ex: Joe Wilson) who appear
> > to read every line of every change that we make to SQLite, within
> > minutes of making them, and complain if we so much as misspell a
> > word in a comment.  And I haven't heard a peep from Joe
>
> Wow - what prompted that dig against me?
>
> Fixing a spelling mistake in a comment adds no value to the software.
> None of those spelling mistake tickets are my doing.
>
> The majority of the tickets I've reported were legitimate problems
> in the code - and arguing the case for some of these bugs isn't
> exactly the easiest thing. But hey, it's cool. I won't file any
> more tickets.
>


honestly, coming from Richard, that is most definitely a compliment to
an "old friend" indicative of the value of your contribution.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Gerry Snyder

Joe Wilson wrote:

--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:
  
There are people on this mailing list (ex: Joe Wilson) who appear 
to read every line of every change that we make to SQLite, within 
minutes of making them, and complain if we so much as misspell a 
word in a comment.  And I haven't heard a peep from Joe 



Wow - what prompted that dig against me?


I took it as a kidding compliment. I saw an invisible smiley after his 
comment.


Your contributions to SQLite are appreciated by all of us.

Please continue.

Gerry



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:
> There are people on this mailing list (ex: Joe Wilson) who appear 
> to read every line of every change that we make to SQLite, within 
> minutes of making them, and complain if we so much as misspell a 
> word in a comment.  And I haven't heard a peep from Joe 

Wow - what prompted that dig against me?

Fixing a spelling mistake in a comment adds no value to the software. 
None of those spelling mistake tickets are my doing. 

The majority of the tickets I've reported were legitimate problems 
in the code - and arguing the case for some of these bugs isn't 
exactly the easiest thing. But hey, it's cool. I won't file any 
more tickets.



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] wxgrid fed with sqlite

2008-01-13 Thread sqlfan

has anyone fed an editable wxgrid with sqlite?
-- 
View this message in context: 
http://www.nabble.com/wxgrid-fed-with-sqlite-tp14790059p14790059.html
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread D. Richard Hipp


On Jan 13, 2008, at 11:40 AM, Marco Bambini wrote:


What will be the main benefits of the new virtual machine?



Optimizations such as common subexpression elimination
and moving subexpressions outside of inner loops will become
much easier.  The code generator will, in general, be easier to
work on and less error prone.  An entire class of errors (stack
overflow) such as the recent ticket #2832 (which could cause
database corruption) will become impossible since the VM will
no longer have a stack to overflow.


D. Richard Hipp
[EMAIL PROTECTED]




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread D. Richard Hipp


On Jan 13, 2008, at 11:31 AM, Rich Shepard wrote:


On Sun, 13 Jan 2008, Darren Duncan wrote:

I would think something like that is worthy of a 3.6.0 version  
number. Not just a minor version increase that would be more  
suitable for minor

changes or bugfixes.


  I agree with Darren that massive changes to the core of the  
system should
be reflected by a major version increase (to 4.0); at a minimum to  
a minor
version increease (to 3.6). A version number change from 3.5.4 to  
3.5.5
tells folks that it's a minor bug fix or simple adjustment, not a  
wholesale

rewrite of the system's core.



There are no user-visible changes to the interface.  The version numbers
in SQLite reflect user-visible changes only.

Well, there is one minor user-visible change.  The output of EXPLAIN now
has 7 columns whereas it used to contain only 5.  But the output of  
EXPLAIN

changes from point release to point release all the time anyway, so I do
not consider this something worth bumping a version number.

I do not expect significant instability with the next release.  I  
want to gain

some experience with the new software before I recommend it for millions
of deployments.  But it should be solid and stable as soon as it is  
released.
For that matter, the current code in CVS (which is well into the  
conversion
to a register machine) has not been giving any problems.  There are  
people
on this mailing list (ex: Joe Wilson) who appear to read every line  
of every
change that we make to SQLite, within minutes of making them, and  
complain
if we so much as misspell a word in a comment.  And I haven't heard a  
peep
from Joe or anybody else, so I'm thinking the code is still working  
correctly

for everybody despite the massive changes that have already gone in.
If you find that the current code in CVS gives problems, or if you see
significant problems emerge as we get closer to releasing 3.5.5, then
maybe we might consider calling it 3.6.0.  But I do not anticipate any
serious problems.  You should not underestimate the level of detail to
which we test SQLite and the thoroughness of the test suite.  Not much
is likely to slip through the cracks.


D. Richard Hipp
[EMAIL PROTECTED]




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Marco Bambini

What will be the main benefits of the new virtual machine?
I mean, it will be just faster or there will be other improvements in  
the library?


---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/



On Jan 13, 2008, at 3:07 AM, D. Richard Hipp wrote:



On Jan 12, 2008, at 7:55 PM, Shawn Wilsher wrote:


Hey all,

I was wondering when you plan on releasing the next version of  
SQLite.
 Mozilla is currently using 3.5.4, but that does not include some  
OS/2

fixes that were checked in after the release of 3.5.4.  Instead of
patching our local copy of sqlite, I'd like to use a release version,
but at the same time do not want to delay this fix to our OS/2 users
very long.  The specific checkins we are looking at are 4646, 4647,
and 4648.



In case you haven't been watching the timeline
(http://www.sqlite.org/cvstrac/timeline) we are in the middle
of some major changes. The virtual machine inside of SQLite
is being transformed from a stack-based machine into a
register-based machine.  The whole virtual machine and
the code generator is being rewritten.  Slowly.  Piece by
piece.  I haven't done an overall line change count yet, but
we are looking at some pretty serious code churn.  3.5.4 to
3.5.5 is likely to be the biggest single change in the history
of SQLite.

So you might not want to release product with 3.5.5
embedded.  All the regression tests pass, but still

If you like, we can set up a special Mozilla branch off
of 3.5.4 that includes the OS/2 fixes.

On the other hand, if this is not for a release, but rather
for general development work, then please build and test
with the latest code from CVS.  (This applies to *everybody*
not just Mozilla.)  Please report any problems.  The test
suite for SQLite is very thorough, but I have found that users
can be very creative in stressing SQLite in ways that I would
have never imagined, and have not developed tests for.


D. Richard Hipp
[EMAIL PROTECTED]




-- 
---

To unsubscribe, send email to [EMAIL PROTECTED]
-- 
---





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Rich Shepard

On Sun, 13 Jan 2008, Darren Duncan wrote:

I would think something like that is worthy of a 3.6.0 version number. 
Not just a minor version increase that would be more suitable for minor

changes or bugfixes.


  I agree with Darren that massive changes to the core of the system should
be reflected by a major version increase (to 4.0); at a minimum to a minor
version increease (to 3.6). A version number change from 3.5.4 to 3.5.5
tells folks that it's a minor bug fix or simple adjustment, not a wholesale
rewrite of the system's core.

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
 Voice: 503-667-4517  Fax: 503-667-8863

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Darren Duncan

At 9:07 PM -0500 1/12/08, D. Richard Hipp wrote:

In case you haven't been watching the timeline
(http://www.sqlite.org/cvstrac/timeline) we are in the middle
of some major changes. The virtual machine inside of SQLite
is being transformed from a stack-based machine into a
register-based machine.  The whole virtual machine and
the code generator is being rewritten.  Slowly.  Piece by
piece.  I haven't done an overall line change count yet, but
we are looking at some pretty serious code churn.  3.5.4 to
3.5.5 is likely to be the biggest single change in the history
of SQLite.


I would think something like that is worthy of a 3.6.0 version 
number.  Not just a minor version increase that would be more 
suitable for minor changes or bugfixes.  On the other hand, I can 
understand if you save the larger increments for changes that are 
user-visible and not just plumbing. -- Darren Duncan


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] How to compile SQLite with SQLITE_ENABLE_COLUMN_METADATA option under Ubuntu Linux

2008-01-13 Thread Luc DAVID
I found some answer to my previous questions and wrote a short tutorial 
at http://source.online.free.fr/Linux_HowToCompileSQLite.html


I still have two points to solve

How can I check the functions available in the sqlite3 shared library ?
Are there some tools available to list the functions 
exported from a shared library under linux ?


Thanks !

Luc






-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] How to compile SQLite with SQLITE_ENABLE_COLUMN_METADATA option under Ubuntu Linux

2008-01-13 Thread Luc DAVID

Thanks for your answer,

I don't have time to test it now but I will let you know.
I 'm not on my linux machine but I believe gcc -c sqlite3.c generates a 
sqlite3.o file.
Is this file already usable as a shared library or do I have to call the 
linker to generate a sqlite3.so ?

How can I check the functions available in the sqlite3 shared library ?
Are some tools available to list the exported functions ?
Is 'so' the default extension for libraries under Linux ?
What is the best location to place a shared library under Linux ?


Sorry for all those annoying questions...

Thank you.

Luc

-
To unsubscribe, send email to [EMAIL PROTECTED]
-