[MDEV-9742] Renaming column in MariaDB 10.0.24/MariaDB 10.0.21/MariaDB 10.0.23-log is doing table copy Created: 2016-03-16 Updated: 2016-04-18 Resolved: 2016-04-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 10.0.24 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Harsh Pandit | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | innodb, need_feedback | ||
| Environment: |
Ubuntu 14.04 (trusty), AWS Instance |
||
| Attachments: |
|
| Description |
|
Hi Everyone ! I recently discovered that doing table's column renaming in MariaDB Versions like MariaDB 10.0.24/MariaDB 10.0.21/MariaDB do copy tmp table operation however in MySQL 5.6.28, The same doesn't happen and executes in mili seconds. executed query : alter table table1 change column_name new_column_name varchar(255) not null; Ideally this operation shouldn't take any time but on mentioned versions, This is causing complete table copy like operation. Please check attached snapshot for better understanding. FYI : Both servers are having same amount of data in the table and charset/collation are also same at both. I've tried it on other versions of Mariadb like 10.0.24 and 10.0.21 however, copy operation is happening at these as well. |
| Comments |
| Comment by Elena Stepanova [ 2016-03-16 ] | |||
|
Hi, I don't understand your example in the screenshot. You have the same version of MariaDB there, yet the left part shows that the operation is almost instant, the right part shows it apparently takes time and runs in stages. What did you mean to demonstrate by it? Please also paste a bigger excerpt from the client, e.g. the unabridged output of
Thanks. | |||
| Comment by Harsh Pandit [ 2016-03-21 ] | |||
|
Hi Elena Thanks for your reply ! This is what i wanted to showcase here, I have two MariaDB Versions (minor different i.e. trusty and trusty-log) . Table size is same at both left and right side of versions however, In left, alter seems changing just the frm file of this table however in the right side, It's trying to copy the whole table. In MySQL 5.6.28, This operation is just fine like updating frm file which takes about a sec or so however, In MariaDB 10.0.24 or MariaDB 10.0.23-log, This is doing table copy. I just wanted to know if there is any variable which can be tuned to control this behaviour or if this is version specific. | |||
| Comment by Elena Stepanova [ 2016-03-21 ] | |||
|
Please paste the full output of the queries as requested above from the server where you experience the problem, or better from both servers. | |||
| Comment by Elena Stepanova [ 2016-04-18 ] | |||
|
Please comment to re-open if you have further information on the issue. |