﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
295	Types nonrecognized in MySql	rcsoto	danirus	"Hi,
when executing the query

Text query =
""
select c.table_name               as Table_,
       c.column_name              as Column_,
       c.data_type                as Type_,
       c.character_maximum_length as Length_,
       c.numeric_precision        as Precision_,
       c.numeric_scale            as Scale_,
       case c.is_nullable
         when 'YES' then 1
         else 0
       end                        as IsNull_,
       case c.column_key
         when 'PRI' then 1
         else 0
       end                        as IsKey_
from information_schema.columns c
order by ordinal_position
"";
Set info = DBTable(query);

I obtain the following trace:

Warning: (Funcion DBTable) Query must return a text, a date or a number at the 
field number4

Warning: (Funcion DBTable) Query must return a text, a date or a number at the 
field number5

Warning: (Funcion DBTable) Query must return a text, a date or a number at the 
field number6

Warning: (Funcion DBTable) Query must return a text, a date or a number at the 
field number7

Warning: (Funcion DBTable) Query must return a text, a date or a number at the 
field number8

The definition of the table is:

DROP TABLE IF EXISTS `information_schema`.`COLUMNS`;
CREATE TEMPORARY TABLE `COLUMNS` (
  `TABLE_CATALOG` varchar(512) default NULL,
  `TABLE_SCHEMA` varchar(64) NOT NULL default '',
  `TABLE_NAME` varchar(64) NOT NULL default '',
  `COLUMN_NAME` varchar(64) NOT NULL default '',
  `ORDINAL_POSITION` bigint(21) NOT NULL default '0',
  `COLUMN_DEFAULT` varchar(64) default NULL,
  `IS_NULLABLE` varchar(3) NOT NULL default '',
  `DATA_TYPE` varchar(64) NOT NULL default '',
  `CHARACTER_MAXIMUM_LENGTH` bigint(21) default NULL,
  `CHARACTER_OCTET_LENGTH` bigint(21) default NULL,
  `NUMERIC_PRECISION` bigint(21) default NULL,
  `NUMERIC_SCALE` bigint(21) default NULL,
  `CHARACTER_SET_NAME` varchar(64) default NULL,
  `COLLATION_NAME` varchar(64) default NULL,
  `COLUMN_TYPE` longtext NOT NULL,
  `COLUMN_KEY` varchar(3) NOT NULL default '',
  `EXTRA` varchar(20) NOT NULL default '',
  `PRIVILEGES` varchar(80) NOT NULL default '',
  `COLUMN_COMMENT` varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

The fields in conflict have the type: BIGINT

Note: It is necessary to have MySQL 5.0

Thanks"	defect	closed	highest		DataBase	head	normal	duplicate		imendez
