Bug #34229 Query that recover LongText that let opened the connection with DB
Submitted: 1 Feb 2008 14:25 Modified: 5 Mar 2008 11:55
Reporter: Luc Mirror Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:5.1.19 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: Connection, longtext

[1 Feb 2008 14:25] Luc Mirror
Description:
I've got a Table with a column LONGTEXT type (follow the table definition): 

CREATE TABLE  `test`.`log_test_case` (
  `ID_LOG` int(11) NOT NULL AUTO_INCREMENT,
  `OUTPUT` longtext,
  PRIMARY KEY (`ID_LOG`),
  KEY `IDX_RESULT` (`OUTPUT`(100)),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

in this table there is a record that has the field of type LONGTEXT with size 12000000 of char_length. 
If I perform a query directly to that record giving the ID of the primary key, the server returns the result, but the application (MySql Query Browser, Connector .NET) doesn't work, after the query is asked. 

How to repeat:
Create a table with this SQL command:

CREATE TABLE  `test`.`log_test_case` (
  `ID_LOG` int(11) NOT NULL AUTO_INCREMENT,
  `OUTPUT` longtext,
  PRIMARY KEY (`ID_LOG`),
  KEY `IDX_RESULT` (`OUTPUT`(100)),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

after created the table insert a text in output field that has size of 12000000 char_length. 

Try to perform a query select * from log_test_case where id_log=<value created>;

If you open TaskMngr application will note that the query browser doesn't stop, also if the query has returned a value.
[1 Feb 2008 17:02] MySQL Verification Team
Thank you for the bug report. Could you please test with the mysql.exe client
(I wasn't able to repeat with latest source server). Thanks in advance.
[4 Feb 2008 7:55] Luc Mirror
The problem is absent if the user uses the client, but if he uses a .NET connector or MySqlBrowser the problem is present.
[3 Mar 2008 12:04] Tonci Grgin
Luc, can you please post *complete* test case. I am especially interested in your connect string, regarding Reggie's post in http://www.bytefx.com/blog/PermaLink,guid,90a3e805-2d0a-4409-96fc-3a13519b033a.aspx.
[3 Mar 2008 13:45] Luc Mirror
I've solved the problem calling check command on the table where the problem appear.
[5 Mar 2008 9:05] Tonci Grgin
Luc, I am glad your problem is solved but we do have obligations to others who may hit it. So, can you please add test case and elaborate problem and solution better?

Thanks for your interest in MySQL.
[5 Mar 2008 11:55] Luc Mirror
before create the table

CREATE TABLE  `test`.`log_test_case` (
  `ID_LOG` int(11) NOT NULL AUTO_INCREMENT,
  `OUTPUT` longtext,
  PRIMARY KEY (`ID_LOG`),
  KEY `IDX_RESULT` (`OUTPUT`(100)),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

after insert a long text (in out case is arab text) about 12000000 of
char_length. Go on the www.aljazeera.net copy and paste an article 1000 times in the output field of the table.

The Query Browser didn't stop if I performed a select. This was the problem that I hit, before to perform a Check command on the table. Other I don't know. 
How can I provide other information if the problem doesn't appear now? 

I think that was a problem on the database Index and that Check command has solved it.
[5 Mar 2008 12:07] Tonci Grgin
Luc, thanks. This is enough.