Bug #5506 Views: a view with a COLLATE clause should be updatable
Submitted: 10 Sep 2004 2:32 Modified: 17 Sep 2004 18:25
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha OS:Linux (SuSE 8.2)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[10 Sep 2004 2:32] Peter Gulutzan
Description:
The COLLATE clause is a cast which does not change the value, 
so its use doesn't mean there is an "expression". Therefore views 
which select columns that have COLLATE clauses should be 
updatable. 
 

How to repeat:
mysql> create table t (s1 char); 
Query OK, 0 rows affected (0.29 sec) 
 
mysql> create view v as select s1 collate latin1_german1_ci from t; 
Query OK, 0 rows affected (0.01 sec) 
 
mysql> insert into v values ('a'); 
ERROR 1288 (HY000): The target table v of the INSERT is not updatable
[12 Sep 2004 23:35] Peter Gulutzan
I have noticed that this was part of the original specification, so I have changed this from 
"feature request" to "non-critical bug".
[16 Sep 2004 20:47] Oleksandr Byelkin
ChangeSet 
  1.1763 04/09/16 23:45:20 bell@sanja.is.com.ua +7 -0 
  updateability of field with collation support (BUG#5506)
[17 Sep 2004 18:25] Oleksandr Byelkin
Thank you for bugreport! Bugfix is pushed into our source repository.