Bug #23464 | A view with an ORDER BY clause becomes non-updatable | ||
---|---|---|---|
Submitted: | 19 Oct 2006 14:02 | Modified: | 9 Feb 2007 20:20 |
Reporter: | Giuseppe Maxia | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
Version: | 5.0.27-BK, 5.0.26 and 5.1.12 | OS: | Any (all) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | updatable, Views |
[19 Oct 2006 14:02]
Giuseppe Maxia
[19 Oct 2006 14:22]
Giuseppe Maxia
Verified as described on 5.1.13-beta
[24 Oct 2006 23:05]
Hartmut Holzgraefe
expected behavior IMHO this is due to the following limitation: * "algorithm=temptable" an updatable view reqires that the view can be resolved using the MERGE algorithm, the v2 only works with TEMPTABLE though (due to the ORDER BY): mysql> drop view if exists v2; Query OK, 0 rows affected (0.00 sec) mysql> create algorithm=merge view v2 as select i from t1 order by i; Query OK, 0 rows affected, 1 warning (0.03 sec) mysql> show warnings; +---------+------+-------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+-------------------------------------------------------------------------------+ | Warning | 1354 | View merge algorithm can't be used here for now (assumed undefined algorithm) | +---------+------+-------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> drop view if exists v2; Query OK, 0 rows affected (0.00 sec) mysql> create algorithm=temptable view v2 as select i from t1 order by i; Query OK, 0 rows affected (0.01 sec) mysql> show warnings; Empty set (0.00 sec)
[9 Feb 2007 20:20]
Evgeny Potemkin
Duplicate of bug#12122.