The Fix: To correct the problem, I inserted the following into the hibernate section:
dialect='org.hibernate.dialect.MySQL5InnoDBDialect'When I ran my tests, there were a couple of changes that need to be made mainly because transactions were now working correctly. The next step was to repair the production database.
The Repair: The sql rebuild script needed to be modified to replace MyISAM with InnoDB--a perfect job for groovy. Here is the script:
#!/usr/bin/env groovy
file = new File( 'production.sql' )
new File('fix.sql').withPrintWriter { writer ->
file.eachLine { line ->
writer.println(line.replace('MyISAM', 'InnoDB'))
}
}
Simple to implement. Very groovy, and now with transactions!
No comments:
Post a Comment