Re: Union and Order By give strange results in Mysql 4.0.13

2003-08-25 Thread Neculai Macarie
Neculai Macarie wrote: [] select 'gallery' as table_name, d_image_small, d_image_big from gallery UNION select 'gallery_categ' as table_name, d_image, NULL from gallery_categ order by table_name; [] select 'gallery' as table_name, d_image_small, d_image_big from gallery union

Re: Union and Order By give strange results in Mysql 4.0.13

2003-08-25 Thread Hans van Harten
Neculai Macarie wrote: To my observations constants in a column declaration limit the column width to just fit the initial constant. Your choice of values 'gallary' and 'gallery-categ' just masked that out ;-) Yes, you are right. Based on your observation I was able to trick him with this

Union and Order By give strange results in Mysql 4.0.13

2003-08-24 Thread Neculai Macarie
Hi! Using Union and Order By gives strange behaviour in the following test-case: drop table if exists gallery; drop table if exists gallery_categ; # create test tables create table gallery (d_image_small char(100), d_image_big char(100)); create table gallery_categ (d_image char(100)); # insert

Re: Union and Order By give strange results in Mysql 4.0.13

2003-08-24 Thread Hans van Harten
Neculai Macarie wrote: [] select 'gallery' as table_name, d_image_small, d_image_big from gallery UNION select 'gallery_categ' as table_name, d_image, NULL from gallery_categ order by table_name; [] select 'gallery' as table_name, d_image_small, d_image_big from gallery union select