MySQL Forums
Forum List  »  MyISAM

strange behaviour: #1146 but an insert some lines before was successful
Posted by: Jan Pilarzeck
Date: January 10, 2006 09:40AM

Hi there,

got a really strange behaviour with MySQL 4.0.18 and PHP - the script does the following:

1. insert a row into table xxx
2. get last_insert_id
3. do some other things
4. update the row from step 1 with sql like this:
UPDATE xxx SET yyy = 'somevalue' WHERE id = 456
id is the result of step 2

now the error: the result of the query of step 4 is "false" with the error-code #1146 - "table yyy doesn't exist".

but this occurs not always - approximately 10-15% of all script runs are NOT successful.

i wrote a logging of all sql-queries of stept 4 - the result:

all generated sql-queries have correct syntax and complete. copy&paste to the mysql-console, execute and the row was updated as it should be. also the id from step 2 was always the correct one, never wrong or even empty or null.

some further informations:
- the problem occur on different days at different times
- mysql-server already re-started
- installed new newer build for same version
- for all database-related actions the script uses the same object with the same mysql-connection
- between step 2 and step 4 there are only a few lines with some simple "if() {}" and some string-operations and NOTHING else is done in the database or with the db-object
- so shortend to db-related actions the actions are: insert - get id - update

any ideas?

Options: ReplyQuote


Subject
Views
Written By
Posted
strange behaviour: #1146 but an insert some lines before was successful
3237
January 10, 2006 09:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.