| Bug #27656 | mysqldump is choking on dump of views | ||
|---|---|---|---|
| Submitted: | 4 Apr 2007 19:06 | Modified: | 16 May 2007 0:41 |
| Reporter: | Jonathan Miller | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: Views | Severity: | S2 (Serious) |
| Version: | 10.12 Distrib 5.1.18-beta | OS: | Any |
| Assigned to: | Damien Katz | CPU Architecture: | Any |
[5 Apr 2007 7:53]
Sveta Smirnova
Thank you for the report. Is interesting how you created view with DEFINER=``@`` Please indicate accurate version of your mysql-5.0 master.
[5 Apr 2007 11:44]
Jonathan Miller
current mysql-5.0 clone pulled yesterday.
[16 May 2007 0:41]
Damien Katz
I can't reproduce this issue. I've tried creating view with a blanked out definer: create table t1 (a as int, b as int); create definer=''@'' view v5 (a,b) as select a,b from t1; insert into t1 VALUE(1,2); And executing a dump on the database works just fine. Are there any steps to reproduce? Is the 5.0 to 5.1 replication necessary?
[29 May 2007 13:20]
Jonathan Miller
>Are there any steps to reproduce? Is the 5.0 to 5.1 replication necessary? 1) Create a view using 5.0 Master replicated to a 5.1 slave. Try to dump the slave.

Description: Create a view using 5.0 Master replicated to a 5.1 slave. Try to dump the slave. *** Command-line *** ./mysqldump --host=localhost --user=root --port=3307 --protocol=tcp --database updown > /data2/updown/test.sql *** Error message *** mysqldump: Couldn't execute 'SHOW FIELDS FROM `v1`': There is no ''@'' registered (1449) *** create table v1; *** CREATE view updown.v1 (aid,balance) as select aid,balance from updown.account where balance < 5.00 ORDER BY aid; *** show create table v1; *** +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | View | Create View | +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v1 | CREATE ALGORITHM=UNDEFINED DEFINER=``@`` SQL SECURITY DEFINER VIEW `v1` AS select `account`.`aid` AS `aid`,`account`.`balance` AS `balance` from `account` where (`account`.`balance` < 5.00) order by `account`.`aid` | +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set, 1 warning (0.00 sec) *** Last part of dump before issue *** /*!40000 ALTER TABLE `trans` DISABLE KEYS */; /*!40000 ALTER TABLE `trans` ENABLE KEYS */; UNLOCK TABLES; -- -- Temporary table structure for view `v1` -- DROP TABLE IF EXISTS `v1`; How to repeat: see above