daisydoos
asked on
MySQL Error message: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large (> 8126)
Hi,
I have never seen this error message before - and am struggling to find a solution!
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large (> 8126).
The offending row in the table was varchar 500, so the first thing I did was change that to LONGTEXT in the vain hope this would help - but to no avail.
The error message goes on to say "Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline."
There is unsual (at all) about the text being entered for this row and I've got other columns which are LONGTEXT with no problem at all !
Any help much appreciated !!!
I have never seen this error message before - and am struggling to find a solution!
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large (> 8126).
The offending row in the table was varchar 500, so the first thing I did was change that to LONGTEXT in the vain hope this would help - but to no avail.
The error message goes on to say "Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline."
There is unsual (at all) about the text being entered for this row and I've got other columns which are LONGTEXT with no problem at all !
Any help much appreciated !!!
How are you doing the insert? What programming language? And what version of MySQL are you using?
can you please show the full table description.
also, do you maybe have some trigger on the table that does something else behind?
also, do you maybe have some trigger on the table that does something else behind?
ASKER
Hi,
Many thanks for getting back to me. I'm using PHP. MySQL version is 5.5.35
Doesn't make any diffrence if I enter the data via the site admin or directly using PhpMyAdmin - get the same error emssage.
I've included the full table schema below - the offending columns are eg homeRightCol4 which as you can see I've now set to LONGTEXT (it was originally VARCHAR 500) ...
I have never come across this error before!!
Many thanks in advance!
CREATE TABLE IF NOT EXISTS `site_page` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`moduleNameForSearch` char(4) NOT NULL DEFAULT 'page',
`itemOrCatForSearch` varchar(4) NOT NULL DEFAULT 'cat',
`name` varchar(255) NOT NULL,
`indexID` varchar(255) NOT NULL,
`type` int(3) NOT NULL DEFAULT '1',
`meta_title` varchar(255) DEFAULT NULL,
`meta_description` mediumtext,
`meta_keywords` tinytext,
`longdesc` longtext,
`shortdesc` mediumtext,
`homePageOnly` mediumtext NOT NULL,
`homeVideo` mediumtext NOT NULL,
`homeTopR1` mediumtext NOT NULL,
`homeTopR2` mediumtext NOT NULL,
`homeTopR3` mediumtext NOT NULL,
`homeLeftCol1` mediumtext NOT NULL,
`homeLeftCol2` mediumtext NOT NULL,
`homeLeftCol3` mediumtext NOT NULL,
`homeMidCol1` mediumtext NOT NULL,
`homeMidCol2` mediumtext NOT NULL,
`homeMidCol3` mediumtext NOT NULL,
`homeMidCol4` mediumtext NOT NULL,
`homeRightCol1` mediumtext NOT NULL,
`homeRightCol2` mediumtext NOT NULL,
`homeRightCol3` mediumtext NOT NULL,
`homeRightCol4` longtext NOT NULL,
`youTubeCode` mediumtext NOT NULL,
`video_title` varchar(255) NOT NULL,
`video_thumbnail_loc` varchar(400) NOT NULL,
`video_file` varchar(400) NOT NULL,
`video_duration` int(9) NOT NULL,
`video_description` varchar(700) NOT NULL,
`parent` int(3) NOT NULL,
`level` int(2) NOT NULL DEFAULT '0',
`public` int(1) NOT NULL DEFAULT '1',
`inMainMenu` int(1) NOT NULL DEFAULT '1',
`inSubMenu` int(1) NOT NULL DEFAULT '1',
`inFooter` int(1) NOT NULL DEFAULT '0',
`sort` int(11) NOT NULL DEFAULT '0',
`visible` int(1) NOT NULL DEFAULT '1',
`inSearchResults` int(1) NOT NULL DEFAULT '1',
`inSiteMap` int(1) NOT NULL DEFAULT '1',
`securePage` int(1) NOT NULL DEFAULT '1',
`module` int(3) NOT NULL DEFAULT '1',
`lang_id` int(3) NOT NULL DEFAULT '1',
`site_id` int(3) NOT NULL DEFAULT '1',
`multiLingual` int(1) NOT NULL DEFAULT '1',
`multiSite` int(1) NOT NULL DEFAULT '0',
`externalUrl` varchar(255) DEFAULT NULL,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`create_user_id` int(3) NOT NULL,
`update_user_id` int(3) NOT NULL,
PRIMARY KEY (`id`),
KEY `type` (`type`),
KEY `module` (`module`),
KEY `lang_id` (`lang_id`),
KEY `site_id` (`site_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=60 ;
Many thanks for getting back to me. I'm using PHP. MySQL version is 5.5.35
Doesn't make any diffrence if I enter the data via the site admin or directly using PhpMyAdmin - get the same error emssage.
I've included the full table schema below - the offending columns are eg homeRightCol4 which as you can see I've now set to LONGTEXT (it was originally VARCHAR 500) ...
I have never come across this error before!!
Many thanks in advance!
CREATE TABLE IF NOT EXISTS `site_page` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`moduleNameForSearch` char(4) NOT NULL DEFAULT 'page',
`itemOrCatForSearch` varchar(4) NOT NULL DEFAULT 'cat',
`name` varchar(255) NOT NULL,
`indexID` varchar(255) NOT NULL,
`type` int(3) NOT NULL DEFAULT '1',
`meta_title` varchar(255) DEFAULT NULL,
`meta_description` mediumtext,
`meta_keywords` tinytext,
`longdesc` longtext,
`shortdesc` mediumtext,
`homePageOnly` mediumtext NOT NULL,
`homeVideo` mediumtext NOT NULL,
`homeTopR1` mediumtext NOT NULL,
`homeTopR2` mediumtext NOT NULL,
`homeTopR3` mediumtext NOT NULL,
`homeLeftCol1` mediumtext NOT NULL,
`homeLeftCol2` mediumtext NOT NULL,
`homeLeftCol3` mediumtext NOT NULL,
`homeMidCol1` mediumtext NOT NULL,
`homeMidCol2` mediumtext NOT NULL,
`homeMidCol3` mediumtext NOT NULL,
`homeMidCol4` mediumtext NOT NULL,
`homeRightCol1` mediumtext NOT NULL,
`homeRightCol2` mediumtext NOT NULL,
`homeRightCol3` mediumtext NOT NULL,
`homeRightCol4` longtext NOT NULL,
`youTubeCode` mediumtext NOT NULL,
`video_title` varchar(255) NOT NULL,
`video_thumbnail_loc` varchar(400) NOT NULL,
`video_file` varchar(400) NOT NULL,
`video_duration` int(9) NOT NULL,
`video_description` varchar(700) NOT NULL,
`parent` int(3) NOT NULL,
`level` int(2) NOT NULL DEFAULT '0',
`public` int(1) NOT NULL DEFAULT '1',
`inMainMenu` int(1) NOT NULL DEFAULT '1',
`inSubMenu` int(1) NOT NULL DEFAULT '1',
`inFooter` int(1) NOT NULL DEFAULT '0',
`sort` int(11) NOT NULL DEFAULT '0',
`visible` int(1) NOT NULL DEFAULT '1',
`inSearchResults` int(1) NOT NULL DEFAULT '1',
`inSiteMap` int(1) NOT NULL DEFAULT '1',
`securePage` int(1) NOT NULL DEFAULT '1',
`module` int(3) NOT NULL DEFAULT '1',
`lang_id` int(3) NOT NULL DEFAULT '1',
`site_id` int(3) NOT NULL DEFAULT '1',
`multiLingual` int(1) NOT NULL DEFAULT '1',
`multiSite` int(1) NOT NULL DEFAULT '0',
`externalUrl` varchar(255) DEFAULT NULL,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`create_user_id` int(3) NOT NULL,
`update_user_id` int(3) NOT NULL,
PRIMARY KEY (`id`),
KEY `type` (`type`),
KEY `module` (`module`),
KEY `lang_id` (`lang_id`),
KEY `site_id` (`site_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=60 ;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Many thanks for getting back with this solution - that would make sense as the problem only occurred after adding a bunch of new rows. I was not aware of this restriction!
Many thanks for getting back with this solution - that would make sense as the problem only occurred after adding a bunch of new rows. I was not aware of this restriction!