[Owncloud] [mysql] drop MyISAM support, get better database

Daniel Danger owncloud at danger-it.de
Tue Aug 7 08:39:00 UTC 2012


On 08/07/2012 10:24 AM, Klaas Freitag wrote:
> On 06.08.2012 19:54, Daniel Danger wrote:
>> - we get support for foreign keys
> In which way do you want to make use of the support? Are you going to
> change the database definitions and all database accessing code[..]
Well, yes. That is what I wanted to do. At least for the core tables.
> 
> How does that work with our multiple database approach? I think we have
> to support at least MySQL, Sqlite, Postgres and Oracle. Does the MDB2
> layer support all these features? Does that complicate the code?
mdb2 supports foreign keys (At least that's what they say - you can
define them in the xml file). Also MySQL (if you use innodb), sqlite and
postgres support foreign keys. I haven't checked Oracle.
> 
>> I do have the code for that ready for any dev who wants to give it a
>> try. I have not tested that code enough to push it to master, yet.
> Honestly, I do not think this is something we just want to push to
> master and go with it from than. I think we should use time to get more
> experienced with it, as these kind of changes show the impact often on
> the longer run.
That's why I did _not_ push it to master ;). I wrote that code
yesterday. [1]

> Can't we have that as an additional database and keep the old MySQL
> implementation as well for the next couple of versions?
Well, if you can't depend on foreign key support in the database, you
have to do stuff like 'on delete cascade' in php code. That kinda sucks.
I'm also not sure how hard the database creation is going to fail if you
define foreign keys in the xml file, but use a mysql myisam as the
database. (Also updates might fail horribly)
> 
>> Ps.: InnoDB is the default engine in recent MySQL versions. It is also
>> supported in all older versions of mysql that I know of.
> Well, you will find lots of systems with old MySQL which either do not
> have InnoDB or InnoDB in version that you do not want to use ;-)
Well, in that case there is support for postgres and sqlite ;)

Cheers
Daniel

[1]
https://gitorious.org/~wshadow/owncloud/wshadows-owncloud/commit/5b011e8f627d4b79a2382313899a67b7d9927d76



More information about the Owncloud mailing list