Bug #6762 | ALTER TABLE gives weird results and error message | ||
---|---|---|---|
Submitted: | 23 Nov 2004 0:30 | Modified: | 12 Apr 2005 2:28 |
Reporter: | Harrison Fisk | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | 4.1.7 | OS: | Any (all) |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[23 Nov 2004 0:30]
Harrison Fisk
[9 Feb 2005 12:34]
Tomas Ulin
verified on linux in 4.1.10 src tree (originally reported on MacOS)
[10 Feb 2005 15:09]
Magnus Blåudd
I believe this is by design, the first query against a table that is already open in mysqld 2 AND has been changed from another mysqld will fail , but the error message on the second server should of course be different. Ex, as it should be: -- try to select from ALTER'd table on other mysqld, gives false error mysql_two> SELECT * FROM t1; ERROR 114? (42S02): Table definition for 'test.t1' has changed, please retry. The reason why it should be this way is because it's not until the query is executed against NDB that the error condition is detected. Then it's too late to retry, since the information about what should be retried is lost, maybe not in this simple case, but most likely in a more advanced query. Suggested solution is to set a better error message in 4.1(but I'm not sure it's allowed to add error meassages in 4.1 anymore?, although a hardcoded one should always be possible). In 5.0 maybe we could think of a more proactive solution, like sending a signal that all open 't1' tables has to be flushed. A workaround should be to perform a FLUSH TABLES on all servers, but that does not seem to work at the moment.
[10 Feb 2005 15:13]
Magnus Blåudd
Added test file for mysql-test to reproduce problem
[4 Apr 2005 10:30]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/23613
[7 Apr 2005 18:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/23772
[7 Apr 2005 19:41]
Magnus Blåudd
Pushed to 4.1.11 and 5.0.5 It should not be that weird any more.
[12 Apr 2005 2:28]
Paul DuBois
Noted in 4.1.11, 5.0.5 changelogs.