views:

60

answers:

1

Hi,

I am looking for a strategy to keep mysql and web service high availability while changing column datatype and value. The scenario is: for example, a student table has columns student id(Integer), student name (vachar) and rank percentage (Integer). The integer value in rank percentage is the percentage integer number, for example, 10 means 10%.

Now I want to change the rank percentage column data type to decimal, like 10 => 0.1. If I want to keep web service and mysql database available without interuption during change, what should I do?

Thanks!emphasized text

P.S. my backend server was developed by using J2EE, EJB3.

A: 

This will be an overkill, but there is a utility that will allow you to alter table without locking. http://code.google.com/p/openarkkit/

oak-online-alter-table: Perform a non-blocking ALTER TABLE operation.

shantanuo