LOCK TABLES error
| Project: | Auto Expire |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | mariuss |
| Status: | closed |
Jump to:
Hi,
I just installed this module but when I try to enable it for a content type, this is what I get (is repeated a few more times but just posted the first couple here):
Warning: Table 'system' was not locked with LOCK TABLES query: SELECT * FROM system WHERE type = 'theme' in C:\xampp\htdocs\mysite.com\includes\database.mysql.inc on line 172
Warning: Table 'watchdog' was not locked with LOCK TABLES query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry 'auto_expire_node_type_casetracker_basic_project_' for key 1\nquery: INSERT INTO variable (name, value) VALUES ('auto_expire_node_type_casetracker_basic_project_expire', 'i:0;') in C:\\xampp\\htdocs\\mysite.com\\includes\\database.mysql.inc on line 172.', 2, '', 'http://localhost/mysite.com/admin/settings/auto_expire', 'http://localhost/mysite.com/admin/settings/auto_expire', '127.0.0.1', 1188411751) in C:\xampp\htdocs\mysite.com\includes\database.mysql.inc on line 172
...not sure what to do - any ideas?

#1
It's probably a size limitation issue with variable names, please have a look at this issue:
http://drupal.org/node/165227
Not sure how to fix this yet, for now try to apply one of the two workarounds suggested there.
#2
Thanks, yes, I changed the variable name length to 255 and it's working ok now.
fyi, the sql phpmyadmin produced to do the change was:
ALTER TABLE `variable` CHANGE `name` `name` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
#3
All variable names should fit the 48 characters limit now.
Run the update.php script after upgrading to the latest version, existing variables will be automatically renamed.
#4