I got the error all the time
-----------------------------------------------
user warning: Table 'drupal.w3_' doesn't exist query: DELETE FROM w3_ WHERE cid = 'locale:pt' in D:\TWAPMS\TWAPMS_SMC\htdocs\v07\includes\database.mysqli.inc on line 151.
-----------------------------------------------

from cache_clear_all() in cache.ini
-----------------------------------------------
function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = NULL) {
if($table == 'cache_page') $cid = _localizer_cache_key($cid);
cache_clear_all(NULL, 'cache_page');
...

function cache_get($key, $table = 'cache') {
if($table == 'cache_page') $key = _localizer_cache_key($key);
...
-----------------------------------------------

the codes seems not consider about table prefix
or anything else?

CommentFileSizeAuthor
localizer.png8.4 KByelban

Comments

yelban’s picture

not miss table prefix
just miss "{", "}" in db_query()

db_query("DELETE FROM {%s} WHERE cid = '%s'", $table, $cid);
"{%s}" = "cache_menu"
Not "{cache_menu}"

yelban’s picture

Title: does cache_clear_all() error cause DB prefix miss » real proble

this problem was happened when first enable "language" block
only first time enable language block.
(same error happen in other operation but I can not remember)
make some trace, I found if I disable "cache_clear_all("locale:$locale");" in localizer.module 1376
then no error when enable language block first time.