Originally created by: a...@anse.de
Originally owned by: a...@anse.de
Reported as bug #1830516 by dragos_dobrota@sf on 2007-11-12 08:09
DROP TABLE IF EXISTS `mytable`;
CREATE TABLE `mytable` (
`id` int(10) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `mytable` VALUES(1, "lala");
SELECT `mytable`.name AS 'id' FROM `mytable`;
This will display 0 instead of the data in field 'name'. Apparently the
program confuses the alias 'id' with the table field 'id' and attempts to
convert mytable.name to its type (string to int).
If I issue:
SELECT `mytable`.name AS 'idX' FROM mytable;
the output is the correct one.
I think it works with any table w/ an int and non int fields like this (the
conversion is from non-int to int)
Tested against Heidi 3.0 and Heidi 3.1 RC1 build 1064 (latest).
**** Comment 1 by dragos_dobrota@sf, 2007-11-12 08:14
Forgot to say.
Using MySQL 5.0.37 and same SQL works as expected in "MySQL Query
Browser".
**** Comment 2 by dragos_dobrota@sf, 2007-11-12 08:36
Forgot to say.
Using MySQL 5.0.37 and same SQL works as expected in "MySQL Query
Browser".
**** Comment 3 by dragos_dobrota@sf, 2007-11-12 09:34
Forgot to say.
Using MySQL 5.0.37 and same SQL works as expected in "MySQL Query
Browser".
**** Comment 4 by ansgarbecker@sf, 2007-11-12 11:29
Can comfirm that issue.
Runs well:
SELECT name AS id FROM mytable
SELECT name AS 'idX' FROM mytable
Bug:
SELECT name AS 'id' FROM mytable
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rosenfie...@gmail.com
(No comment was entered for this change.)
Labels: Severity-Problematic
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rosenfie...@gmail.com
(No comment was entered for this change.)
Labels: -Priority-Low
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
(No comment was entered for this change.)
Labels: -migrated
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rosenfie...@gmail.com
I'm pretty sure this is caused by the same code path that caused issue #315.
Related
Tickets:
#315View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rosenfie...@gmail.com
Fixed in [r1588] and [r1589].
Status: Fixed
Related
Commit: [r1588]
Commit: [r1589]