Active
Project:
Search Files
Version:
6.x-1.6
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
29 May 2008 at 11:23 UTC
Updated:
9 Jun 2009 at 10:38 UTC
Search_files_files table not created with installation of module. It is creating 2 tables search_directories and search_helpers but not above one. It is throwing error "not able to create Search_files_files table as keyword is more than 767 bytes and error in includes/database.inc file at line no. 509".
I tried after creating the same table in mysql browser and tried doing indexing.
But it is not indexing as Search_files_files table does not contain anything though directories and helpers settings are ok.
Comments
Comment #1
80transam commentedI get a little different error:
------------------------------------------------------------------------
user warning: Table 'drupal1.search_files_files' doesn't exist query: SELECT * FROM search_files_files LEFT JOIN ( SELECT * FROM search_dataset WHERE `type` = 'search_files' ) AS `dataset` ON search_files_files.`id` = `dataset`.`sid` WHERE ( `dataset`.`reindex` IS NULL OR `dataset`.`reindex` != 0 ) AND search_files_files.`index_attempts` <= 5 LIMIT 10 in /var/www/html/sites/all/modules/search_files/search_files.module on line 618.
------------------------------------------------------------------------
Any idea on what causes this?
Thanks in advance
Comment #2
80transam commentedHere is the error I was ableto get out of it:
user warning: BLOB/TEXT column 'full_path' used in key specification without a key length query: CREATE TABLE search_files_files ( `id` INT NOT NULL auto_increment, `full_path` VARCHAR(300) NOT NULL, `directory_id` INT NOT NULL, `index_attempts` TINYINT NOT NULL, PRIMARY KEY (id), UNIQUE KEY full_path (full_path) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /var/www/html/includes/database.inc on line 514.
How can I resolve this?
Thanks
Comment #3
rru commentedI experienced the same error as 80transam trying to install the module. I found the following on the net (http://www.mydigitallife.info/2007/07/09/mysql-error-1170-42000-blobtext...):
Sometimes, even though you don’t use TEXT or BLOB related type in your table, the Error 1170 may also appear. It happens in situation such as when you specify VARCHAR column as primary key, but wrongly set its length or characters size. VARCHAR can only accepts up to 256 characters, so anything such as VARCHAR(512) will force MySQL to auto-convert the VARCHAR(512) to a SMALLTEXT datatype, which subsequently fail with error 1170 on key length if the column is used as primary key or unique or non-unique index. To solve this problem, specify a figure less than 256 as the size for VARCHAR field.
It seems, that the column full_path ist set to 300 characters (max. 256 allowed) and therefore the error occures.
Comment #4
rru commentedChanging the line
'full_path' => array('type' => 'varchar', 'length' => '300', 'not null' => TRUE),
to
'full_path' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE),
in function "search_file_schema()" in the file search_files.install did the trick. I could afterwards install the module without problems.
Btw, search_files.install had an additional typo in line 91:the function name drupal_set_message() was misspelled.
Comment #5
shroomer69 commentednew issue created http://drupal.org/node/486166
I've been through this thread xx times and still can't get it to work right. get these two error messages repeated for each file I'm trying to index:
user warning: Table 'drupal.search_files_files' doesn't exist query: SELECT `id` FROM search_files_files WHERE `full_path`='sites default files archives/thebulletin/09-06-04/001_001_cover.pdf' in C:\xampp\htdocs\drupal\sites\all\modules\search_files\modules\search_directories\search_directories.module on line 446.
user warning: Table 'drupal.search_files_files' doesn't exist query: INSERT INTO search_files_files SET `full_path`="sites default files archives/thebulletin/09-06-04/001_001_cover.pdf", `directory_id`='1' in C:\xampp\htdocs\drupal\sites\all\modules\search_files\modules\search_directories\search_directories.module on line 459.
on version search_files-6.x-2.0-beta1 btw..