Question

I have been researching this problem for quite some time but have not been able to find any helpful results.

I have a table:

CREATE TABLE `jobs` (
    `jb_id` MEDIUMINT(7) UNSIGNED NOT NULL AUTO_INCREMENT,
    `wo_id` MEDIUMINT(7) UNSIGNED NOT NULL,
    `file_name` VARCHAR(140) NOT NULL COLLATE 'latin1_bin',
    `jb_status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
    `descr` TEXT NULL COLLATE 'latin1_bin',
    `syncronized` TINYINT(2) UNSIGNED NOT NULL,
    `failedcnt` TINYINT(3) UNSIGNED NOT NULL,
    `clip_title` TINYTEXT NULL COLLATE 'latin1_bin',
    `clip_description` TEXT NULL COLLATE 'latin1_bin',
    `clip_tags` TINYTEXT NULL COLLATE 'latin1_bin',
    PRIMARY KEY (`jb_id`),
    INDEX `woid` (`wo_id`),
    INDEX `job_stat` (`jb_status`),
    INDEX `synced` (`syncronized`),
    INDEX `failedcnt` (`failedcnt`),
    INDEX `file_name` (`file_name`)
)
COLLATE='latin1_bin'
ENGINE=MyISAM;

When i run SELECT or UPDATE commands everything works ok.

select jobs.clip_description from jobs Limit 1;
/* 0 rows affected, 1 rows found. Duration for 1 query: 0.768 sec. */

UPDATE `jobs` SET `clip_description`='test' WHERE  `jb_id`=2 LIMIT 1;

But as I try to run

INSERT INTO `jobs` (`clip_description`) VALUES ('test');
/* SQL Error (1054): Unknown column 'clip_description' in 'field list' */

This also happened yesterday, but as i did not have much time to deal with the issue then, i created new table with different name but same structure, copied over all the data and then renamed both tables and it worked again. That is until about two hours ago when the issue returned. It is not really an option to start coping the table every 12h.

For creating a copy i used:

CREATE TABLE jobs_new LIKE jobs; INSERT jobs_new SELECT * FROM jobs;

After which previously mentioned insert would work.

Any help will be greatly appreciated.

EDIT: If it makes any difference I'm running Server version: 5.5.28-0ubuntu0.12.04.2-log (Ubuntu) On ubuntu server 12.04 LTS 64bit

Was it helpful?

Solution

It looks like you have other constrains related to table, may be a trigger or some calculated column depending upon clip_description column. Is not it?

Please check the dependencies and triggers with this table.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top