SQL store not working with MySQL
CubicrootXYZ opened this issue · comments
I am trying to get the sqlstore running with MySQL, therefore I chose the dialect "sqlite3" as it seems like only sqlite3 and postgres are supported (however I did not find any documentation on that) and it should work with a MySQL flavored database.
But as soon as I call CreateTables()
it fails due to invalid syntax as the commands executed include the datatype "bytea" which is not available in slqlite nor mysql.
SQL Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bytea NOT NULL
Sample code
cryptoStore := crypto.NewSQLCryptoStore(db, "sqlite3", account, id.DeviceID(config.DeviceID), []byte(config.DeviceKey), cryptoLogger{"Crypto"})
err := cryptoStore.CreateTables()
if err != nil {
panic (err)
}
Nevermind - got it to work with sqlite, just missed to load the olm machine. Did not expect MySQL to not work with sqlite3 commands. Will support be added for MySQL?
Probably not, most Matrix software uses SQLite or Postgres, so only those are supported here too