Bug #41561 | View creation statement hard-codes the database name | ||
---|---|---|---|
Submitted: | 17 Dec 2008 16:29 | Modified: | 17 Dec 2008 20:41 |
Reporter: | Sheeri Cabral (Candidate Quality Contributor) | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
Version: | 5.0.45 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | VIEW |
[17 Dec 2008 16:29]
Sheeri Cabral
[17 Dec 2008 16:53]
Giuseppe Maxia
This seems to happen only when you refer to a table in a different database within the view. e.g.: CREATE TABLE t1 (i int); CREATE VIEW v1 as select i from t1; SHOW CREATE VIEW v1\G *************************** 1. row *************************** View: v1 Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`msandbox`@`%` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` from `t1` create or replace view v1 as select 1 from information_schema.tables; SHOW CREATE VIEW v1\G *************************** 1. row *************************** View: v1 Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`msandbox`@`%` SQL SECURITY DEFINER VIEW `test`.`v1` AS select 1 AS `1` from `information_schema`.`tables`
[17 Dec 2008 20:41]
Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Duplicate of bug #40345