Bug #5994 Views: CURRENT_TIME not stored correctly in view definition
Submitted: 8 Oct 2004 21:22 Modified: 8 Oct 2004 21:44
Reporter: Peter Gulutzan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: CPU Architecture:Any

[8 Oct 2004 21:22] Peter Gulutzan
Description:
If current_time = '11:45' then a reference to CURRENT_TIME 
becomes '11:45'. It should remain CURRENT_TIME. 
 

How to repeat:
mysql> create table ts (s1 time); 
Query OK, 0 rows affected (0.29 sec) 
 
mysql> create view vs as select * from ts where current_time < '11:45' with check option; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> show create view vs; 
+------+---------------------------------------------------------------+ 
| View | Create View                                                                                                                                                             
| 
+------+---------------------------------------------------------------+ 
| vs   | CREATE ALGORITHM=UNDEFINED VIEW `db11`.`vs` AS select 
         sql_no_cache `db11`.`ts`.`s1` AS `s1` from `db11`.`ts` 
	 where (curtime() < _binary'11:45') WITH LOCAL CHECK OPTION    | 
+------+---------------------------------------------------------------+ 
1 row in set (0.00 sec)
[8 Oct 2004 21:44] Trudy Pelzer
This is not a bug, since the SHOW CREATE VIEW
shows the correct view definition.