Closed Raggaer closed 7 years ago
Looks like the problem stems from the mysql driver not accepting multiple statements in a single string.
Some related reading: https://stackoverflow.com/questions/28548559/does-a-go-mysql-driver-exist-that-supports-multiple-statements-within-a-single-s?rq=1
Possible solution, but supposedly "greatly increases the risk of SQL injections": https://github.com/go-sql-driver/mysql#multistatements
Another option in our case might be to split the query on semi-colon and execute each statement separately.
Update We might also put each table in a separate file and use an array with the filenames to execute them in the correct order. (I have confirmed that this solution solves the issue).
We can use multiStatements=true
on the installation part without problems actually. I tried and everything works fone.
Thanks
For some reason the SQL file is broken when the installer tries to run it