| Bug #10536 | Displays an error message if DATE datatype is updated using 'current_time()'. | ||
|---|---|---|---|
| Submitted: | 11 May 2005 10:32 | Modified: | 13 May 2005 7:44 |
| Reporter: | Disha | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.5-beta pre-release | OS: | Windows (Windows Server 2003) |
| Assigned to: | CPU Architecture: | Any | |
[12 May 2005 4:26]
MySQL Verification Team
Verified on Linux.
[13 May 2005 7:44]
Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: How would you expect it to work ? A DATE column cannot store a date with year=2015, month=39, day=04. Doing update d1 set f1='15:39:04' will return exactly the same error.

Description: Any punctuation character may be used as the delimiter between date parts. Create a table 'd1'using DATE datatype and if inserted or updated the records using format '01:01:01' explicitly then record is get inserted or updated properly. But if table is updated using a function 'current_time()' then it fails with an error message. How to repeat: 1. delimiter // 2. create database test // 3. use test 4. set @@sql_mode='traditional'// 5. create table d1 (f1 date)// 6. insert into d1 values ('05:05:05')// 7. select * from d1// 8. update d1 set f1='01:01:01'// 9. update d1 set f1=current_time()// 10. Execution of step (9) fails with an error message as, ERROR 1292 (22007): Incorrect date value: '15:39:04' for column 'f1' at row 1 Expected Results: The table should update using function 'current_time()'. Actual Results : Table updation using a function 'current_time()' fails with an error message.