Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql autocommit

 
Natraj Gudla
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am unable to switch off the autocommit mode thru my code in java , while connecting to mysql.
here, it commits all the queries which i execute immediately..
and the version of mysql which i am using is 3.23.53 ,
can anyone help me...
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So are you trying to use transactions? There are a couple of things you need to do.
First, tell us what Driver and what Driver version you are using to access the database. Some drivers don't support some features. I would suggest the latest version of the Connecter/J Driver which is 3.0.8.
Second, what type are your tables in mysql? If I remember correctly, InnoDB is the only type that supports Transactions.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does MySQL 3.23 support transactions at all?
 
Natraj Gudla
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya, sorry that i did not give the details
I am using the "org.gjt.mm.mysql.Driver" class as the driver
and my application requires to connect to the "mysql" database,
create a new database as given by the user
and create a new user , grant privileges to the user on the new database,
and then exit the application.
here i am working on the "user" and the "db" tables of the mysql database , connecting to it using the "root" and with no password.
regards
 
Justin Chudgar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure that you are not using ISAM or MyISAM tables. they do not support transactions. InnoDB and BDB(?) do. If you have the MySQL Control Center installed you can get the info you need from the table properties.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic