hi david, caleb,

On Thu, Jan 05, 2006 at 12:39:47AM -0500, Caleb Epstein wrote:
>       The manual fix is to run "mysql_convert_table_format mysql" to
>       upgrade your "mysql" database to the MyISAM table format and
>       then the upgrade to 5.0 should go smoothly.
> 
>       If you have any data at risk, run "mysqldump --opt
>       --all-databases" so you can recover your data if something
>       tragic happens.
> 
>       Maintainers: perhaps the preinst should check for any
>       databases having .IS[MD] files and abort if they are found,
>       warning the user to run mysql_convert_table_format or possibly
>       running it for them before stopping and purging the old 4.1
>       server?

having spent a bit of time thinking about it, it's a touch more
complicated than it may seem at first glance.  here are some
potential gotchas:

- the best/only reliable place to run this is in new.preinst.
- as a result, we can only use files/scripts that exist in the
  older version.
- this also means we can not say "we will now fail and you should
  read the contents of /usr/share/doc/foo" (though we could refer
  them to rtfm since the tfm already exists)
- mysql_convert_table requires passing sensitive data on the cmdline

given all this i think the following should cover it:

[new.preinst]
- determine list of dbs/tables containing old format, ignore if empty
- debconf prompt to determine whether to abort/fix/ignore
- if fix
        - start mysql (should be stopped by old.prerm)
        - issue ALTER TABLE commands manually using debian-sys-maint
          account
                - if debian-sys-maint can not connect, inform the
                  admin and then fall back as if "abort" had been
                  chosen.
        - stop mysql server


so then the only thing that's missing is the actual code, and
some debconf templates.   christian: what do you think?

could one of you guys provide me with the output from find /var/lib/mysql,
to make my testing just a bit faster?


thanks
        sean

-- 

Attachment: signature.asc
Description: Digital signature

Reply via email to