View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000056 | Pgpool-II | Bug | public | 2013-04-18 17:33 | 2013-04-19 14:54 |
| Reporter | harukat | Assigned To | t-ishii | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Summary | 0000056: UPDATE with alias does not discard cache | ||||
| Description | This UPDATE statement does not discard query result caches about t1 table. UPDATE t1 AS ta SET v = 'x' WHERE id = 5; ~~~~~ | ||||
| Steps To Reproduce | version: pgpool-II 3.2.3 pgpool.conf: memory_cache_enabled = on memqcache_method = 'memcached' db=# \timing Timing is on. db=# SELECT tak(16,12,6), v FROM t1 WHERE id = 5; tak | v -----+----------------- 16 | xxx xx x x x xx (1 row) Time: 6560.081 ms db=# UPDATE t1 AS ta SET v = 'x' WHERE id = 5; UPDATE 1 Time: 18.362 ms db=# SELECT tak(16,12,6), v FROM t1 WHERE id = 5; tak | v -----+----------------- 16 | xxx xx x x x xx (1 row) Time: 1.541 ms db=# UPDATE t1 SET v = 'x' WHERE id = 5; UPDATE 1 Time: 15.709 ms db=# SELECT tak(16,12,6), v FROM t1 WHERE id = 5; tak | v -----+--- 16 | x (1 row) Time: 6552.969 ms | ||||
| Tags | No tags attached. | ||||
|
|
It appeared that it is a bug with memory cache handling module. If table is used with table alias in UPDATE, pgpool-II mistakenly recognizes "foo as bar" as table name. Attached patch should fix the problem. Please try it out. Note that similar problem exists with DELETE statmente as well. |
|
|
|
|
|
I test this patch, and it works well. |
|
|
Thanks for testing. Fix committed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-04-18 17:33 | harukat | New Issue | |
| 2013-04-18 18:41 | t-ishii | Note Added: 0000264 | |
| 2013-04-18 18:41 | t-ishii | Assigned To | => t-ishii |
| 2013-04-18 18:41 | t-ishii | Status | new => feedback |
| 2013-04-18 18:41 | t-ishii | File Added: query_cache.patch | |
| 2013-04-18 18:44 | t-ishii | Note Edited: 0000264 | |
| 2013-04-19 14:40 | harukat | Note Added: 0000265 | |
| 2013-04-19 14:40 | harukat | Status | feedback => assigned |
| 2013-04-19 14:53 | t-ishii | Note Added: 0000266 | |
| 2013-04-19 14:54 | t-ishii | Status | assigned => resolved |