Bug #24175 Output truncated, cursor-protocol and "procedure analyse()"
Submitted: 10 Nov 2006 10:24 Modified: 13 Nov 2006 6:22
Reporter: Magnus Blåudd Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Prepared statements Severity:S3 (Non-critical)
Version:5.0.30 OS:Linux (linux)
Assigned to: CPU Architecture:Any
Triage: Triaged: D3 (Medium) / R2 (Low) / E3 (Medium)

[10 Nov 2006 10:24] Magnus Blåudd
Description:
 ./mtr --cursor-protocol analyse

*** r/analyse.result    2006-09-28 21:30:45.000000000 +0300
--- r/analyse.reject    2006-11-10 13:22:02.000000000 +0300
***************
*** 100,106 ****
  insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),('a\0'),('b\''),('c\"'),('d\\'),('\'b'),('\"c'),('\\d'),('a\0\0\0b'),('a\'\'\'\'b'),('a\"\"\"\"b'),('a\\\\\\\\b'),('\'\0\\\"'),('\'\''),('\"\"'),('\\\\'),('The\ZEnd');
  select * from t1 procedure analyse();
  Field_name    Min_value       Max_value       Min_length      Max_length     Empties_or_zeros Nulls   Avg_value_or_avg_length Std     Optimal_fieldtype
! test.t1.v     "       \\      1       19      0       0       3.7619  NULL   ENUM('"','""','"c','\'\0\\"','\'','\'\'','\'b','a\0\0\0b','a\0','a""""b','a\'\'\'\'b','abc','abc\'def\\hij"klm\0opq','a\\\\\\\\b','b\'','c"','d\\','The\ZEnd','\\','\\d','\\\\') NOT NULL
  drop table t1;
  create table t1 (df decimal(5,1));
  insert into t1 values(1.1);
--- 100,106 ----
  insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),('a\0'),('b\''),('c\"'),('d\\'),('\'b'),('\"c'),('\\d'),('a\0\0\0b'),('a\'\'\'\'b'),('a\"\"\"\"b'),('a\\\\\\\\b'),('\'\0\\\"'),('\'\''),('\"\"'),('\\\\'),('The\ZEnd');
  select * from t1 procedure analyse();
  Field_name    Min_value       Max_value       Min_length      Max_length     Empties_or_zeros Nulls   Avg_value_or_avg_length Std     Optimal_fieldtype
! test.t1.v     "       \\      1       19      0       0       3.7619  NULL   ENUM('"','""','"c','\'\0\\"','\'','\'\'','\'b','a\0\0\0b','a\0',
  drop table t1;
  create table t1 (df decimal(5,1));
  insert into t1 values(1.1);
-------------------------------------------------------

The output from Optimal_fieldtype column has been truncated. Haven't analysed where.

How to repeat:
 ./mtr --cursor-protocol analyse