Hello

Anytime I want to add a CCK Field for a content type, I get following error.
* user warning: Table 'content_' already exists query: CREATE TABLE content_ ( vid int unsigned NOT NULL default '0', nid int unsigned NOT NULL default '0', PRIMARY KEY (vid) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in /var/www/servers/.../httpdocs/includes/database.mysqli.inc on line 151.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: ALTER TABLE content_ ADD COLUMN _default in /var/www/servers/.../httpdocs/includes/database.mysqli.inc on line 151.

CCK typiccaly create a table like content_field_xxxx.
Can anyone help or give me a solution?

My Enviroment:
Drupal 5.7, PHP 5.2.5 with APC as Opcache, Mysql5 and memcached and a lot of Drupal modules.
It is a multisite eviroment.

thx for help

bennos

Comments

bennos’s picture

Same problem when I want to create a new content type. Database table ist not right created (content_type_).

bennos’s picture

Hello

I have solved the problem.
It seems to be a problem with cacherouter module. I just changed back my setting only to memcached and everything works fine.

bennos

yched’s picture

Component: CCK in core » General
Status: Active » Fixed

Thx for reporting back.
Could you maybe expand on what cacherouter settings were breaking CCK ?
Thanks to the changes in the cache API, supporting alternate cache backends should come for free in D6...

bennos’s picture

I have applied the several patches for serialziation (core and somer modules), but the patches seems to be ok, because everything works with memcached.

I have just changed my settings in setting.php

$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array( APC as Opcode Cache and Memcache as page cache. )

to get cacherouter installed. I changed back to my old $conf array setting for memcache.

All patches for caching are applied anymore.
I don't know why, but cacherouter has problems with the SQL Statement of CCK. I have looked at the Code and the serialzation patches, but all looks fine.

bennos

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

davidwhthomas’s picture

Same problem here with cacherouter and memcache on D5, also seen on D6, new fields aren't added.

In D6 clearing the cache manually helps, in D5, I need to restart Apache...

$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'memcache',
    'server' => array('localhost:11211'),
    'shared' => FALSE,
	'flush_all'  => TRUE,
    'prefix' => '',
  ),
);

Not sure whether it's a CacheRouter or CCK issue.

davidwhthomas’s picture

Status: Closed (fixed) » Active
aether’s picture

I am experiencing this also in D5 with cacherouter using APC.

Interpotential’s picture

Project: Content Construction Kit (CCK) » Cache Router
Version: 5.x-1.7 » 5.x-1.0-beta9
Component: General » Code
Category: support » bug

I had the same problem, until I completely disabled CacheRouter and APC. Not sure if I blame the combi CacheRouter/APC or that the problem came just from APC.

But, I guess this is more of a CR than CCK issue, so I'm changing the project. And I do call it a bug instead of a support request.