[MDEV-8028] MySQL bug#65388 - some views cause mysqldump to emit invalid SQL for their definitions Created: 2015-04-20 Updated: 2015-09-05 Resolved: 2015-09-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Views |
| Affects Version/s: | 5.5.41 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Rich | Assignee: | Elena Stepanova |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
CentOS 7, x86_64, package from centos7 "base" repository |
||
| Attachments: |
|
| Description |
|
I have a database from MySQL 5.0.33 which, on attempting to export/import to a more modern MySQL, emits an invalid definition of the form:
which emits: This bombs the same way on MySQL 5.0.33, MariaDB 5.5.41, and Oracle MySQL 5.7.7-rc. |
| Comments |
| Comment by Rich [ 2015-04-20 ] |
|
Same on MariaDB 10.0.17. |
| Comment by Rich [ 2015-04-20 ] |
|
"show variables" on the MariaDB 10.0.17 instance. |
| Comment by Rich [ 2015-04-20 ] |
|
I've reconstructed a query to generate this view, I'm going to try to turn this into a minimal reproducible test case and attach it... |
| Comment by Rich [ 2015-04-20 ] |
|
It seems the problem is that, on MySQL 5.0.X (at least), constructing a view of a certain format results in the "query=" field in the frm being incorrect SQL, and even though the construction of this appears to have been fixed since (at least in MariaDB 10.0.17, haven't tested anything else yet), the query= is never regenerated if old datafiles are upgraded/imported, so "show create view FOO_VIEW" will still show the incorrect SQL. I'm currently constructing a testcase from MySQL 5.0.X datafiles; when I'm done, I'll upload the SQL I used to generate it and the binary datafiles. |
| Comment by Elena Stepanova [ 2015-05-19 ] |
|
Hi, How did it go with the test case? Do you have any updates on this? |
| Comment by Elena Stepanova [ 2015-09-05 ] |
|
Please comment to re-open if you have more information. |