Mysql Error Code 139
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Increasing MySql Innodb Row length to avoid Error 139 up vote 1 down vote favorite I'm creating a table in MySql (Innodb engine) with more than 15 TEXT datatype columns. After table creation, I'm trying to insert a row in to this table with more than 500 characters in all the columns. While doing so, mysql returns the following error, [Error Code: 1030, SQL State: HY000] Got error 139 from storage engine Upon searching, I found that there is a row length limitation of 8000 bytes in mysql. I wanted to know if this limit can be configured (by a parameter or even compiling the code) to the desired level. I see some links talking about innodb plugin where this is resolved but I couldn't get a clear idea on that. I'm trying this in windows. Any help on this is greatly appreciated. Thanks, Ashok. mysql innodb mysql-error-1030 share|improve this question edited Sep 4 '13 at 15:36 Will 96.3k41233337 asked Jan 14 '11 at 7:18 Ashok 612 Can you show your CREATE TABLE statement? –Riedsio Jan 14 '11 at 13:20 The create query is , CREATE TABLE testtext ( ID INTEGER , TEXT1 TEXT, TEXT2 TEXT, TEXT3 TEXT, TEXT4 TEXT, TEXT5 TEXT, TEXT6 TEXT, TEXT7 TEXT, TEXT8 TEXT, TEXT9 TEXT, TEXT10 TEXT, TEXT11 TEXT, TEXT12 TEXT, TEXT13 TEXT, TEXT14 TEXT, TEXT15 TEXT, TEXT16 TEXT, TEXT17 TEXT, TEXT18 TEXT, TEXT19 TEXT, TEXT20 TEXT, TEXT21 TEXT, PRIMARY KEY (ID) ) Engine=InnoDB; I had also tried using the ROW_FORMAT to set it as DYNAMIC. But that doesn't help either.. the table status still shows the table is in Compact format. –Ashok Jan 17 '11 at 7:13 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote It looks like there are multiple possible solutions to this type of problem. I found this link provided both good information and some good tangible options: http://www.mysqlperformanceblog.com/2011/04/07/innodb-row-size-limitation/. However, if you know from the outset that you are going to be creating a structure like thi
Updates: Status: Closed Impact on me: None Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious) Version:4.1.11 OS:Mac OS X (MacOS X 10.3.9) Assigned to: Heikki Tuuri View Add Comment Files Developer Edit Submission View Progress Log Contributions [20 Apr 2005 17:07] Andrew Blee Description: Since upgrading MySQL from version 4.0.xx to 4.1.11, when trying to place data into a record it can fail with the error "#1030 - Got error 139 from storage engine". The problem appears to be if the data reaches a certain size. I first found the problem when trying to import a dump created by phpMyAdmin for one of my tables. I am using the "Standard" install package from MySQL Web http://stackoverflow.com/questions/4688786/increasing-mysql-innodb-row-length-to-avoid-error-139 site. Running Apple Mac/MacOS X 10.3.9. PHP is version 4.3.10 (client API is 3.23.49). I use phpMyAdmin to administer the DB, but I have run tests using PHP and the problem still occurs. I have also performed tests on my ISP's server (UNIX based) and the problem also occurs, they are using MySQL client API of 4.1.11. I still have access to a 4.0 server and can import the dump with no problems at all, even https://bugs.mysql.com/bug.php?id=10035 using a dump from MySQL 4.1.11 using the "backward compatibility" option in phpMyAdmin. How to repeat: Create an InnoDB table with 1 INT field and 11 TEXT fields. Create an index on the INT field of type "PRIMARY". In the first 10 text fields, enter as many "a" characters as phpMyAdmin will allow. This is 32000 characters in each field. Leave the last text field empty. Click "Go" to save the changes. This should save without any problems. Then copy/paste field 10 to field 11 and click "Go". This results in a "#1030 - Got error 139 from storage engine" error. If I remove the characters little by little at some point it will work, suggesting a size problem. Please let me know if you need any additional information. [21 Apr 2005 5:02] Heikki Tuuri Hi! In 4.1, to support at least 256-character UTF-8 column prefix indexes, InnoDB stores at least 768 bytes of each column 'internally' to the record. With 11 TEXT fields you will run over the 8000 byte record len limit. ./include/dict0mem.h:159:#define DICT_MAX_COL_PREFIX_LEN 768 I probably need to update the manual. Thank you, Heikki [21 Apr 2005 8:34] Andrew Blee Hi Heikki Many thanks for the reply. I read what you wrote several times, but a lot of it still went over my head, so apologies if what I write below is irrel
Status: Not a Bug Impact on me: None Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical) Version:4.1.10 OS:FreeBSD (FreeBSD 4.11-STABLE) Assigned to: View https://bugs.mysql.com/bug.php?id=10424 Add Comment Files Developer Edit Submission View Progress Log Contributions [6 May https://bugs.mysql.com/bug.php?id=13253 2005 20:17] Tim Gustafson Description: I have an InnoDB table, DocumentVariants, that has a BLOB field in it. The table has about 22GB of data in it. When I run mysqldump on the table, I get this error message: mysqldump: Error 1030: Got error 139 from storage engine mysql error when dumping table `DocumentVariants` at row: 1594 Row 1594 is a row whose 'ID' column is 9221. When I run a query in the mySQL command line tool, I get this error: mysql> delete from DocumentVariants where ID = 9221; ERROR 1030 (HY000): Got error 139 from storage engine It would seem that perhaps my InnoDB table is corrupt. mysql error code When I run "check table" on the table, it does not report any errors: mysql> check table DocumentVariants extended; +---------------------------+-------+----------+----------+ | Table | Op | Msg_type | Msg_text | +---------------------------+-------+----------+----------+ | archives.DocumentVariants | check | status | OK | +---------------------------+-------+----------+----------+ What's the best way to fix this problem? I can't dump the table to a .sql file because mysqldump dies as a result of the problem, and I can't delete the offending row because it causes the same error as the dump does. Will running an "alter table DocumentVariants type=innodb" work? If it does, it will take hours to run on this table I think because it's so large. What are the chances of that fixing the problem? Am I likely to loose data in this table as a result of this error? Thanks! How to repeat: It's hard to say - I think it's a one-time sort of glitch. Suggested fix: Unknown [6 May 2005 20:42] Miguel Solorzano Not enough information was provided for us to be able to handle this bug. Please re-read the instructi
Hiratsuka (Basic Quality Contributor) Email Updates: Status: Closed Impact on me: None Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical) Version:5.0.10 OS:Linux (Linux) Assigned to: Osku Salerma View Add Comment Files Developer Edit Submission View Progress Log Contributions [16 Sep 2005 2:47] Sadao Hiratsuka Description: InnoDB causes an error when a long sub-part index is created, although MyISAM doesn't cause any error but a warning. How to repeat: -- sample script create table test_i1ok (col1 varchar(2000), index (col1(767))) character set = latin1 engine = innodb; create table test_i1ng (col1 varchar(2000), index (col1(768))) character set = latin1 engine = innodb; create table test_i2ok (col1 varchar(2000), index (col1(383))) character set = cp932 engine = innodb; create table test_i2ng (col1 varchar(2000), index (col1(384))) character set = cp932 engine = innodb; create table test_i3ok (col1 varchar(2000), index (col1(255))) character set = utf8 engine = innodb; create table test_i3ng (col1 varchar(2000), index (col1(256))) character set = utf8 engine = innodb; create table test_m1ok (col1 varchar(2000), index (col1(1000))) character set = latin1 engine = myisam; create table test_m1ng (col1 varchar(2000), index (col1(1001))) character set = latin1 engine = myisam; create table test_m2ok (col1 varchar(2000), index (col1(500))) character set = cp932 engine = myisam; create table test_m2ng (col1 varchar(2000), index (col1(501))) character set = cp932 engine = myisam; create table test_m3ok (col1 varchar(2000), index (col1(333))) character set = utf8 engine = myisam; create table test_m3ng (col1 varchar(2000), index (col1(334))) character set = utf8 engine = myisam; -- error in InnoDB root:mi> create table test_i1ng (col1 varchar(2000), index (col1(768))) -> character set = latin1 engine = innodb; ERROR 1005 (HY000): Can't create table './mi/test_i1ng.frm' (errno: 139) -- warning in MyISAM root:mi> create table test_m1ng (col1 varchar(2000), index (col1(1001))) -> character set = latin1 engine = myisam; Query OK, 0 rows affected, 1 warning (0.00 sec) root:mi> show index from test_m1ng\G *************************** 1. row *************************** Table: test_m1ng Non_unique: 1 Key_name: col1 Seq_in_index: 1 Column_name: col1 Collation: A Cardinality: NULL Sub_part: 1000 *** the length of index is truncated *** Packed: