Bug #89016 DESCRIBE table metadata differs between statments and prepared statments

Submitted: 21 Dec 2017 13:46 Modified: 22 Dec 2017 6:44
Reporter: Luis Silva Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:8.0.4 OS:Linux
Assigned to: CPU Architecture:Any

[21 Dec 2017 13:46] Luis Silva
Description:
Doing query:
"DESCRIBE test"

where test is a table created using:
"CREATE TABLE test(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, label CHAR(1))"

Getting metadata for this using statments and prepared statments gives different values on column 2:

#		 Column 2			= Type/Type
#		 meta->getCatalogName()		= def/def
#		 meta->getColumnDisplaySize() = 16777215/16777215
#		 meta->getColumnLabel()		= Type/Type
#		 meta->getColumnName()		= Type/Type
#		 meta->getColumnType()		= 15/15
#		 meta->getColumnTypeName()	= TEXT/TEXT
#		 meta->getPrecision()		= 7/7
#		 meta->getScale()		= 0/0
#		 meta->getSchemaName()		= mysql/mysql
#		 meta->getTableName()		= columns/col

How to repeat:
Create table:
"CREATE TABLE test(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, label CHAR(1))"

Do query using statements and prepared statements:
"DESCRIBE test"

Compare metadata between statments and prepared statments.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.