Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

I am getting the below message on a table I am trying to create.

The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

Anyone know the answer to this please?

-- Table `warrington_central`.`job`  
-- -----------------------------------------------------  

CREATE  TABLE IF NOT EXISTS `warrington_central`.`job` (  
  `id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT ,  
  `alias_title` VARCHAR(255) NOT NULL ,  
  `reference_number` VARCHAR(100) NOT NULL ,  
  `title` VARCHAR(255) NOT NULL ,  
  `primary_category` SMALLINT(5) UNSIGNED NOT NULL ,  
  `secondary_category` SMALLINT(5) UNSIGNED NOT NULL ,  
  `tertiary_category` SMALLINT(5) UNSIGNED NULL ,  
  `address_id` BIGINT(20) UNSIGNED NOT NULL ,  
  `geolocation_id` BIGINT(20) UNSIGNED NULL ,  
  `company` VARCHAR(255) NOT NULL ,  
  `description` VARCHAR(10000) NOT NULL ,  
  `skills_required` VARCHAR(10000) NOT NULL ,  
  `job_type` TINYINT(2) UNSIGNED NOT NULL ,  
  `experience_months_required` TINYINT(2) UNSIGNED NOT NULL ,  
  `experience_years_required` TINYINT(2) UNSIGNED NOT NULL ,  
  `salary_range` VARCHAR(30) NOT NULL ,  
  `extra_benefits_above_salary` VARCHAR(500) NOT NULL ,  
  `available_from` DATE NULL ,  
  `available_to` DATE NULL ,  
  `extra_location_details` VARCHAR(1000) NOT NULL ,  
  `contact_email` VARCHAR(100) NOT NULL ,  
  `contact_phone_number` VARCHAR(20) NOT NULL ,  
  `contact_mobile_number` VARCHAR(20) NOT NULL ,  
  `terms_conditions_application` VARCHAR(5000) NOT NULL ,  
  `link_to_profile` ENUM('0','1') NOT NULL ,  
  `created_on` DATETIME NOT NULL ,  
  `updated_on` DATETIME NOT NULL ,  
  `updated_by` BIGINT(20) UNSIGNED NOT NULL ,  
  `add_contact_form` ENUM('0','1') NOT NULL ,  
  `admin_package_id` TINYINT(1) UNSIGNED NOT NULL ,  
  `package_start_date` DATETIME NOT NULL ,  
  `package_end_date` DATETIME NULL ,  
  `package_comment` VARCHAR(500) NOT NULL ,  
  `viewable_to_members_only` ENUM('0','1') NOT NULL ,  
  `advertise_to` DATETIME NULL ,  
  `show_comment` ENUM('0','1') NOT NULL ,  
  `hits` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 ,  
  `visible` ENUM('0','1') NOT NULL DEFAULT '0' ,  
  `approved` ENUM('I/* large SQL query (3.9 KB), snipped at 2,000 characters */
/* SQL Error (1118): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs */
SHOW WARNINGS;
like image 273
Matthew Chambers Avatar asked Sep 22 '12 21:09

Matthew Chambers


People also ask

What is the maximum row size for a table in SQL Server?

For a memory-optimized table, even though the row size is 8,060 bytes, some variable-length columns can be physically stored outside those 8,060 bytes. However, the maximum declared sizes of all key columns for all indexes on a table, plus any additional fixed-length columns in the table, must fit in the 8,060 bytes.

What is the maximum size of table in MySQL?

You are using a MyISAM table and the space required for the table exceeds what is permitted by the internal pointer size. MyISAM permits data and index files to grow up to 256TB by default, but this limit can be changed up to the maximum permissible size of 65,536TB (2567 − 1 bytes).

How do I limit the number of rows in a MySQL table?

In MySQL the LIMIT clause is used with the SELECT statement to restrict the number of rows in the result set. The Limit Clause accepts one or two arguments which are offset and count. The value of both the parameters can be zero or positive integers.


1 Answers

Change description and skills_required to be type text

You are getting that message because the sum of all the fields is > 65k

like image 113
Michael Durrant Avatar answered Sep 19 '22 22:09

Michael Durrant