Bug #4806 Querycache not flashed when using DROP+CREATE VIEW or ALTER VIEW

Submitted: 29 Jul 2004 16:27 Modified: 6 Aug 2004 3:19
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.1 OS:
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[29 Jul 2004 16:27] Georg Richter
Description:
When dropping and recreating a view, or altering a view query cache will not be flashed. 

How to repeat:
[16:20] root@test> create table t1 (a int); 
Query OK, 0 rows affected (0.09 sec) 
 
5.0.1-alpha-debug-log 
[16:20] root@test> insert into t1 values (1),(2); 
Query OK, 2 rows affected (0.00 sec) 
Records: 2  Duplicates: 0  Warnings: 0 
 
5.0.1-alpha-debug-log 
[16:20] root@test> create view v1 as select a, 'foo' from t1; 
Query OK, 0 rows affected (0.00 sec) 
 
5.0.1-alpha-debug-log 
[16:22] root@test> select * from v1; 
+------+-----+ 
| a    | foo | 
+------+-----+ 
|    1 | foo | 
|    2 | foo | 
+------+-----+ 
2 rows in set (0.00 sec) 
 
5.0.1-alpha-debug-log 
[16:22] root@test> drop view v1; 
Query OK, 0 rows affected (0.00 sec) 
 
5.0.1-alpha-debug-log 
[16:22] root@test> create view v1 as select a, 'foobar' from t1; 
Query OK, 0 rows affected (0.00 sec) 
 
5.0.1-alpha-debug-log 
[16:22] root@test> select * from v1; 
+------+-----+ 
| a    | foo | 
+------+-----+ 
|    1 | foo | 
|    2 | foo | 
+------+-----+ 
2 rows in set (0.00 sec) 
 
5.0.1-alpha-debug-log 
[16:22] root@test> ALTER VIEW v1 as select a from t1; 
Query OK, 0 rows affected (0.00 sec) 
 
5.0.1-alpha-debug-log 
[16:23] root@test> select * from v1; 
+------+-----+ 
| a    | foo | 
+------+-----+ 
|    1 | foo | 
|    2 | foo | 
+------+-----+ 
2 rows in set (0.00 sec)
[6 Aug 2004 3:19] MySQL Verification Team
This issue is already fixed in the current BK 5.0 tree:

...........

mysql> select * from v1;
+------+
| a    |
+------+
|    1 |
|    2 |
+------+
2 rows in set (0.00 sec)

mysql> select version();
+-----------------------+
| version()             |
+-----------------------+
| 5.0.2-alpha-debug-log |
+-----------------------+
1 row in set (0.01 sec)

mysql>

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.