MySQL Forums
Forum List  »  MyISAM

How to resolve this issue with the mySQL engine?
Posted by: Igor Korot
Date: September 10, 2013 03:07PM

Hi, ALL,
I have the following problem.
I am trying to use mySQL from the python script. Right now it uses InnoDB and have following code (pseudo-code):

connect to database
get the cursor
query = "INSERT INTO my_table VALUES(line,b,c);"
for line in range( 0, 5 ):
     cursor.execute( query )
db.commit()
cursor.close()
db.close()

The problem is that one of the fields in the table has to be declared as TEXT and it is possible it will be selected to be part of the index.

Upon googling, I found that MyISAM engine support full text search, but it does not support transactions, so aforementioned code will have to be rewritten.

I also looked up MyISAM engine vs. InnoDB engine comparison and I'm afraid that I don't understand something. If I lock the table, start the loop and then somewhere on the iteration the insertion fails - does this mean the database will end up with only some records?

What is a proper way of handling such case?
There is only one table involved n the query and thats it.


Thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
How to resolve this issue with the mySQL engine?
2318
September 10, 2013 03:07PM


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.