[MDEV-6709] CREATE [[NO] FORCE] VIEW Created: 2014-09-08 Updated: 2021-06-03 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Views |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | James Briggs | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I submitted a patch to implement CREATE [[NO] FORCE] VIEW this weekend, but there's an issue to resolve regarding behavior of "CREATE FORCE VIEW view1 SELECT *". According to sql_view.cc: "View definition query – a SELECT statement that fully defines view. It The view definition query for CREATE VIEW view1 AS SELECT * FROM TABLE1 cannot be disambiguated if the base tables don't exist yet, and doing that at view creation time may be wrong at execution time anyway. Currently, "CREATE FORCE VIEW view1 AS SELECT * FROM TABLE1" is generated as "CREATE FORCE VIEW view1 AS SELECT AS * FROM TABLE1", with 2 "AS" tokens, causing an error on SELECT: > select * from view1; These are the choices that can be made 1) leave the original query alone as SELECT * FROM So far, I think #3 is the best choice, as the user performs the disambiguation and it's the least intrusive change to sql_view.cc. If anybody has access to Oracle Enterprise 10g or higher, maybe they can test how it's implemented there. Thanks, James. |
| Comments |
| Comment by Elena Stepanova [ 2014-09-24 ] |
|
Hi, As I understand, your patch hasn't been accepted/merged into the main tree yet. Why don't you apply the bugfix in your tree and resubmit the patch? |
| Comment by Sergei Golubchik [ 2014-11-29 ] |
|
No reply to https://lists.launchpad.net/maria-developers/msg07815.html |
| Comment by Sergei Golubchik [ 2014-11-30 ] |
|
got a reply |