MySQL Forums
Forum List  »  Views

VIEW cuts off my text-string
Posted by: T D
Date: February 10, 2014 04:50AM

Hello I,
I created a view that should list the coordinates of the element as used for sn svg-path-element.

The code is:
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`localhost`
SQL SECURITY DEFINER
VIEW `zeichenkoerper_fullview` AS
select
[...],
group_concat(concat(`k`.`x`, ',', `k`.`y`)
order by `k`.`reihenfolge_nr` ASC
separator ' ') AS `polygon`,
concat('M',
right(group_concat(concat('L', `k`.`x`, ',', `k`.`y`)
order by `k`.`reihenfolge_nr` ASC
separator ' '),
(length(group_concat(concat('L', `k`.`x`, ',', `k`.`y`)
order by `k`.`reihenfolge_nr` ASC
separator ' ')) - 1))) AS `path`
from
(`zeichenkoerper` `z`
join `koordinate` `k` ON ((`z`.`id` = `k`.`zeichenkoerper_id`)))
group by `z`.`id`

The view works for the most datasets. But in one dataset I have very much coordinates so it exceeds possibly some ranges. I dont know.

The problem is, that the 'path' cuts off the string after 342 characters.
If I look at the table structure of the view it says, that polygon is a text an path is a varchar (342). I dont know why mysql thinks this should be a varchar. I think if i would be text as well everything would be ok.

Does anyone know the bug? Is there a possiblity to say mysql the column is text?

Thanks and best regards,
Tobias

EDIT: Besides: It works right if I use the SELECT string out of a view as a single statement.



Edited 1 time(s). Last edit at 02/10/2014 05:11AM by T D.

Options: ReplyQuote


Subject
Views
Written By
Posted
VIEW cuts off my text-string
5810
T D
February 10, 2014 04:50AM
1503
February 10, 2014 02:35PM


Sorry, you can't reply to this topic. It has been closed.

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.