Re: [sqlite] Transaction question

2013-04-26 Thread Igor Tandetnik

On 4/26/2013 7:18 PM, Igor Korot wrote:

If I'm inside transaction and want to insert a record, will I see right
after executing sqlite3_step() or I have to execute a "COMMIT" statement to
see it?


The connection that executed sqlite3_step() would see its own changes 
right away. Other connections would only see changes after they've been 
committed. This is "I" in ACID.

--
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Transaction question

2013-04-26 Thread Igor Korot
Hi, ALL,
If I'm inside transaction and want to insert a record, will I see right
after executing sqlite3_step() or I have to execute a "COMMIT" statement to
see it?

Thank you.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] transaction question

2008-10-14 Thread Dan

On Oct 14, 2008, at 9:06 PM, Gene Allen wrote:

> I have a large sqlite database and I'm inserting a bunch of records  
> into it.
> My question is this..shouldn't the -journal be getting larger since  
> I've
> wrapped all the inserts inside a transaction?
>
>
>
> I'm watching the file sizes change and the main file is getting  
> larger, but
> the journal files is staying at 44kb.Is there something  
> different I have
> to do while large  Thanks
>
>
>
> Gene Allen
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] transaction question

2008-10-14 Thread Gene Allen
I have a large sqlite database and I'm inserting a bunch of records into it.
My question is this..shouldn't the -journal be getting larger since I've
wrapped all the inserts inside a transaction?

 

I'm watching the file sizes change and the main file is getting larger, but
the journal files is staying at 44kb.Is there something different I have
to do while large http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TRANSACTION-question

2004-12-03 Thread [EMAIL PROTECTED]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mime-Version: 1.0
Content-Type: multipart/mixed; x-avg-checked=avg-ok-786B32B5; 
boundary="===176C28DF==="

- --===176C28DF===
Content-Type: text/plain; x-avg-checked=avg-ok-786B32B5; charset=us-ascii; 
format=flowed
Content-Transfer-Encoding: 8bit

I work via sqlite3_prepare and submit this transaction at once... What I 
now saw is that prepare only parses 1 action ... Is that correct?

At 12:51 3/12/2004, you wrote:

>Steven Van Ingelgem wrote:
>>Hi,
>>I do the following (SQLite 308 from C++ source in windows):
>>BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT 
>>TRANSACTION; END TRANSACTION;
>>Now, nothing is done? Nothing inserted, nothing deleted from Inbox...
>
>Probably you are encountering an error which is causing the
>transaction to roll back.  Check your return codes.
>
>COMMIT ends the transaction.  The END is redundant.
>
>
>--
>D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
>
>
>
>

- --===176C28DF===--

-BEGIN PGP SIGNATURE-
Version: PGP 8.0.3

iQA/AwUBQbBpE8pHmxag5XckEQJjogCZAcJxdn/xqZ2BGkIdrkjGLyDmrO4AoPT9
Yom25cqVcvtGZ3aUDvX2WP0H
=Qdrd
-END PGP SIGNATURE-



Re: [sqlite] TRANSACTION-question

2004-12-03 Thread D. Richard Hipp
Steven Van Ingelgem wrote:
Hi,
I do the following (SQLite 308 from C++ source in windows):
BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT 
TRANSACTION; END TRANSACTION;

Now, nothing is done? Nothing inserted, nothing deleted from Inbox...
Probably you are encountering an error which is causing the
transaction to roll back.  Check your return codes.
COMMIT ends the transaction.  The END is redundant.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] TRANSACTION-question

2004-12-03 Thread Steven Van Ingelgem


Hmmm, it doesn't work... It still doesn't write to the 
database.
When I do everything without a transaction, it is written correctly, but
I don't want it because I first empty the whole table. Now if the pc
crashes, everything is lost. And that's not what I want... So only when
the complete transaction is finished I want it to continue.

At 10:26 3/12/2004, you wrote:
Yes, you do it.
Bye
  - Original Message - 
  From: Steven Van Ingelgem 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 03, 2004 10:02 AM
  Subject: Re: [sqlite] TRANSACTION-question

  Do you automatically end a transaction when committing?
  At 09:11 3/12/2004, you wrote:

    Hi Steven,
    I used transactions in C++ code (windows and linux)
with sqlite 2.8;
    try the sequence " BEGIN; DELETE ...; INSERT ...;
COMMIT; ", it works in 2.8.
    Regards
    Paolo 
  - Original Message - 
  From: Steven Van Ingelgem 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 03, 2004 8:51
AM
  Subject: [sqlite]
TRANSACTION-question

  Hi,
  I do the following (SQLite 308 from C++
source in windows):
  BEGIN DEFERRED TRANSACTION;DELETE FROM
Inbox;INSERT...;COMMIT TRANSACTION; END TRANSACTION;
  Now, nothing is done? Nothing inserted,
nothing deleted from Inbox...
  Then I tried to execute the same
afterwards, but then I got that I am already in a transaction? Is that
possible or should I look further?
  Does a commit end the transaction, or
should I end it anyhow?

  Thx,

  KaReL (aka Steven)
  Main Webpage :
http://www.karels0ft.be/
  ICQ
#    : 35217584
  KaReL (aka Steven)
  Main Webpage :
http://www.karels0ft.be/
  ICQ #    :
35217584


KaReL (aka Steven)
Main Webpage :
http://www.karels0ft.be/
ICQ #    :
35217584





pgpZbry6ZHQ7y.pgp
Description: PGP signature


Re: [sqlite] TRANSACTION-question

2004-12-03 Thread P. Morandi
Yes, you do it.
Bye
  - Original Message - 
  From: Steven Van Ingelgem 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 03, 2004 10:02 AM
  Subject: Re: [sqlite] TRANSACTION-question


  Do you automatically end a transaction when committing?

  At 09:11 3/12/2004, you wrote:


Hi Steven,
I used transactions in C++ code (windows and linux) with sqlite 2.8;
try the sequence " BEGIN; DELETE ...; INSERT ...; COMMIT; ", it works in 
2.8.
Regards
Paolo 
  - Original Message - 
  From: Steven Van Ingelgem 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 03, 2004 8:51 AM
  Subject: [sqlite] TRANSACTION-question


  Hi,

  I do the following (SQLite 308 from C++ source in windows):

  BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT 
TRANSACTION; END TRANSACTION;

  Now, nothing is done? Nothing inserted, nothing deleted from Inbox...

  Then I tried to execute the same afterwards, but then I got that I am 
already in a transaction? Is that possible or should I look further?

  Does a commit end the transaction, or should I end it anyhow?


  Thx,



  KaReL (aka Steven)

  Main Webpage : http://www.karels0ft.be/
  ICQ #: 35217584

  KaReL (aka Steven)

  Main Webpage : http://www.karels0ft.be/
  ICQ #: 35217584



Re: [sqlite] TRANSACTION-question

2004-12-03 Thread Steven Van Ingelgem


Do you automatically end a transaction when committing?
At 09:11 3/12/2004, you wrote:
Hi Steven,
I used transactions in C++ code (windows and linux) with sqlite 
2.8;
try the sequence " BEGIN; DELETE ...; INSERT ...; COMMIT; ", it
works in 2.8.
Regards
Paolo 
  - Original Message - 
  From: Steven Van Ingelgem 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 03, 2004 8:51 AM
  Subject: [sqlite] TRANSACTION-question

  Hi,
  I do the following (SQLite 308 from C++ source in
windows):
  BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT
TRANSACTION; END TRANSACTION;
  Now, nothing is done? Nothing inserted, nothing deleted from
Inbox...
  Then I tried to execute the same afterwards, but then I got that I
am already in a transaction? Is that possible or should I look
further?
  Does a commit end the transaction, or should I end it
anyhow?

  Thx,

  KaReL (aka Steven)
  Main Webpage :
http://www.karels0ft.be/
  ICQ #    :
35217584


KaReL (aka Steven)
Main Webpage :
http://www.karels0ft.be/
ICQ #    :
35217584





pgp28wWEMi9Uy.pgp
Description: PGP signature


Re: [sqlite] TRANSACTION-question

2004-12-03 Thread P. Morandi
Hi Steven,
I used transactions in C++ code (windows and linux) with sqlite 2.8;
try the sequence " BEGIN; DELETE ...; INSERT ...; COMMIT; ", it works in 2.8.
Regards
Paolo 
  - Original Message - 
  From: Steven Van Ingelgem 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 03, 2004 8:51 AM
  Subject: [sqlite] TRANSACTION-question


  Hi,

  I do the following (SQLite 308 from C++ source in windows):

  BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT TRANSACTION; 
END TRANSACTION;

  Now, nothing is done? Nothing inserted, nothing deleted from Inbox...

  Then I tried to execute the same afterwards, but then I got that I am already 
in a transaction? Is that possible or should I look further?

  Does a commit end the transaction, or should I end it anyhow?


  Thx,



  KaReL (aka Steven)

  Main Webpage : http://www.karels0ft.be/
  ICQ #: 35217584



[sqlite] TRANSACTION-question

2004-12-02 Thread Steven Van Ingelgem


Hi,
I do the following (SQLite 308 from C++ source in windows):
BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT
TRANSACTION; END TRANSACTION;
Now, nothing is done? Nothing inserted, nothing deleted from
Inbox...
Then I tried to execute the same afterwards, but then I got that I am
already in a transaction? Is that possible or should I look
further?
Does a commit end the transaction, or should I end it anyhow?

Thx,


KaReL (aka Steven)
Main Webpage :
http://www.karels0ft.be/
ICQ #    :
35217584





pgpCVnosfvaO4.pgp
Description: PGP signature