#294 closed defect (fixed)
Types nonrecognized in MySql
Reported by: | rcsoto | Owned by: | danirus |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | DataBase | Version: | head |
Severity: | normal | Keywords: | |
Cc: |
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 20 years ago by
Status: | new → assigned |
---|
comment:2 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This bug was fixed a long time ago.
comment:3 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/toldb/by_engine/MySQL/Bugzilla/bug_000294 |
---|
Hi Roberto,
I've just apply a solution for a bug that resolves a problem using BIGINT.
Perhaps the problem you explain here could be partialy resolved yet.
Could you check it and give me your feedback here to continue?
Please send me also information about the way you are using to connect to the
Database. Wether it is an ODBC Connection or a Direct-to-MySQL.
Thanks, cheers
Daniel