Opened 20 years ago
Closed 18 years ago
#295 closed defect (duplicate)
Types nonrecognized in MySql
Reported by: | rcsoto | Owned by: | danirus |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | DataBase | Version: | head |
Severity: | normal | Keywords: | |
Cc: | imendez |
Description
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
Change History (4)
comment:1 Changed 19 years ago by
Cc: | imendez added |
---|
comment:2 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This bug was resolved a long time ago.
comment:3 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This is a duplicate of 294
comment:4 Changed 18 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
* This bug has been marked as a duplicate of bug 294 *
* Bug 296 has been marked as a duplicate of this bug. *