In MySQL Workbench I created a model with a few tables and use forward engineer to generate the SQL code to create the database. The Table Inspector of the MySQL Workbench confirms that InnoDB engine is used for every table.
Then I used JDBC in my Java code, I called con.setAutoCommit(false) and never call con.commit(), but it seemed as if auto commit is still on. Any idea what is causing my problem here? Thanks!
The relevant code is here:
http://pastebin.com/zY8MXrBN
Simply put, this is what happened:
1. A few insert statements
2. con.rollback(); (the output "Testing abort! ....." was produced, confirming this)
3. The inserted data stayed on the database, which is the problem.