Jose,

to get definitely the latest data, especially if you use the result within your transaction in the next SQL statements, you must use a locking read:

SELECT ... LOCK IN SHARE MODE;

Regards,

Heikki

----- Alkuperäinen viesti ----- Lähettäjä: "Jose Antonio" <[EMAIL PROTECTED]>
Vastaanottaja: "Heikki Tuuri" <[EMAIL PROTECTED]>
Lähetetty: Monday, January 17, 2005 11:11 AM
Aihe: Re: MySQL 4.1.8 & InnoDB: data unavailability among different connections



Thank you all for the hints.

What will be then the best solution to always get the latest data?
- Use commits (e.g. 'COMMIT; SELECT ..... ) before every select
- Use locks (e.g. 'SELECT ... LOCK IN SHARE MODE)

Thank you!

Jose.


On Sat, 15 Jan 2005 11:30:52 +0200, Heikki Tuuri <[EMAIL PROTECTED]> wrote:
Jose,

you must commit also the read transaction.

http://dev.mysql.com/doc/mysql/en/InnoDB_consistent_read.html

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables
http://www.innodb.com/order.php


Order MySQL technical support from https://order.mysql.com/


----- Original Message ----- From: "Jose Antonio" <[EMAIL PROTECTED]> Newsgroups: mailing.database.myodbc Sent: Saturday, January 15, 2005 1:34 AM Subject: Re: MySQL 4.1.8 & InnoDB: data unavailability among different connections

> I'm doing the Commit so probably is the extra settings in the SQL. Could
> you please elaborate a bit more on that?
>
> Thank you in advance,
>
> Jose.
>
> Jeff Mathis escribió:
>
>> simple answer is transactions. until you issue a commit, or otherwise
>> specify extra settings in your SQL syntax, other connections do not
>> see your data.
>>
>>
>> Jose Antonio wrote:
>>
>>> Hi!
>>>
>>> I am experiencing something weird using MySQL 4.1.8 with InnoDB >>> tables.
>>> I have an application, let's call it A, that is monitoring the data
>>> that is available in the database. The data is inserted in the
>>> database by a different application, let's call it B. The problem is
>>> the following:
>>> A starts a connection with MySQL and all the data inserted until the
>>> connection time is available; however, the data that is inserted by B
>>> while A is running is not visible to A. If A is re-started all the
>>> data that was inserted by B is now available.
>>>
>>> A is a plotting program and B is a data importer process.
>>>
>>> Any clue on what may be going wrong?
>>>
>>> Thank you in advance.
>>>
>>> Jose.
>>>
>>
>>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to