Bug #16110 | insert permitted into view col w/o default value | ||
---|---|---|---|
Submitted: | 31 Dec 2005 3:40 | Modified: | 23 Jul 2006 3:09 |
Reporter: | Kolbe Kegel | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
Version: | 5.0.17 | OS: | Linux (Linux) |
Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
[31 Dec 2005 3:40]
Kolbe Kegel
[28 Jun 2006 12:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8407
[4 Jul 2006 9:04]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8683
[19 Jul 2006 0:05]
Evgeny Potemkin
When compiling INSERT statements the check whether columns are provided values depends on the flag whether a field is used in that query (Field::query_id). However the check for updatability of VIEW columns (check_view_insertability()) was calling fix_fields() and thus setting the Field::query_id even for the view fields that are not referenced in the current INSERT statement. So the correct check for columns without default values ( check_that_all_fields_are_given_values() ) is assuming that all the VIEW columns were mentioned in the INSERT field list and was issuing no warnings or errors. Fixed in 5.0.25
[23 Jul 2006 3:09]
Paul DuBois
Noted in 5.0.25 changelog. When a row was inserted through a view but did not specify a value for a column that had no default value in the base table, no warning or error occurred. Now a warning occurs, or an error in strict SQL mode.