| Bug #20245 | create view with sql_cache not working | ||
|---|---|---|---|
| Submitted: | 3 Jun 2006 15:01 | Modified: | 29 Mar 2011 18:40 |
| Reporter: | Roberto Spadim (Basic Quality Contributor) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
| Version: | 5.0.23-BK, 5.1.9 | OS: | Linux (Linux, win xp sp2) |
| Assigned to: | Iggy Galarza | CPU Architecture: | Any |
[3 Jun 2006 15:01]
Roberto Spadim
[3 Jun 2006 15:13]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described on 5.0.23-BK on Linux. Looks like this problem is repeatable on all versions that supports views:
openxs@suse:~/dbs/5.0> bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.23
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create view v20245 as select sql_cache utc_timestamp();
Query OK, 0 rows affected (0.01 sec)
mysql> show create view v20245\G
*************************** 1. row ***************************
View: v20245
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY
DEFINER VIEW `v20245` AS select sql_no_cache sql_cache utc_timestamp() AS `utc_t
imestamp()`
1 row in set (0.00 sec)
Simplified test case:
create view v20245 as select sql_cache utc_timestamp();
show create view v20245;
[29 Mar 2011 18:40]
Roberto Spadim
not a problem. work with 5.5 without problem (remove SQL_CACHE from view, use it when select from view)
