0

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tienda_drupal.cache_views' doesn't exist: TRUNCATE {cache_views} ; Array ( ) in cache_clear_all() (line 165 of C:\xampp\htdocs\tienda\includes\cache.inc).

I tried using the query with MYSQL workbench but I get the error table dosent exists. I also used phpmyadmin queries and it wont create.

CREATE TABLE IF NOT EXISTS cache_views ( cid varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.', data longblob COMMENT 'A collection of data to cache.', expire int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', created int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.', serialized smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).', PRIMARY KEY (cid), KEY expire (expire) ) ;

Betoo
  • 23
  • 7
  • even creating the table manually at phpmyadmin gives me the same error – Betoo Dec 24 '13 at 17:16
  • Can you verify if the cache_views table exists in your db? What kind of error message are you getting when you manually create the table? – pamatt Dec 26 '13 at 22:45
  • Check your moudule_name_views.inc file there you must have created the views for your custom table and name must be wrong or table doesn't exists but in views file its there. – Ranjeet SIngh Dec 27 '13 at 04:23
  • @pamatt cache_views table doesnt exists. – Betoo Dec 28 '13 at 11:22
  • @RanjeetSIngh theres no new module I have created, its just the plain views module. – Betoo Dec 28 '13 at 11:23
  • @pamatt when I manualy create the table its says"table already exists" although I cant see it. – Betoo Dec 28 '13 at 11:24
  • Do one thing truncate all the data from the cache tables. – Ranjeet SIngh Dec 28 '13 at 15:05
  • It seems to me this is a mysql issue, not a Drupal one. Can you post more details about your mysql configuration? Since you are on Drupal 7 most (all?) of your tables should be InnoDB, can you confirm that? Are you using your mysql server just for this site or are there other data? Are you using innodb_file_per_table? Please have a look at [this post](http://stackoverflow.com/questions/10538908/schrodingers-mysql-table-exists-yet-it-does-not) for a possible solution. – pamatt Dec 28 '13 at 19:35
  • @pamatt Sorry for the delay, and yes all of my tables are InnoDB, when I check for the cache_views.ibd and .frm and there's no cache_views.ibd, so I removed the .frm file hopping it would let me create the new table but that wasnt the solution. If you could help me to fix it I would apreciate it. – Betoo Jan 03 '14 at 02:27

0 Answers0