On Fri, Mar 18, 2011 at 05:44, Kristian Nielsen <kniel...@knielsen-hq.org> wrote: > This is a follow up on a discussion I had with eean on Freenode IRC #maria. > > The issue is how to upgrade libmysqd from MySQL version 5.1 to version 5.5 (or > more generally any major version upgrade), in particular as relates to > Amarok's use of libmysqld. > > The procedure for upgrading a normal MySQL server is to run the mysql_upgrade > command. However, this requires a running mysqld server, so it is not > appropriate for libmysqld, or at least very inconvenient. > > We discussed this briefly at our MariaDB meeting in Lisbon, and here is what > we came up with: > > One idea is to also build mysql_upgrade_embedded; this would be a variant of > mysql_upgrade linked with libmysqld, so it does not depend on the mysqld > server. Similarly, we would need mysqlcheck_embedded (mysqlcheck is called > from mysql_upgrade). These two binaries could be included in the libmysqld > package (they are small).
wouldn't they be huge? libmysqld is a static library, so anything linking to them is going to be at least 50mb. > The upgrade procedure for amarok would then be to stop amarok linked with 5.1, > then run mysql_upgrade_embedded (from 5.5) against the amarok libmysqld data > directory, then start amarok linked with 5.5. There can't be any procedure that the user has to do. But if there is some way for us to determine if mysql_upgrade_embedded needs to be run, I don't see why this would a problem. Amarok could run it before initializing the database. > Does that sound useful? > > The other idea that came up was to add this as extra calls in the library. So > that the amarok application could just call some mysql_upgrade() function > instead of having to run an external upgrade binary. Would this be more useful > for amarok? This sounds much more straightforward. > Either way, we then need to think on how to implement this change. > > We could offer to implement this (either solution I think) in MariaDB (a > version of MariaDB that includes MySQL 5.5 is in the works). This would allow > to use the above to upgrade Amarok to using MariaDB 5.5. Would this work? Sounds good. > (I think it would even work to keep Amarok using MySQL 5.5 libmysqld, but > using MariaDB 5.5 mysql_upgrade_embedded, though that is kind of a strange > solution. Or we could provide the patch for MariaDB and you could patch > libmysqld similarly to provide the same functionality in relevant distros.) We really could care less about maria vs. mysql, we just want something that works. > Does this sound like a feasible way forward? > > One question about how Amarok uses libmysqld, which will help understand what > is needed to solve the upgrade issue: > > Does Amarok use libmysqld built with the --with-embedded-privilege-control > option, or use stored procedures, or other things that require the `mysql' > database schema to be available in MySQL? > > If this does not make sense, the answer is probably "no" :-) Doesn't make sense. :) > The background: When a normal standalone mysql database server is installed, > it is necessary to create the `mysql' database schema using > mysql_create_db. This database schema contains such things as user accounts > and passwords, stored procedure code, etc. > > Normally, libmysqld does not do any access control on accounts, and it is > possible to use it without running mysql_install_db. In fact it's a bit hard > to run mysql_install_db, as it has the same issue as mysql_upgrade. So I > assume that Amarok does not do this and just does not use account privileges > or stored procedures/functions, but just wanted to check? > > This affects how much mysql_upgrade_embedded has to do, as part of the upgrade > is to add any missing columns in tables in the `mysql' database schema. Since I talked to you last time, I've had reports of people going from mysql 5.1 to 5.5 without needing mysql_upgrade. mysql_upgrade seemed to fix things for me, but maybe it was just a coincidence. Either way though, relying on newer versions of mysql simply not needing to do any upgrade procedures seems like poor planning. Ian _______________________________________________ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel