Bug #34367 sql/sql_show.cc: create_schema_table should handle MYSQL_TYPE_NEWDECIMAL
Submitted: 7 Feb 2008 0:42 Modified: 7 Jan 2009 18:23
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.22-rc, 5.1 BK OS:Any
Assigned to: Martin Hansson CPU Architecture:Any

[7 Feb 2008 0:42] Roland Bouman
Description:
TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) in sql/sql_show.cc (line 5349..5455) contains a switch to handle the datatype of the columns being defined for the table. 

This switch does not handle MYSQL_TYPE_NEWDECIMAL (among other types defined in include/mysql_com.h)

This is a problem as this is the preferred type for handling large decimal numbers.

How to repeat:
see sql/sql_show.cc create_schema_table

Suggested fix:
heh, handle those missing types
[7 Feb 2008 10:16] Sveta Smirnova
Thank you for the report.

Verified as described using code analysis.
[27 Feb 2008 14:50] Konstantin Osipov
I_S problem, reassigning to the right lead.
[5 Mar 2008 15:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/43471

ChangeSet@1.2573, 2008-03-05 16:20:06+01:00, mhansson@riffraff.(none) +2 -0
  Bug #34367: sql/sql_show.cc: create_schema_table should handle 
  MYSQL_TYPE_NEWDECIMAL
  
  Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
  MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
  we have a working information_schema plugin as part of the source
  distribution.
[7 Mar 2008 13:05] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/43583

ChangeSet@1.2573, 2008-03-07 13:56:15+01:00, mhansson@riffraff.(none) +2 -0
  Bug #34367: sql/sql_show.cc: create_schema_table should handle 
  MYSQL_TYPE_NEWDECIMAL
  
  Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
  MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
  we have a working information_schema plugin as part of the source
  distribution.
[7 Mar 2008 13:05] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/43584

ChangeSet@1.2573, 2008-03-07 12:38:34+01:00, mhansson@riffraff.(none) +2 -0
  Bug #34367: sql/sql_show.cc: create_schema_table should handle 
  MYSQL_TYPE_NEWDECIMAL
  
  Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
  MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
  we have a working information_schema plugin as part of the source
  distribution.
[7 Mar 2008 13:05] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/43585

ChangeSet@1.2573, 2008-03-07 12:24:47+01:00, mhansson@riffraff.(none) +2 -0
  Bug #34367: sql/sql_show.cc: create_schema_table should handle 
  MYSQL_TYPE_NEWDECIMAL
  
  Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
  MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
  we have a working information_schema plugin as part of the source
  distribution.
[11 Mar 2008 12:06] Roland Bouman
Hi, I have the code for an information schema plugin that reports the user defined variables. As user defined may have the decimal type, this could be a viable test case.

It used to work in 5.1.22  - I have to check if it still works in 5.1.23

Are you interested in accepting that to be included?
[11 Mar 2008 13:42] Martin Hansson
Roland,
It sounds like a good idea, but it will no doubt need a lot of time for implementation and review. I will bring this up with my team mates.

/Martin
[13 Mar 2008 19:27] Bugs System
Pushed into 6.0.5-alpha
[13 Mar 2008 19:34] Bugs System
Pushed into 5.1.24-rc
[2 Apr 2008 19:47] Jon Stephens
Pushed into 5.1.23-ndb-6.3.11.
[7 Jan 2009 18:23] Paul DuBois
No changelog entry needed.